[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] arm: fix u-boot port syscall interface va_arg handling (was

From: Leif Lindholm
Subject: Re: [PATCH] arm: fix u-boot port syscall interface va_arg handling (was Re: [PATCH] [ARM] Enable boot module for arm)
Date: Sat, 16 Nov 2013 14:53:40 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Nov 16, 2013 at 02:17:51PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
> > From an ABI perspective, grub_uboot_syscall is a veneer:
> > the only visible side effect it is permitted to have is to corrupt r12.
> > 
> According to wikipedia:
> "Subroutines must preserve the contents of r4 to r11 and the stack pointer."
> So changing r9 sounds to me like this is actually U-Boot bug and
> preserving it sounds like right way to handle it.

No. grub_uboot_syscall is not a subroutine - it is a veneer.
We have a specific reason to need to preserve r8, over and above what
the ABI says, because u-boot has hijacked it.

But now I went to look at the u-boot code, and suddenly I want to cry.
Commit fe1378a961e508b31b1f29a2bb08ba1dac063155 changes the register
reserved for global data from r8 to r9. Which means we need to preserve
both since they didn't step the API version number.


Updated patch attached.


Attachment: 0001-arm-fix-u-boot-port-syscall-interface-va_arg-handlin.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]