summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-05-30 12:48:29 +0000
committerwdenk <wdenk>2003-05-30 12:48:29 +0000
commit3b57fe0a70b903f4db66c558bb9828bc58acf06b (patch)
treeb8e415f6a1ff4e519534c8f7154307977e38b8db /cpu
parentf07771cc288eb86cad8f8a5c1aa593caf2ba26f8 (diff)
* Get (mostly) rid of CFG_MONITOR_LEN definition; compute real lengthLABEL_2003_05_30_1450
instead CFG_MONITOR_LEN is now only used to determine _at_compile_ _time_ (!) if the environment is embedded within the U-Boot image, or in a separate flash sector. * Cleanup CFG_DER #defines in config files (wd maintained only)
Diffstat (limited to 'cpu')
-rw-r--r--cpu/74xx_7xx/start.S15
-rw-r--r--cpu/mips/start.S3
-rw-r--r--cpu/mpc5xx/start.S11
-rw-r--r--cpu/mpc824x/start.S11
-rw-r--r--cpu/mpc8260/start.S11
-rw-r--r--cpu/mpc8xx/start.S11
-rw-r--r--cpu/ppc4xx/start.S11
7 files changed, 22 insertions, 51 deletions
diff --git a/cpu/74xx_7xx/start.S b/cpu/74xx_7xx/start.S
index 96559c2e318..4a0e7a11191 100644
--- a/cpu/74xx_7xx/start.S
+++ b/cpu/74xx_7xx/start.S
@@ -68,6 +68,7 @@
GOT_ENTRY(_end_of_vectors)
GOT_ENTRY(transfer_to_handler)
+ GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_start)
END_GOT
@@ -590,8 +591,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 */
/*
@@ -617,8 +618,8 @@ relocate_code:
mr r3, r10 /* 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 */
#else
cmplw cr1,r3,r4
@@ -738,12 +739,6 @@ in_ram:
/* not reached - end relocate_code */
/*-----------------------------------------------------------------------*/
- /* 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
*
diff --git a/cpu/mips/start.S b/cpu/mips/start.S
index 86a8407f61a..b5043937293 100644
--- a/cpu/mips/start.S
+++ b/cpu/mips/start.S
@@ -302,7 +302,8 @@ relocate_code:
sub t6, gp, t6 /* t6 <-- relocation offset */
li t0, CFG_MONITOR_BASE
- add t2, t0, CFG_MONITOR_LEN
+ la t3, in_ram
+ lw t2, -12(t3) /* t2 <-- uboot_end_data */
move t1, a2
/*
diff --git a/cpu/mpc5xx/start.S b/cpu/mpc5xx/start.S
index d8a8bec1e55..4d7c71644f0 100644
--- a/cpu/mpc5xx/start.S
+++ b/cpu/mpc5xx/start.S
@@ -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)
END_GOT
@@ -432,8 +433,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
/*
* Fix GOT pointer:
@@ -544,12 +545,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
*
diff --git a/cpu/mpc824x/start.S b/cpu/mpc824x/start.S
index 855b81f7bb2..d45bb364805 100644
--- a/cpu/mpc824x/start.S
+++ b/cpu/mpc824x/start.S
@@ -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)
@@ -549,8 +550,8 @@ relocate_code:
lis r4, CFG_MONITOR_BASE@h /* Source Address */
ori r4, r4, CFG_MONITOR_BASE@l
#endif
- 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 */
/*
@@ -683,12 +684,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
*
diff --git a/cpu/mpc8260/start.S b/cpu/mpc8260/start.S
index 9ceb7049555..a5b8b5f0f08 100644
--- a/cpu/mpc8260/start.S
+++ b/cpu/mpc8260/start.S
@@ -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
*
diff --git a/cpu/mpc8xx/start.S b/cpu/mpc8xx/start.S
index 3cd0d9ae748..c5dc5a973af 100644
--- a/cpu/mpc8xx/start.S
+++ b/cpu/mpc8xx/start.S
@@ -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
*
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index afe8635585c..cc29548eba7 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -132,6 +132,7 @@
GOT_ENTRY(_end_of_vectors)
GOT_ENTRY(transfer_to_handler)
+ GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_start)
END_GOT
@@ -1235,8 +1236,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 */
/*
@@ -1369,12 +1370,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
*