Patchwork [U-Boot,V3,09/15] arm1176: Fixed No relocation.

login
register
mail settings
Submitter seedshope
Date July 28, 2012, 9:35 a.m.
Message ID <1343468148-26595-10-git-send-email-bocui107@gmail.com>
Download mbox | patch
Permalink /patch/173854/
State Superseded
Headers show

Comments

seedshope - July 28, 2012, 9:35 a.m.
From: Zhong Hongbo <bocui107@gmail.com>

When It do not need to relocat for u-boot,
the offset(r9) of relocation should be set zero.

Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
---
Change for V3:
	- Replace mov with moveq.
Change for V2:
	- Seprate some code.
---
 arch/arm/cpu/arm1176/start.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Albert ARIBAUD - July 29, 2012, 10:12 a.m.
Hi Zhong,

On Sat, 28 Jul 2012 17:35:42 +0800, Zhong Hongbo <bocui107@gmail.com> wrote:
> From: Zhong Hongbo <bocui107@gmail.com>
> 
> When It do not need to relocat for u-boot,
> the offset(r9) of relocation should be set zero.
> 
> Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
> ---
> Change for V3:
> 	- Replace mov with moveq.
> Change for V2:
> 	- Seprate some code.
> ---
>  arch/arm/cpu/arm1176/start.S |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
> index 761b7fe..dd1b73b 100644
> --- a/arch/arm/cpu/arm1176/start.S
> +++ b/arch/arm/cpu/arm1176/start.S
> @@ -252,6 +252,7 @@ stack_setup:
>  
>  	adr	r0, _start
>  	cmp	r0, r6
> +	moveq	r9, #0
>  	beq	clear_bss		/* skip relocation */
>  	mov	r1, r6			/* r1 <- scratch for copy_loop */
>  	ldr	r3, _bss_start_ofs

I suspect this goes for other ARM arches as well, does it not?
Please fix globally.

(considering this is the second time in a small period where such a global
fixing is needed, I'll have a look at commonalizing start.S files across
all ARM arches if possible and submit a patch for the coming window -- unless
someone else has this ongoing already)

Amicalement,
seedshope - July 29, 2012, 10:50 a.m.
On 07/29/2012 06:12 PM, Albert ARIBAUD wrote:
> Hi Zhong,
> 
> On Sat, 28 Jul 2012 17:35:42 +0800, Zhong Hongbo <bocui107@gmail.com> wrote:
>> From: Zhong Hongbo <bocui107@gmail.com>
>>
>> When It do not need to relocat for u-boot,
>> the offset(r9) of relocation should be set zero.
>>
>> Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
>> ---
>> Change for V3:
>> 	- Replace mov with moveq.
>> Change for V2:
>> 	- Seprate some code.
>> ---
>>  arch/arm/cpu/arm1176/start.S |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>> index 761b7fe..dd1b73b 100644
>> --- a/arch/arm/cpu/arm1176/start.S
>> +++ b/arch/arm/cpu/arm1176/start.S
>> @@ -252,6 +252,7 @@ stack_setup:
>>  
>>  	adr	r0, _start
>>  	cmp	r0, r6
>> +	moveq	r9, #0
>>  	beq	clear_bss		/* skip relocation */
>>  	mov	r1, r6			/* r1 <- scratch for copy_loop */
>>  	ldr	r3, _bss_start_ofs
> 
> I suspect this goes for other ARM arches as well, does it not?

I think all the arm need it.
> Please fix globally.

Ok, I will do it.
> 
> (considering this is the second time in a small period where such a global
> fixing is needed, I'll have a look at commonalizing start.S files across
> all ARM arches if possible and submit a patch for the coming window -- unless
> someone else has this ongoing already)
Do your mean is that you will fix the issue?

