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, Oct 2, 5:17 PM
Unknown Object (File)
Thu, Oct 1, 3:16 PM
Unknown Object (File)
Fri, Sep 25, 12:55 AM
Unknown Object (File)
Tue, Sep 22, 9:27 PM
Unknown Object (File)
Fri, Sep 11, 2:20 PM
Unknown Object (File)
Thu, Sep 10, 10:29 PM
Unknown Object (File)
Wed, Sep 9, 7:37 PM
Unknown Object (File)
Sep 6 2026, 1:29 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.