]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/mpc8xx/start.S
* Patches by Udi Finkelstein, 2 June 2003:
[karo-tx-uboot.git] / cpu / mpc8xx / start.S
index 3cd0d9ae748070ddb672ebda891b2b3c0a3f060b..3cc4ecba24b6a60dac8d2e3ead5e575ad0c06f6c 100644 (file)
@@ -73,6 +73,7 @@
        GOT_ENTRY(_end_of_vectors)
        GOT_ENTRY(transfer_to_handler)
 
+       GOT_ENTRY(__init_end)
        GOT_ENTRY(_end)
        GOT_ENTRY(__bss_start)
 #if defined(CONFIG_FADS) || defined(CONFIG_ICU862)
@@ -568,8 +569,8 @@ relocate_code:
        mr      r3,  r5                         /* Destination Address  */
        lis     r4, CFG_MONITOR_BASE@h          /* Source      Address  */
        ori     r4, r4, CFG_MONITOR_BASE@l
-       lis     r5, CFG_MONITOR_LEN@h           /* Length in Bytes      */
-       ori     r5, r5, CFG_MONITOR_LEN@l
+       lwz     r5, GOT(__init_end)
+       sub     r5, r5, r4
        li      r6, CFG_CACHELINE_SIZE          /* Cache Line Size      */
 
        /*
@@ -711,12 +712,6 @@ clear_bss:
        mr      r4, r10         /* Destination Address          */
        bl      board_init_r
 
-       /* Problems accessing "end" in C, so do it here */
-       .globl  get_endaddr
-get_endaddr:
-       lwz     r3,GOT(_end)
-       blr
-
        /*
         * Copy exception vector code to low memory
         *
@@ -728,7 +723,7 @@ trap_init:
        lwz     r7, GOT(_start)
        lwz     r8, GOT(_end_of_vectors)
 
-       rlwinm  r9, r7, 0, 22, 31       /* _start & 0x3FF       */
+       li      r9, 0x100               /* reset vector always at 0x100 */
 
        cmplw   0, r7, r8
        bgelr                           /* return if r7>=r8 - just in case */