summaryrefslogtreecommitdiff
path: root/arch/x86/lib/zimage.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-04-17 16:13:35 +0000
committerSimon Glass <sjg@chromium.org>2013-05-13 13:33:20 -0700
commit7949703a9582ec60cf841c595acd3bbe86933cd3 (patch)
treebff2cc44633f3bee735346733574c7fb87deb6c3 /arch/x86/lib/zimage.c
parentc78a62acdfbc0a1cc75ee934f7897b9e99bd3e8d (diff)
x86: Rationalise kernel booting logic and bootstage
The 'Starting linux' message appears twice in the code, but both call through the same place. Unify these and add calls to bootstage to mark the occasion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org> Acked-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'arch/x86/lib/zimage.c')
-rw-r--r--arch/x86/lib/zimage.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 4e9e1f77e5..b54cf1261f 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -283,6 +283,13 @@ __weak void board_final_cleanup(void)
void boot_zimage(void *setup_base, void *load_address)
{
+ debug("## Transferring control to Linux (at address %08x) ...\n",
+ (u32)setup_base);
+
+ bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+#ifdef CONFIG_BOOTSTAGE_REPORT
+ bootstage_report();
+#endif
board_final_cleanup();
printf("\nStarting kernel ...\n\n");
@@ -363,10 +370,6 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return -1;
}
- printf("## Transferring control to Linux "
- "(at address %08x) ...\n",
- (u32)base_ptr);
-
/* we assume that the kernel is in place */
boot_zimage(base_ptr, load_address);
/* does not return */