Author: ian
Date: Sat Jan 17 18:40:46 2015
New Revision: 277305
URL: https://svnweb.freebsd.org/changeset/base/277305

Log:
  Minor cleanups, comment changes.  No need to load 3 values when setting up
  the stack for secondary cores, the other two values are only used for zeroing
  bss on the primary core.  No need to store the size of the stack at the
  top of the stack (seems to be a leftover instruction from some cut-n-paste).

Modified:
  head/sys/arm/arm/locore-v6.S

Modified: head/sys/arm/arm/locore-v6.S
==============================================================================
--- head/sys/arm/arm/locore-v6.S        Sat Jan 17 17:37:08 2015        
(r277304)
+++ head/sys/arm/arm/locore-v6.S        Sat Jan 17 18:40:46 2015        
(r277305)
@@ -367,9 +367,9 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1)
 
 
 .Lstart:
-       .word   _edata
-       .word   _ebss
-       .word   svcstk
+       .word   _edata                  /* Note that these three items are */
+       .word   _ebss                   /* loaded with a single ldmia and */
+       .word   svcstk                  /* must remain in order together. */
 
 .Lmainreturned:
        .asciz  "main() returned"
@@ -425,20 +425,19 @@ ASENTRY_NP(mpentry)
        
        bl      init_mmu
 
-       adr     r1, .Lstart
-       ldmia   r1, {r1, r2, sp}        /* Set initial stack and */
-       mrc     p15, 0, r0, c0, c0, 5
-       and     r0, r0, #15
+       adr     r1, .Lstart+8           /* Get initstack pointer from */
+       ldr     sp, [r1]                /* startup data. */
+       mrc     CP15_MPIDR(r0)          /* Get processor id number. */
+       and     r0, r0, #0x0f
        mov     r1, #INIT_ARM_STACK_SIZE
-       mul     r2, r1, r0
-       add     sp, sp, r2
-       str     r1, [sp]
+       mul     r2, r1, r0              /* Point sp to initstack */
+       add     sp, sp, r2              /* area for this processor. */
 
        /* Switch to virtual addresses. */
        ldr     pc, =1f
 1:
        mov     fp, #0                  /* trace back starts here */
-       bl      _C_LABEL(init_secondary)        /* Off we go */
+       bl      _C_LABEL(init_secondary)/* Off we go, cpu id in r0. */
 
        adr     r0, .Lmpreturned
        b       _C_LABEL(panic)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to