summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/cpu.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-05-11 14:44:56 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2016-05-23 07:18:00 (GMT)
commit1e2f7b9e8e077cb6937204c305d554ef7a970be5 (patch)
tree344720ff67fb622fb644542e0232c3da3f55311b /arch/x86/cpu/cpu.c
parent91fc5bf652c1e959373cd21df4809a74d31e75fe (diff)
downloadu-boot-fsl-qoriq-1e2f7b9e8e077cb6937204c305d554ef7a970be5.tar.xz
x86: Call board_final_cleanup() in last_stage_init()
At present board_final_cleanup() is called before booting a Linux kernel. This actually needs to be done before booting anything, like SeaBIOS, VxWorks or Windows. Move the call to last_stage_init() instead. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/cpu.c')
-rw-r--r--arch/x86/cpu/cpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 233a6c8..1482153 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -661,10 +661,20 @@ void show_boot_progress(int val)
}
#ifndef CONFIG_SYS_COREBOOT
+/*
+ * 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)
+{
+}
+
int last_stage_init(void)
{
write_tables();
+ board_final_cleanup();
+
return 0;
}
#endif