Author: jhibbits
Date: Wed Dec  4 03:41:55 2019
New Revision: 355378
URL: https://svnweb.freebsd.org/changeset/base/355378

Log:
  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.

Modified:
  head/sys/powerpc/booke/locore.S

Modified: head/sys/powerpc/booke/locore.S
==============================================================================
--- head/sys/powerpc/booke/locore.S     Wed Dec  4 03:36:54 2019        
(r355377)
+++ head/sys/powerpc/booke/locore.S     Wed Dec  4 03:41:55 2019        
(r355378)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to