Page MenuHomeFreeBSD

Account for dmap limit when selecting the pages for the bootstrap pagetables.
ClosedPublic

Authored by kib on Jun 6 2018, 2:44 PM.
Tags
None
Referenced Files
F83040268: D15675.diff
Sun, May 5, 10:16 AM
Unknown Object (File)
Fri, Apr 26, 11:08 PM
Unknown Object (File)
Fri, Apr 26, 11:08 PM
Unknown Object (File)
Fri, Apr 26, 11:08 PM
Unknown Object (File)
Fri, Apr 26, 11:08 PM
Unknown Object (File)
Fri, Apr 26, 11:07 PM
Unknown Object (File)
Fri, Apr 26, 9:15 PM
Unknown Object (File)
Mar 13 2024, 7:41 AM
Subscribers

Details

Summary

physmap[] can be inconsistent with the physical memory limit due to buggy bios, or to the hw.physmem tunable. Since bootstrap pagetables are initialized by accesses through the DMAP, we must ensure that DMAP really cover the selected pages. This is only relevant when machine has less than 4G RAM and buggy BIOS, which is the combination on Acer Chromebook 720.

An alternative could be to always cover 4G for DMAP, but this change seems to be simpler.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Rework the change as discussed with royger.

Michael, please retest.

LGTM, just one nit.

sys/amd64/amd64/mp_machdep.c
125

I would use 'physmap[i + 1] > Maxmem', to make sure that all the pages used to build the page tables are below Maxmem, not just the initial one.

This revision is now accepted and ready to land.Jun 6 2018, 3:31 PM
This revision now requires review to proceed.Jun 6 2018, 3:35 PM
This revision is now accepted and ready to land.Jun 6 2018, 3:50 PM

@kib Updated by tree to r334733 and applied the patch, it's working as expected, thanks!

This revision was automatically updated to reflect the committed changes.