From 8a01eb60522bae5b6c30889b38ef1f84ff78131d Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 9 Oct 2014 15:59:12 -0700 Subject: [PATCH] libpayload arm64: Move console_init after post_sysinfo_mmu_setup call This is important since mmu is disabled during the post_sysinfo_mmu_setup call and calling printf can cause unaligned access. BUG=None BRANCH=None TEST=Compiles successfully and boots to kernel prompt with console_init Change-Id: I5ef72ee449fdcf30186f97485cc532d6c56b2c5d Signed-off-by: Patrick Georgi Original-Commit-Id: 688ef3856d0502d057c9543ee7763601156e6385 Original-Change-Id: Ie376e394d084edd6c999fc9edde79f15a0264e7b Original-Signed-off-by: Furquan Shaikh Original-Reviewed-on: https://chromium-review.googlesource.com/222664 Original-Reviewed-by: Jimmy Zhang Original-Reviewed-by: Aaron Durbin Original-Tested-by: Furquan Shaikh Original-Commit-Queue: Furquan Shaikh Reviewed-on: http://review.coreboot.org/8795 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/arch/arm64/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/payloads/libpayload/arch/arm64/main.c b/payloads/libpayload/arch/arm64/main.c index 4561e2e08d..aa02ff7289 100644 --- a/payloads/libpayload/arch/arm64/main.c +++ b/payloads/libpayload/arch/arm64/main.c @@ -121,12 +121,12 @@ void start_main(void) /* Gather system information. */ lib_get_sysinfo(); + post_sysinfo_scan_mmu_setup(); + #ifndef CONFIG_LP_SKIP_CONSOLE_INIT console_init(); #endif - post_sysinfo_scan_mmu_setup(); - printf("ARM64: Libpayload %s\n",__func__); exception_init();