Page MenuHomeFreeBSD

Fix pmap_change_attr() on arm64 to allow KV addresses

Authored by on Oct 16 2019, 11:22 AM.



Altough in the comment above the pmap_change_attr() it was mentioned
that VA could be in KV or DMAP memory space. However,
pmap_change_attr_locked() was accepting only the values inside the DMAP
memory range.

To fix that, the condition check was changed so also the va inside the
KV memory range would be accepted.

The sample use case that wasn't supported is the PCI Device that has the
BAR which should me mapped with the Write Combine attribute - for
example BAR2 of the ENA network controller on the A1 instances on AWS.

Submitted by: Michal Krawczyk <>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

Test Plan

Tested on A1 AWS instance and changed ENA BAR2 mapped resource to be write combined memory region

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Thu, Oct 31, 3:16 PM
This revision was automatically updated to reflect the committed changes.