Hi Simon, On Thu, 28 Dec 2023 at 08:37, Simon Glass <s...@chromium.org> wrote:
> Hi Raymond, > > On Wed, Dec 27, 2023 at 3:52 PM Raymond Mao <raymond....@linaro.org> > wrote: > > > > Hi Simon, > > > > On Tue, 26 Dec 2023 at 04:48, Simon Glass <s...@chromium.org> wrote: > >> > >> Hi Raymond, > >> > >> On Fri, Dec 22, 2023 at 9:31 PM Raymond Mao <raymond....@linaro.org> > wrote: > >> > > >> > Save boot arguments r[0-3] into an array for handover of bloblist from > >> > previous boot stage. > >> > > >> > Signed-off-by: Raymond Mao <raymond....@linaro.org> > >> > --- > >> > Changes in v2 > >> > - New patch file created for v2. > >> > Changes in v3 > >> > - Swap value of r0 with r2. > >> > > >> > arch/arm/cpu/armv7/start.S | 13 +++++++++++++ > >> > 1 file changed, 13 insertions(+) > >> > > >> > diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S > >> > index 69e281b086..2ca63ca32c 100644 > >> > --- a/arch/arm/cpu/armv7/start.S > >> > +++ b/arch/arm/cpu/armv7/start.S > >> > @@ -152,9 +152,22 @@ ENDPROC(c_runtime_cpu_setup) > >> > * > >> > > *************************************************************************/ > >> > WEAK(save_boot_params) > >> > +#if (IS_ENABLED(CONFIG_OF_BOARD) && IS_ENABLED(CONFIG_BLOBLIST)) > >> > + ldr r12, =saved_args > >> > + /* Intentionally swapping r0 with r2 */ > >> > + stm r12, {r2, r1, r0, r3} > >> > >> I thought the instruction was a bitmap, so what does the 'swapping' > >> actually change? > >> > > The swapping is due to different register conventions between aarch32 > and aarch64. > > Actually swapping here is to avoid the complexity of swapping this in C > code. > > I will update the comments here. > > > > [...] > > But how does this work? stm does not support changing the > ordering...what am I missing? > Ah, my bad. You are right. I have to use `str` to store one by one in this case. [...] Thanks and regards, Raymond