On 16.11.2013 14:53, Leif Lindholm wrote: > On Sat, Nov 16, 2013 at 02:17:51PM +0100, Vladimir 'φ-coder/phcoder' > Serbinenko wrote: >>> 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. > > *sigh* > > Updated patch attached.
Go ahead. > > / > Leif > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel