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

Chris Johns chrisj at rtems.org
Fri Jul 26 05:37:37 UTC 2019


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 why would FIQ banks be an issue? Which BSPs would
that effect?

> I think the bsp_start_arm_drop_hyp_mode needs to be changed to not
> touch r3, it can use r1 instead.

That is a bad idea. The registers are documented as scratch and it's use here
across a call is wrong.

Chris



More information about the devel mailing list