Page MenuHomeFreeBSD

[PowerPC] Fix 32-bit ubldr calling convention
ClosedPublic

Authored by bdragon on Jan 19 2020, 3:45 AM.
Referenced Files
Unknown Object (File)
Sat, Dec 14, 1:00 AM
Unknown Object (File)
Thu, Dec 12, 11:26 PM
Unknown Object (File)
Mon, Dec 2, 3:14 AM
Unknown Object (File)
Mon, Dec 2, 3:09 AM
Unknown Object (File)
Mon, Dec 2, 3:09 AM
Unknown Object (File)
Mon, Dec 2, 2:41 AM
Unknown Object (File)
Nov 15 2024, 6:07 PM
Unknown Object (File)
Oct 15 2024, 12:19 AM
Subscribers

Details

Summary

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!)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stand/powerpc/uboot/start.S
56 ↗(On Diff #66987)

Why did you double the frame size when you only need 4 more bytes?

jhibbits added inline comments.
stand/powerpc/uboot/start.S
56 ↗(On Diff #66987)

Ah, it's to keep alignment (16-byte alignment is required).

This revision is now accepted and ready to land.Jan 19 2020, 4:10 AM
This revision was automatically updated to reflect the committed changes.