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)
Wed, Mar 12, 1:03 PM
Unknown Object (File)
Fri, Mar 7, 3:32 PM
Unknown Object (File)
Fri, Mar 7, 7:10 AM
Unknown Object (File)
Wed, Mar 5, 2:31 AM
Unknown Object (File)
Tue, Mar 4, 12:17 PM
Unknown Object (File)
Mon, Mar 3, 6:07 PM
Unknown Object (File)
Sat, Mar 1, 8:19 AM
Unknown Object (File)
Fri, Feb 28, 1:41 PM
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 Not Applicable
Unit
Tests Not Applicable