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, Feb 7, 12:51 PM
Unknown Object (File)
Sun, Feb 2, 5:39 AM
Unknown Object (File)
Thu, Jan 30, 9:47 AM
Unknown Object (File)
Jan 13 2025, 10:07 AM
Unknown Object (File)
Jan 13 2025, 6:32 AM
Unknown Object (File)
Dec 14 2024, 1:00 AM
Unknown Object (File)
Dec 12 2024, 11:26 PM
Unknown Object (File)
Dec 2 2024, 3:14 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 Skipped
Unit
Tests Skipped

Event Timeline

stand/powerpc/uboot/start.S
56

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

jhibbits added inline comments.
stand/powerpc/uboot/start.S
56

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.