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
Unknown Object (File)
Fri, Dec 13, 2:15 PM
Unknown Object (File)
Wed, Nov 27, 1:21 PM
Unknown Object (File)
Nov 4 2024, 10:05 PM
Unknown Object (File)
Nov 4 2024, 10:05 PM
Unknown Object (File)
Nov 4 2024, 10:05 PM
Unknown Object (File)
Nov 4 2024, 10:01 PM
Unknown Object (File)
Nov 4 2024, 10:01 PM
Unknown Object (File)
Nov 4 2024, 9:51 PM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rework the change as discussed with royger.

Michael, please retest.

LGTM, just one nit.

sys/amd64/amd64/mp_machdep.c
125 ↗(On Diff #43364)

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.