Hello Sascha,

On 08.11.21 08:52, Ahmad Fatoum wrote:
> Unlike with ARM32, barebox prologue on ARM64 starts with the function
> prologue, because of the absence of the naked attribute. The code is
> written with that in mind (6 branches instead of 8 to account for the
> two instructions inserted by the compiler), but it's still suprising.
> 
> Add a hint about that in the code.
> 
> Signed-off-by: Ahmad Fatoum <[email protected]>
> ---
>  arch/arm/include/asm/barebox-arm-head.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/include/asm/barebox-arm-head.h 
> b/arch/arm/include/asm/barebox-arm-head.h
> index 8409a77d2e7c..187d12c9fc8d 100644
> --- a/arch/arm/include/asm/barebox-arm-head.h
> +++ b/arch/arm/include/asm/barebox-arm-head.h
> @@ -44,6 +44,8 @@ static inline void __barebox_arm_head(void)
>               "1: b 1b\n"
>  #endif
>  #else
> +             /* two instruction long function prologue */
> +             /* only use if stack is initialized! */

On the rk3399, the sp points into INTMEM0. When I added a new user to
load_elf64_image_phdr, the function become out-of-line and thus return
from that function broke. Does the rk3568 MaskROM initialize the stack
pointer differently? I want to avoid breaking it when I send out the
remaining rk3399 patches.

>               "b 2f\n"
>               "nop\n"
>               "nop\n"
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to