Page MenuHomeFreeBSD

Limit the DMAP memory to available RAM
ClosedPublic

Authored by andrew on Apr 13 2016, 12:40 PM.
Tags
None
Referenced Files
F82889821: D5938.id15186.diff
Fri, May 3, 3:33 PM
Unknown Object (File)
Tue, Apr 16, 12:50 PM
Unknown Object (File)
Wed, Apr 10, 10:56 PM
Unknown Object (File)
Mar 23 2024, 1:41 AM
Unknown Object (File)
Feb 26 2024, 9:16 PM
Unknown Object (File)
Jan 15 2024, 2:44 PM
Unknown Object (File)
Jan 15 2024, 2:41 PM
Unknown Object (File)
Jan 6 2024, 10:55 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 Not Applicable
Unit
Tests Not Applicable

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

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.