Page MenuHomeFreeBSD

plic: handle renumbered harts
Needs ReviewPublic

Authored by mhorne on Tue, Oct 8, 12:52 PM.

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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 26926
Build 25230: arc lint + arc unit

Event Timeline

mhorne created this revision.Tue, Oct 8, 12:52 PM
br added a comment.Tue, Oct 8, 1:34 PM

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

mhorne added a comment.EditedTue, Oct 8, 5:17 PM
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.