Page MenuHomeFreeBSD

riscv/stand: pass boot hart in loader metadata
ClosedPublic

Authored by mhorne on Feb 7 2025, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 25, 1:37 AM
Unknown Object (File)
Mon, Oct 13, 12:25 PM
Unknown Object (File)
Sep 19 2025, 5:27 PM
Unknown Object (File)
Sep 17 2025, 6:15 AM
Unknown Object (File)
Sep 16 2025, 4:38 AM
Unknown Object (File)
Sep 16 2025, 4:38 AM
Unknown Object (File)
Sep 15 2025, 8:20 AM
Unknown Object (File)
Sep 10 2025, 2:10 AM
Subscribers

Details

Summary

Use the RISCV_EFI_BOOT_PROTOCOL to fetch the boot hart ID, and
communicate this to the kernel via new metadata field
(MODINFOMD_BOOT_HART).

If the boot hart is not found this way, fall back to the (now
deprecated) device-tree method.

The assumption that a hart ID can be represented with a 32-bit unsigned
integer is unchanged in the kernel, but from the loader we pass the full
64-bit value. This ensures that this API won't need to change in the
future, should the wider value become necessary.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62293
Build 59177: arc lint + arc unit