Merge branch 'master' of git://git.denx.de/u-boot-arm
[oweals/u-boot.git] / cpu / blackfin / start.S
index 6c5fef7a5223364a26f9aa2a645bfd0bcdd666f1..6c8def48162fef0cd0ec23cfa9bbbf820b5610ae 100644 (file)
@@ -125,9 +125,11 @@ ENTRY(_start)
         */
        r6 = 1 (x);
 
-       /* Relocate from wherever are (FLASH/RAM/etc...) to the hardcoded
+       /* Relocate from wherever we are (FLASH/RAM/etc...) to the hardcoded
         * monitor location in the end of RAM.  We know that memcpy() only
-        * uses registers, so it is safe to call here.
+        * uses registers, so it is safe to call here.  Note that this only
+        * copies to external memory ... we do not start executing out of
+        * it yet (see "lower to 15" below).
         */
        serial_early_puts("Relocate");
        call _get_pc;
@@ -163,9 +165,8 @@ ENTRY(_start)
 .Lnorelocate:
 
        /* Setup the actual stack in external memory */
-       r0.h = HI(CONFIG_STACKBASE);
-       r0.l = LO(CONFIG_STACKBASE);
-       sp = r0;
+       sp.h = HI(CONFIG_STACKBASE);
+       sp.l = LO(CONFIG_STACKBASE);
        fp = sp;
 
        /* Now lower ourselves from the highest interrupt level to
@@ -173,7 +174,9 @@ ENTRY(_start)
         * setting the 15 handler to ".Lenable_nested", raising the 15
         * interrupt, and then returning from the highest interrupt
         * level to the dummy "jump" until the interrupt controller
-        * services the pending 15 interrupt.
+        * services the pending 15 interrupt.  If executing out of
+        * flash, these steps also changes the code flow from flash
+        * to external memory.
         */
        serial_early_puts("Lower to 15");
        r0 = r7;