Page MenuHomeFreeBSD

plic: handle renumbered harts
AbandonedPublic

Authored by mhorne on Oct 8 2019, 12:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 21, 8:28 AM
Unknown Object (File)
Fri, Nov 21, 12:05 AM
Unknown Object (File)
Fri, Nov 21, 12:02 AM
Unknown Object (File)
Thu, Nov 20, 11:58 PM
Unknown Object (File)
Wed, Nov 19, 7:09 AM
Unknown Object (File)
Mon, Nov 17, 3:30 PM
Unknown Object (File)
Thu, Nov 13, 5:00 AM
Unknown Object (File)
Oct 24 2025, 6:38 AM
Subscribers

Details

Reviewers
markj
br
kp
Summary

RISC-V harts may be renumbered during boot depending on the system's
configuration. For example, on the Hifive Unleashed hart 0 is a monitor
hart that never enters supervisor mode. Record the mapping of cpuid to
hart number, so that we can use the original hart value for cases where
they are not 1-to-1.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26926
Build 25230: arc lint + arc unit

Event Timeline

hart ID is recorded to pcpup->pc_hart. Could it be used ? i.e. PCPU_GET(hart) or pcpu_find(cpu)->pc_hart

In D21940#479242, @br wrote:

hart ID is recorded to pcpup->pc_hart. Could it be used ? i.e. PCPU_GET(hart) or pcpu_find(cpu)->pc_hart

Thanks, this is what I wanted but I had trouble finding the right function for it. I'll update it later this evening to use this instead.

This is now irrelevant after the rework of D21927.