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)
Fri, Nov 15, 6:07 PM
Unknown Object (File)
Oct 15 2024, 12:19 AM
Unknown Object (File)
Sep 30 2024, 11:16 AM
Unknown Object (File)
Sep 27 2024, 1:08 PM
Unknown Object (File)
Sep 19 2024, 9:48 PM
Unknown Object (File)
Sep 18 2024, 1:49 AM
Unknown Object (File)
Sep 8 2024, 11:03 PM
Unknown Object (File)
Sep 7 2024, 3:50 PM
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.