Message ID | 20200928004624.1652803-3-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | Various minor patches | expand |
Hi Simon, On Mon, Sep 28, 2020 at 8:46 AM Simon Glass <sjg@chromium.org> wrote: > > Add logging for each part of the boot process, using a new using a new category? > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > arch/x86/lib/zimage.c | 6 ++++++ > common/log.c | 1 + > include/log.h | 1 + > 3 files changed, 8 insertions(+) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Regards, Bin
Hi Simon, On Fri, Oct 16, 2020 at 1:57 PM Bin Meng <bmeng.cn@gmail.com> wrote: > > Hi Simon, > > On Mon, Sep 28, 2020 at 8:46 AM Simon Glass <sjg@chromium.org> wrote: > > > > Add logging for each part of the boot process, using a new > > using a new category? > > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > arch/x86/lib/zimage.c | 6 ++++++ > > common/log.c | 1 + > > include/log.h | 1 + > > 3 files changed, 8 insertions(+) > > > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Could you please rebase this series? Applying: x86: zimage: Add a little more logging error: patch failed: common/log.c:26 error: common/log.c: patch does not apply Patch failed at 0001 x86: zimage: Add a little more logging The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Regards, Bin
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index a00964cc8d9..7418c9a5fed 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -12,10 +12,13 @@ * linux/Documentation/i386/boot.txt */ +#define LOG_CATEGORY LOGC_BOOT + #include <common.h> #include <command.h> #include <env.h> #include <irq_func.h> +#include <log.h> #include <malloc.h> #include <acpi/acpi_table.h> #include <asm/io.h> @@ -292,6 +295,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, struct setup_header *hdr = &setup_base->hdr; int bootproto = get_boot_protocol(hdr, false); + log_debug("Setup E820 entries\n"); setup_base->e820_entries = install_e820_map( ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); @@ -317,6 +321,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, } if (cmd_line) { + log_debug("Setup cmdline\n"); if (bootproto >= 0x0202) { hdr->cmd_line_ptr = (uintptr_t)cmd_line; } else if (bootproto >= 0x0200) { @@ -340,6 +345,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr(); + log_debug("Setup devicetree\n"); setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0)); setup_video(&setup_base->screen_info); diff --git a/common/log.c b/common/log.c index 38336d84e3c..9c65688ba6d 100644 --- a/common/log.c +++ b/common/log.c @@ -26,6 +26,7 @@ static const char *log_cat_name[LOGC_COUNT - LOGC_NONE] = { "bloblist", "devres", "acpi", + "boot", }; static const char *log_level_name[LOGL_COUNT] = { diff --git a/include/log.h b/include/log.h index 00885004a36..dc1b6b5e4c6 100644 --- a/include/log.h +++ b/include/log.h @@ -59,6 +59,7 @@ enum log_category_t { LOGC_DEVRES, /* Device resources (devres_... functions) */ /* Advanced Configuration and Power Interface (ACPI) */ LOGC_ACPI, + LOGC_BOOT, /* Related to boot process / boot image processing */ LOGC_COUNT, /* Number of log categories */ LOGC_END, /* Sentinel value for a list of log categories */
Add logging for each part of the boot process, using a new Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/x86/lib/zimage.c | 6 ++++++ common/log.c | 1 + include/log.h | 1 + 3 files changed, 8 insertions(+)