Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Chris Johns
On 26/7/19 4:23 pm, Sebastian Huber wrote: > On 26/07/2019 07:41, Chris Johns wrote: >> On 26/7/19 3:07 pm, Sebastian Huber wrote: >>> On 26/07/2019 07:06, Sebastian Huber wrote: Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in F

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Sebastian Huber
On 26/07/2019 07:41, Chris Johns wrote: On 26/7/19 3:07 pm, Sebastian Huber wrote: On 26/07/2019 07:06, Sebastian Huber wrote: Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in FIQ mode. I think the bsp_start_arm_drop_hyp_mode needs to be changed to n

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Chris Johns
On 26/7/19 3:42 pm, Sebastian Huber wrote: > On 26/07/2019 07:37, Chris Johns wrote: >> On 26/7/19 3:06 pm, Sebastian Huber wrote: >>> Hello Chris, >>> >>> I am not sure, if using r8 is the right thing to do since r8..r14 are >>> banked in >>> FIQ mode. >> >> The ARM docs I referenced say the regi

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Sebastian Huber
On 26/07/2019 07:41, Chris Johns wrote: On 26/7/19 3:07 pm, Sebastian Huber wrote: On 26/07/2019 07:06, Sebastian Huber wrote: Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in FIQ mode. I think the bsp_start_arm_drop_hyp_mode needs to be changed to n

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Sebastian Huber
On 26/07/2019 07:37, Chris Johns wrote: On 26/7/19 3:06 pm, Sebastian Huber wrote: Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in FIQ mode. The ARM docs I referenced say the register is general purpose. There is other docs they say something else?

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Chris Johns
On 26/7/19 3:07 pm, Sebastian Huber wrote: > On 26/07/2019 07:06, Sebastian Huber wrote: >> Hello Chris, >> >> I am not sure, if using r8 is the right thing to do since r8..r14 are banked >> in FIQ mode. I think the bsp_start_arm_drop_hyp_mode needs to be changed to >> not touch r3, it can use r1 i

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Chris Johns
On 26/7/19 3:06 pm, Sebastian Huber wrote: > Hello Chris, > > I am not sure, if using r8 is the right thing to do since r8..r14 are banked > in > FIQ mode. The ARM docs I referenced say the register is general purpose. There is other docs they say something else? This is early boot code who wh

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Sebastian Huber
On 26/07/2019 07:06, Sebastian Huber wrote: Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in FIQ mode. I think the bsp_start_arm_drop_hyp_mode needs to be changed to not touch r3, it can use r1 instead. I think the code should move to start.S also.

Re: [PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread Sebastian Huber
Hello Chris, I am not sure, if using r8 is the right thing to do since r8..r14 are banked in FIQ mode. I think the bsp_start_arm_drop_hyp_mode needs to be changed to not touch r3, it can use r1 instead. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germa

[PATCH] arm/start.S: Do not use a scratch register to hold the stack pointer

2019-07-25 Thread chrisj
From: Chris Johns - The RPi calls C code which trashes scratch registers. Closes #3773 --- bsps/arm/shared/start/start.S | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bsps/arm/shared/start/start.S b/bsps/arm/shared/start/start.S index 80b7d44db