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)
Tue, Sep 10, 8:58 PM
Unknown Object (File)
Sun, Sep 8, 1:49 PM
Unknown Object (File)
Sun, Sep 8, 2:39 AM
Unknown Object (File)
Sat, Sep 7, 4:31 AM
Unknown Object (File)
Thu, Sep 5, 12:45 PM
Unknown Object (File)
Wed, Sep 4, 8:41 AM
Unknown Object (File)
Mon, Sep 2, 12:40 AM
Unknown Object (File)
Fri, Aug 30, 10:35 AM
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/include/pte.h
114 ↗(On Diff #142300)

Why not include pmap_sh_attr here?

sys/arm64/include/pte.h
114 ↗(On Diff #142300)

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 ↗(On Diff #142300)

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.Thu, Aug 29, 12:49 PM
andrew edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Fri, Aug 30, 9:26 PM
This revision was automatically updated to reflect the committed changes.