Page MenuHomeFreeBSD

arm64: Support changing the DMAP memory type
Needs ReviewPublic

Authored by andrew on Mar 19 2026, 4:05 PM.
Tags
None
Referenced Files
F153956685: D55949.id.diff
Sat, Apr 25, 2:20 AM
F153925661: D55949.id175435.diff
Fri, Apr 24, 8:37 PM
Unknown Object (File)
Sun, Apr 19, 8:52 PM
Unknown Object (File)
Sun, Apr 19, 8:52 PM
Unknown Object (File)
Sat, Apr 18, 1:25 PM
Unknown Object (File)
Sat, Apr 18, 6:07 AM
Unknown Object (File)
Mon, Apr 13, 3:42 PM
Unknown Object (File)
Sun, Apr 12, 1:00 AM
Subscribers

Details

Reviewers
manu
alc
kib
markj
Group Reviewers
arm64
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 71530
Build 68413: arc lint + arc unit

Event Timeline

sys/arm64/arm64/pmap.c
8310

Please update this comment.

8438

Can the comment please explain why this is necessary?

8450

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
8450

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.