Page MenuHomeFreeBSD

Various arm64 pmap changes, including two fixes
ClosedPublic

Authored by alc on Jul 19 2019, 6:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 2 2024, 5:45 AM
Unknown Object (File)
Jan 24 2024, 7:14 AM
Unknown Object (File)
Dec 23 2023, 12:03 AM
Unknown Object (File)
Dec 17 2023, 7:23 AM
Unknown Object (File)
Dec 3 2023, 9:22 PM
Unknown Object (File)
Nov 8 2023, 8:31 AM
Unknown Object (File)
Nov 5 2023, 4:41 PM
Unknown Object (File)
Oct 11 2023, 2:54 PM
Subscribers

Details

Summary

Introduce pmap_store(), and use it to replace pmap_load_store() in places where the page table entry was previously invalid. (Note that I did not replace pmap_load_store() when it was followed by a TLB invalidation, even if we are not using the return value from pmap_load_store().)

Correct an error in pmap_enter(). A test for determining when to set PGA_WRITEABLE was always true, even if the mapping was read only.

In pmap_enter_l2(), when replacing an empty kernel page table page by a superpage mapping, clear the old l2 entry and issue a TLB invalidation. My reading of the architecture manual leads me to believe that the TLB could hold an intermediate entry referencing the empty kernel page table page even though it contains no valid mappings.

Replace a couple direct uses of atomic_clear_64() by the new pmap_clear_bits().

In a couple comments, replace the term "paging-structure caches", which is an Intel-specific term for the caches that hold intermediate entries in the page table, with wording that is more consistent with the ARM architecture manual.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc retitled this revision from Various arm64 pmap changes, including one fix to pmap_enter_l2() to Various arm64 pmap changes, including two fixes.
alc edited the summary of this revision. (Show Details)

Correct an error in pmap_enter(). A test for determining when to set PGA_WRITEABLE was always true, even if the mapping was read only.

arm64/arm64/pmap.c
3308–3309 ↗(On Diff #59967)

I believe that this expression is always true, because we are using ATTR_AP(ATTR_AP_RW) as the mask, and so we would always set PGA_WRITEABLE on the page.

markj added inline comments.
arm64/arm64/pmap.c
327 ↗(On Diff #59967)

Should this be an atomic_load_64() for consistency if nothing else?

This revision is now accepted and ready to land.Jul 20 2019, 8:29 PM
arm64/arm64/pmap.c
327 ↗(On Diff #59967)

I thought about that and decided not to. The reason being that atomic_load_64() includes a cast with the volatile attribute. In other words, it's not a purely stylistic change.