Page MenuHomeFreeBSD

riscv: Construct an identity map in locore.S
ClosedPublic

Authored by mhorne on May 23 2024, 7:52 PM.
Tags
None
Referenced Files
F97865808: D45324.id140048.diff
Tue, Oct 1, 1:45 PM
Unknown Object (File)
Sun, Sep 29, 10:39 PM
Unknown Object (File)
Fri, Sep 27, 11:54 PM
Unknown Object (File)
Fri, Sep 27, 6:49 AM
Unknown Object (File)
Fri, Sep 27, 4:08 AM
Unknown Object (File)
Tue, Sep 24, 5:09 AM
Unknown Object (File)
Mon, Sep 23, 7:42 PM
Unknown Object (File)
Sun, Sep 22, 1:15 AM
Subscribers

Details

Summary

This is useful for two reasons. Within this change, it allows the
early DTB mapping to be eliminated, as we can now just dereference the
physical address provided by FW and copy the DTB contents into KVA.

It will also aid in an upcoming change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/riscv/riscv/locore.S
124

A more elaborate comment would be helpful:

  • When is this map used?
  • Is the mapping temporary? If so, when is it removed?
  • What does it cover?
sys/riscv/riscv/pmap.c
699

Do you still need this fence? It looks like belongs in pmap_bootstrap_l3().

sys/riscv/riscv/locore.S
124

I see that you do this in a follow-up commit.

mhorne added inline comments.
sys/riscv/riscv/pmap.c
699

Agreed, it is odd here, but precedes the addition of the code I am removing.

It would be better to check the usage of this fence in the later reworking of pmap_bootstrap(), D45327.

This change is essentially part of that rework, and although I separated it for the sake of review, the split is imperfect.

markj added inline comments.
sys/riscv/riscv/locore.S
130
This revision is now accepted and ready to land.May 27 2024, 3:11 PM
mhorne marked an inline comment as done.

Add assembly commentary here, not in the later patch.

This revision now requires review to proceed.Jun 3 2024, 6:39 PM
mhorne retitled this revision from Construct an identity map in locore.S to riscv: Construct an identity map in locore.S.Jun 3 2024, 6:41 PM
This revision is now accepted and ready to land.Jun 6 2024, 5:21 PM
This revision was automatically updated to reflect the committed changes.