Page MenuHomeFreeBSD

Limit the DMAP memory to available RAM
ClosedPublic

Authored by andrew on Apr 13 2016, 12:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 10:44 AM
Unknown Object (File)
Thu, Nov 21, 10:44 AM
Unknown Object (File)
Sep 26 2024, 4:52 PM
Unknown Object (File)
Sep 24 2024, 4:02 AM
Unknown Object (File)
Sep 23 2024, 4:15 PM
Unknown Object (File)
Sep 23 2024, 11:23 AM
Unknown Object (File)
Sep 22 2024, 7:28 PM
Unknown Object (File)
Sep 20 2024, 11:01 PM
Subscribers

Details

Summary

Set the upper limit of the DMAP region to the limit of RAM as was found in
the physmap. This will reduce the likelihood of an issue where we have
device memory mapped in the DMAP. This can only happen if it is within the
same 1G block of normal memory.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3243
Build 3276: arc lint + arc unit

Event Timeline

andrew retitled this revision from to Limit the DMAP memory to available RAM.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added a reviewer: kib.
andrew added a subscriber: emaste.
kib edited edge metadata.

This only stops DMAP at L1 block granularity, right ? It still would be good to fine split the mapping of tail of DMAP region.

sys/arm64/arm64/pmap.c
563

You can rewrite the loop condition as va < DMAP_MAX_ADDRESS && pa < max_pa. At least for me, it is cleaner when unneeded breaks do not hide loop conditions.

This revision is now accepted and ready to land.Apr 13 2016, 8:06 PM
In D5938#126678, @kib wrote:

This only stops DMAP at L1 block granularity, right ? It still would be good to fine split the mapping of tail of DMAP region.

Correct. I think it would be unlikely for an SoC to put device memory this close to the end of RAM, however we could add a warning when we map device data under INVARIANTS to check for this.

This revision was automatically updated to reflect the committed changes.