Skip to contentSkip to conversation

arm: Fixed the offset for the no relocation.

PATCH Superseded Zhong Hongbo 1 participant 2 messages Aug 1, 2012 – Aug 17, 2012 Arm (32-bit)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: Fixed the offset for the no relocation.

From: Zhong Hongbo <[email protected]>

When the u-boot address of destination equal to __start, no relocation. relocation offset(r9) = 0.

---
Change for V2:
- Clean a line for arm1176

---
 arch/arm/cpu/arm1136/start.S   |    1 +
 arch/arm/cpu/arm1176/start.S   |    1 +
 arch/arm/cpu/arm720t/start.S   |    1 +
 arch/arm/cpu/arm920t/start.S   |    1 +
 arch/arm/cpu/arm925t/start.S   |    1 +
 arch/arm/cpu/arm926ejs/start.S |    1 +
 arch/arm/cpu/arm946es/start.S  |    1 +
 arch/arm/cpu/arm_intcm/start.S |    1 +
 arch/arm/cpu/ixp/start.S       |    1 +
 arch/arm/cpu/lh7a40x/start.S   |    1 +
 arch/arm/cpu/pxa/start.S       |    1 +
 arch/arm/cpu/s3c44b0/start.S   |    1 +
 arch/arm/cpu/sa1100/start.S    |    1 +
 13 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/cpu/arm1136/start.S +1 -0
index 2483c63..3752af9 100644
@@ -190,6 +190,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm1176/start.S +1 -0
index d613641..667a0e0 100644
@@ -252,6 +252,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm720t/start.S +1 -0
index 3b97e80..913065b 100644
@@ -167,6 +167,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm920t/start.S +1 -0
index 9b8604e..14c9156 100644
@@ -210,6 +210,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm925t/start.S +1 -0
index 1a54416..3a483f6 100644
@@ -204,6 +204,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm926ejs/start.S +1 -0
index 6f05f1a..1b530dc 100644
@@ -235,6 +235,7 @@ stack_setup:
 	adr	r0, _start
 	sub	r9, r6, r0		/* r9 <- relocation offset */
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm946es/start.S +1 -0
index b4d1d2d..30e2183 100644
@@ -175,6 +175,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm_intcm/start.S +1 -0
index b85e7d4..a133d19 100644
@@ -171,6 +171,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/ixp/start.S +1 -0
index 59c359a..c12f1a7 100644
@@ -273,6 +273,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/lh7a40x/start.S +1 -0
index bd68cd4..33b9269 100644
@@ -184,6 +184,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/pxa/start.S +1 -0
index 33c73f6..536cf5c 100644
@@ -197,6 +197,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/s3c44b0/start.S +1 -0
index 8daf26c..323b923 100644
@@ -156,6 +156,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/sa1100/start.S +1 -0
index bcea2a8..1ea92d1 100644
@@ -160,6 +160,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH v2 1/1 arm: Fixed the offset for the no relocation.

Hi Albert,

Sorry for any noisy. This patch affect some SPL arm booting. So it is very important, Now I found that Allen send a patch to fix arm720t platform for the same issue.

So I hope this patch can be merged early, If you think the patch have some issue, please point it to me.

Thanks,
hongbo

Quoted 182 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

When the u-boot address of destination equal to __start, no relocation. relocation offset(r9) = 0.

---
Change for V2:
- Clean a line for arm1176

---
 arch/arm/cpu/arm1136/start.S   |    1 +
 arch/arm/cpu/arm1176/start.S   |    1 +
 arch/arm/cpu/arm720t/start.S   |    1 +
 arch/arm/cpu/arm920t/start.S   |    1 +
 arch/arm/cpu/arm925t/start.S   |    1 +
 arch/arm/cpu/arm926ejs/start.S |    1 +
 arch/arm/cpu/arm946es/start.S  |    1 +
 arch/arm/cpu/arm_intcm/start.S |    1 +
 arch/arm/cpu/ixp/start.S       |    1 +
 arch/arm/cpu/lh7a40x/start.S   |    1 +
 arch/arm/cpu/pxa/start.S       |    1 +
 arch/arm/cpu/s3c44b0/start.S   |    1 +
 arch/arm/cpu/sa1100/start.S    |    1 +
 13 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/cpu/arm1136/start.S +1 -0
index 2483c63..3752af9 100644
@@ -190,6 +190,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm1176/start.S +1 -0
index d613641..667a0e0 100644
@@ -252,6 +252,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm720t/start.S +1 -0
index 3b97e80..913065b 100644
@@ -167,6 +167,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm920t/start.S +1 -0
index 9b8604e..14c9156 100644
@@ -210,6 +210,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm925t/start.S +1 -0
index 1a54416..3a483f6 100644
@@ -204,6 +204,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm926ejs/start.S +1 -0
index 6f05f1a..1b530dc 100644
@@ -235,6 +235,7 @@ stack_setup:
 	adr	r0, _start
 	sub	r9, r6, r0		/* r9 <- relocation offset */
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm946es/start.S +1 -0
index b4d1d2d..30e2183 100644
@@ -175,6 +175,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/arm_intcm/start.S +1 -0
index b85e7d4..a133d19 100644
@@ -171,6 +171,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/ixp/start.S +1 -0
index 59c359a..c12f1a7 100644
@@ -273,6 +273,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/lh7a40x/start.S +1 -0
index bd68cd4..33b9269 100644
@@ -184,6 +184,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/pxa/start.S +1 -0
index 33c73f6..536cf5c 100644
@@ -197,6 +197,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/s3c44b0/start.S +1 -0
index 8daf26c..323b923 100644
@@ -156,6 +156,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs
arch/arm/cpu/sa1100/start.S +1 -0
index bcea2a8..1ea92d1 100644
@@ -160,6 +160,7 @@ stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0		/* no relocation. relocation offset(r9) = 0 */
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs