From 4160ed6f8bfbefd9c0e970a51c4ea92dca96cb64 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 4 Dec 2019 03:41:55 +0000 Subject: [PATCH] powerpc/booke: Fix 32-bit Book-E SMP AP bringup r354266 changed the type of bp_kernload to vm_paddr_t in platform_mpc85xx.c, but not the variable itself in locore.S. This caused the AP to not come up, due to overwriting the following variable (bp_virtaddr). Also, properly load bp_kernload into MAS3 and MAS7. Prior to r354266, we required loading into the low 4GB, but now we can load from anywhere in memory that ubldr can access. --- sys/powerpc/booke/locore.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/booke/locore.S b/sys/powerpc/booke/locore.S index 07b4956d3d8..f1a87b6ea0d 100644 --- a/sys/powerpc/booke/locore.S +++ b/sys/powerpc/booke/locore.S @@ -443,7 +443,7 @@ bp_trace: .globl bp_kernload bp_kernload: - ADDR(0) /* Kern phys. load address. */ + .llong 0 /* Kern phys. load address. */ .globl bp_virtaddr bp_virtaddr: @@ -548,14 +548,15 @@ bp_virtaddr: #else clrrwi %r3, %r3, PAGE_SHIFT /* trunc_page(%r3) */ #endif - LOAD %r4, (bp_kernload - __boot_page)(%r3) + /* Load lower half of the kernel loadaddr. */ + lwz %r4, (bp_kernload - __boot_page + 4)(%r3) LOAD %r5, (bp_virtaddr - __boot_page)(%r3) /* Set RPN and protection */ ori %r4, %r4, (MAS3_SX | MAS3_SW | MAS3_SR)@l mtspr SPR_MAS3, %r4 isync - li %r4, 0 + lwz %r4, (bp_kernload - __boot_page)(%r3) mtspr SPR_MAS7, %r4 isync tlbwe