[PowerPC] Fix 32-bit ubldr calling convention
authorbdragon <bdragon@FreeBSD.org>
Sun, 19 Jan 2020 04:13:19 +0000 (04:13 +0000)
committerbdragon <bdragon@FreeBSD.org>
Sun, 19 Jan 2020 04:13:19 +0000 (04:13 +0000)
commit2f958f782b681eefe66a25a2d81b09e2baed54f0
tree1f12d5ef5a16a77b2b840fdfa1c5df6f8fd8c979
parentd06ebacebaa37b73118be4c7e872c9a2c67a504b
[PowerPC] Fix 32-bit ubldr calling convention

Due to the way u-boot for 32-bit powerpc is compiled, the interrupt code
assumes that the GOT pointer (r30) on u-boot is always intact.

When making syscalls to u-boot, ensure that we have restored r30 like we
found it before we enable interrupts to prevent u-boot from crashing if a
timer interrupt was pending.

This fixes ubldr on e500 qemu (assuming you have recompiled qemu's u-boot
with API support!)

Reviewed by: jhibbits
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D23258
stand/powerpc/uboot/start.S