Page MenuHomeFreeBSD

arm64: Make shareability attributes dynamic
ClosedPublic

Authored by andrew on Aug 21 2024, 12:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 4:47 AM
Unknown Object (File)
Wed, Oct 2, 5:50 PM
Unknown Object (File)
Sep 21 2024, 6:11 PM
Unknown Object (File)
Sep 21 2024, 12:35 PM
Unknown Object (File)
Sep 21 2024, 11:34 AM
Unknown Object (File)
Sep 21 2024, 11:34 AM
Unknown Object (File)
Sep 21 2024, 9:58 AM
Unknown Object (File)
Sep 10 2024, 8:58 PM
Subscribers

Details

Summary

When LPA2 is enabled the shareability attribute in the page table are
replaces with output address bits. To support a larger physical address
space make this attribute dynamic so we only set it when appropriate.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59122
Build 56009: arc lint + arc unit

Event Timeline

sys/arm64/include/pte.h
114

Why not include pmap_sh_attr here?

sys/arm64/include/pte.h
114

We can't because it's used in locore.S

sys/arm64/arm64/pmap.c
358

Again, should it be __read_mostly?

sys/arm64/include/pte.h
114

At this point, where ATTR_DEFAULT is simply ATTR_AF, I'm going to argue for its elimination. Instead, put ATTR_AF in its place. There are places where we construct the mapping with ATTR_DEFAULT, then later clear ATTR_AF. Instead, these could simply not set ATTR_AF in the first place, and only set it if the mapping is unmanaged.

  • Rebase on D46466
  • Add __read_mostly
  • Set VTCR_EL2.DS as stage 2 tables are also affected
andrew retitled this revision from arm64: Move ATTR_SH_IS out of ATTR_DEFAULT to arm64: Make shareability attributes dynamic.Aug 29 2024, 12:49 PM
andrew edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 30 2024, 9:26 PM
This revision was automatically updated to reflect the committed changes.