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)
Mon, Sep 30, 11:16 AM
Unknown Object (File)
Fri, Sep 27, 1:08 PM
Unknown Object (File)
Thu, Sep 19, 9:48 PM
Unknown Object (File)
Wed, Sep 18, 1:49 AM
Unknown Object (File)
Sun, Sep 8, 11:03 PM
Unknown Object (File)
Sat, Sep 7, 3:50 PM
Unknown Object (File)
Sat, Sep 7, 11:12 AM
Unknown Object (File)
Sep 2 2024, 2:18 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.