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.
This commit is contained in:
Justin Hibbits 2019-12-04 03:41:55 +00:00
parent 3eff27dc1b
commit 4160ed6f8b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355378

View File

@ -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