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
Unknown Object (File)
Wed, Jul 10, 6:05 PM
Unknown Object (File)
Sat, Jul 6, 8:37 PM
Unknown Object (File)
Sat, Jul 6, 8:37 PM
Unknown Object (File)
Sat, Jul 6, 8:37 PM
Unknown Object (File)
Thu, Jun 27, 8:55 PM
Unknown Object (File)
Wed, Jun 26, 3:22 AM
Unknown Object (File)
Sun, Jun 23, 2:39 PM
Unknown Object (File)
Thu, Jun 20, 7:09 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.