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
F102988059: D45324.id140048.diff
Tue, Nov 19, 12:52 PM
F102981528: D45324.diff
Tue, Nov 19, 11:05 AM
Unknown Object (File)
Oct 18 2024, 8:10 AM
Unknown Object (File)
Oct 8 2024, 8:23 AM
Unknown Object (File)
Oct 4 2024, 1:33 PM
Unknown Object (File)
Oct 4 2024, 3:40 AM
Unknown Object (File)
Oct 4 2024, 12:55 AM
Unknown Object (File)
Oct 1 2024, 1:45 PM
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.