Thank
> 
> Amicalement,
>
seedshope - July 29, 2012, 11:09 a.m.
Hi Albert,
On 07/29/2012 06:50 PM, Zhong Hongbo wrote:
> On 07/29/2012 06:12 PM, Albert ARIBAUD wrote:
>> Hi Zhong,
>>
>> On Sat, 28 Jul 2012 17:35:42 +0800, Zhong Hongbo <bocui107@gmail.com> wrote:
>>> From: Zhong Hongbo <bocui107@gmail.com>
>>>
>>> When It do not need to relocat for u-boot,
>>> the offset(r9) of relocation should be set zero.
>>>
>>> Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
>>> ---
>>> Change for V3:
>>> 	- Replace mov with moveq.
>>> Change for V2:
>>> 	- Seprate some code.
>>> ---
>>>  arch/arm/cpu/arm1176/start.S |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>>> index 761b7fe..dd1b73b 100644
>>> --- a/arch/arm/cpu/arm1176/start.S
>>> +++ b/arch/arm/cpu/arm1176/start.S
>>> @@ -252,6 +252,7 @@ stack_setup:
>>>  
>>>  	adr	r0, _start
>>>  	cmp	r0, r6
>>> +	moveq	r9, #0
>>>  	beq	clear_bss		/* skip relocation */
>>>  	mov	r1, r6			/* r1 <- scratch for copy_loop */
>>>  	ldr	r3, _bss_start_ofs
>>
>> I suspect this goes for other ARM arches as well, does it not?
> 
> I think all the arm need it.
>> Please fix globally.
> 
> Ok, I will do it.
>>
>> (considering this is the second time in a small period where such a global
>> fixing is needed, I'll have a look at commonalizing start.S files across
>> all ARM arches if possible and submit a patch for the coming window -- unless
>> someone else has this ongoing already)
> Do your mean is that you will fix the issue?
Sorry, s/your/you and s/is//. I should said as following:
Do you mean that you will fix the issue?

Thanks
hongbo
> 
> Thank
>>
>> Amicalement,
>>
>
seedshope - Aug. 1, 2012, 2:20 p.m.
On 07/29/2012 06:12 PM, Albert ARIBAUD wrote:
> Hi Zhong,
> 
> On Sat, 28 Jul 2012 17:35:42 +0800, Zhong Hongbo <bocui107@gmail.com> wrote:
>> From: Zhong Hongbo <bocui107@gmail.com>
>>
>> When It do not need to relocat for u-boot,
>> the offset(r9) of relocation should be set zero.
>>
>> Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
>> ---
>> Change for V3:
>> 	- Replace mov with moveq.
>> Change for V2:
>> 	- Seprate some code.
>> ---
>>  arch/arm/cpu/arm1176/start.S |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>> index 761b7fe..dd1b73b 100644
>> --- a/arch/arm/cpu/arm1176/start.S
>> +++ b/arch/arm/cpu/arm1176/start.S
>> @@ -252,6 +252,7 @@ stack_setup:
>>  
>>  	adr	r0, _start
>>  	cmp	r0, r6
>> +	moveq	r9, #0
>>  	beq	clear_bss		/* skip relocation */
>>  	mov	r1, r6			/* r1 <- scratch for copy_loop */
>>  	ldr	r3, _bss_start_ofs
> 
> I suspect this goes for other ARM arches as well, does it not?
> Please fix globally.
> 
> (considering this is the second time in a small period where such a global
> fixing is needed, I'll have a look at commonalizing start.S files across
> all ARM arches if possible and submit a patch for the coming window -- unless
> someone else has this ongoing already)
Hi Albert,

I will send a patch to modify the global arm platform.

Minkyu,

I will separate the patch from this serial.

Thanks,
hongbo

> 
> Amicalement,
>

Patch

diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index 761b7fe..dd1b73b 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -252,6 +252,7 @@  stack_setup:
 
 	adr	r0, _start
 	cmp	r0, r6
+	moveq	r9, #0
 	beq	clear_bss		/* skip relocation */
 	mov	r1, r6			/* r1 <- scratch for copy_loop */
 	ldr	r3, _bss_start_ofs