summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/zimage.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-19 21:11:20 -0600
committerSimon Glass <sjg@chromium.org>2014-10-22 09:03:05 -0600
commit0d0ba59ccd135addc345568e5678400d01d356db (patch)
treea660432d0636b52df63cf9d018a71771cbbf0d45 /arch/x86/lib/zimage.c
parent43e84bf866e24b037dc907b5ddbff00212c6bdb9 (diff)
downloadtalos-obmc-uboot-0d0ba59ccd135addc345568e5678400d01d356db.tar.gz
talos-obmc-uboot-0d0ba59ccd135addc345568e5678400d01d356db.zip
x86: Rewrite bootm.c to make it similar to ARM
The x86 bootm code is quite special, and geared to zimage. Adjust it to support device tree and make it more like the ARM code, with separate bootm stages and functions for each stage. Create a function announce_and_cleanup() to handle printing the "Starting kernel ..." message and put it in bootm so it is in one place and can be used by any loading code. Also move the board_final_cleanup() function into bootm. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib/zimage.c')
-rw-r--r--arch/x86/lib/zimage.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 1dab3cc788..1f59bf2643 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -18,6 +18,7 @@
#include <asm/ptrace.h>
#include <asm/zimage.h>
#include <asm/byteorder.h>
+#include <asm/bootm.h>
#include <asm/bootparam.h>
#ifdef CONFIG_SYS_COREBOOT
#include <asm/arch/timestamp.h>
@@ -257,26 +258,9 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
return 0;
}
-/*
- * Implement a weak default function for boards that optionally
- * need to clean up the system before jumping to the kernel.
- */
-__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");
+ bootm_announce_and_cleanup();
#ifdef CONFIG_SYS_COREBOOT
timestamp_add_now(TS_U_BOOT_START_KERNEL);
OpenPOWER on IntegriCloud