]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc8260/start.S
* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real length
[u-boot] / cpu / mpc8260 / start.S
index 9ceb70495558e6469d8a28195aa67b21df024af1..a5b8b5f0f088bd42d525b4dd765f6fecbd71a79c 100644 (file)
@@ -66,6 +66,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_HYMOD)
@@ -863,8 +864,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      */
 
        /*
@@ -1016,12 +1017,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
         *