HomeFreeBSD

riscv/stand: pass boot hart in loader metadata

Description

riscv/stand: pass boot hart in loader metadata

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.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48887

Details

Provenance
mhorneAuthored on Mon, Mar 3, 3:47 PM
Differential Revision
D48887: riscv/stand: pass boot hart in loader metadata
Parents
rG62c0997d4317: efiprot.h: add definitions for RISCV_EFI_BOOT_PROTOCOL
Branches
Unknown
Tags
Unknown