Page MenuHomeFreeBSD

arm64: Support changing the DMAP memory type
ClosedPublic

Authored by andrew on Mar 19 2026, 4:05 PM.
Tags
None
Referenced Files
F174147532: D55949.diff
Wed, Sep 30, 10:31 PM
Unknown Object (File)
Wed, Sep 30, 12:43 AM
Unknown Object (File)
Tue, Sep 29, 9:30 PM
Unknown Object (File)
Tue, Sep 29, 8:48 PM
Unknown Object (File)
Tue, Sep 29, 6:20 PM
Unknown Object (File)
Sun, Sep 27, 10:02 PM
Unknown Object (File)
Fri, Sep 25, 8:14 PM
Unknown Object (File)
Thu, Sep 24, 4:10 PM
Subscribers

Details

Summary

When MTE is enabled we will use the DMAP to manage tags. To be able to
read/write them we need to change the memory attribute to
VM_MEMATTR_TAGGED.

Support changing the DMAP memory type to values known to have
equivalent cache properties.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/arm64/pmap.c
8382–8386

Please update this comment.

8520

Can the comment please explain why this is necessary?

8533

Suppose we update a range with mode == VM_MEMATTR_WRITE_BACK, and dmap_attr != VM_MEMATTR_WRITE_BACK. Then, a subsequent update of the same range with old_mode == VM_MEMATTR_WRITE_BACK will not update the DMAP entries, which seems like a bug.

sys/arm64/arm64/pmap.c
8533

The only way we can currently get here with old_mode != -1 is through pmap_change_dmap_attr so will have old_mode == dmap_attr so the memory will be updated.

If we find other uses for old_mode then we may need to be smarter about handling old_mode for DMAP regions.

This revision was not accepted when it landed; it landed in state Needs Review.May 27 2026, 3:24 PM
This revision was automatically updated to reflect the committed changes.