[U-Boot] arm: U-Boot API - clang support broke ABI
Leif Lindholm
leif.lindholm at linaro.org
Mon Nov 18 12:26:59 CET 2013
Hi,
Commit fe1378a - "ARM: use r9 for gd" - broke the ABI for users of the
U-Boot API on ARM. Users I am aware of are GRUB and the FreeBSD loader.
Since I only spotted this on Saturday, this code is well and truly in
the wild, so any users of the API will need to preserve both r8 and r9
on syscalls for the foreseeable future (which is not the end of the
world).
Sometime last year I proposed a change to make the API syscall entry
and exit points responsible for maintaining full procedure-call standard
compliance, although the patch I provided was on the hackier side of
good (and probably wrong).
I would now like to ask in a more open-ended way - is there any chance
that we could solve this in a generic way, such that consumers of the
API need not be aware of U-Boot internal ABI changes?
If the assumtions that the global data pointer is:
a) a pointer
b) writable
are not both safe, then this could be achieved by arch-specific asm
entry/exit points.
/
Leif
More information about the U-Boot
mailing list