
12 Mar
2019
12 Mar
'19
7:59 p.m.
Hi Marek,
On Tue, Mar 5, 2019 at 4:41 AM Marek Vasut marek.vasut@gmail.com wrote: [..]
+.align 8 +.globl rcar_atf_boot_args +rcar_atf_boot_args:
.dword 0
.dword 0
.dword 0
.dword 0
+ENTRY(save_boot_params)
adr x8, rcar_atf_boot_args
stp x0, x1, [x8], #16
stp x2, x3, [x8], #16
b save_boot_params_ret
+ENDPROC(save_boot_params)
What about relocating the function to C like in [1] and passing the 4 arguments to it from ASM like in [2]? This would allow to: - reduce asm operations to minimum (mov and bl) and make code transparent. - avoid custom globals and store the ATF information in some C-defined struct.
[1] https://github.com/ARM-software/arm-trusted-firmware/blob/c48d02bade88b07fa7... [2] https://github.com/ARM-software/arm-trusted-firmware/blob/c48d02bade88b07fa7...
Best regards, Eugeniu.