diff options
author | alc <alc@FreeBSD.org> | 2008-07-12 18:43:57 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2008-07-12 18:43:57 +0000 |
commit | 6dd633c3c8e6e0dd2dda12490b9fb0c327f8ce32 (patch) | |
tree | 62f34537022bf06c79337563c9b447962b3be85d /sys/amd64 | |
parent | 06d61c0567335736118743088f633e9a696ae0c1 (diff) | |
download | FreeBSD-src-6dd633c3c8e6e0dd2dda12490b9fb0c327f8ce32.zip FreeBSD-src-6dd633c3c8e6e0dd2dda12490b9fb0c327f8ce32.tar.gz |
In order to apply pmap_demote_pde() to a page directory entry (PDE) from the
direct map, the PDE must have PG_M and PG_A preset.
Noticed by: Magesh Dhasayyan
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 64aad36..c137cbc 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -466,11 +466,12 @@ create_pagetables(vm_paddr_t *firstaddr) } /* Now set up the direct map space using either 2MB or 1GB pages */ + /* Preset PG_M and PG_A because demotion expects it */ if ((amd_feature & AMDID_PAGE1GB) == 0) { for (i = 0; i < NPDEPG * ndmpdp; i++) { ((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT; ((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS | - PG_G; + PG_G | PG_M | PG_A; } /* And the direct map space's PDP */ for (i = 0; i < ndmpdp; i++) { @@ -483,7 +484,7 @@ create_pagetables(vm_paddr_t *firstaddr) ((pdp_entry_t *)DMPDPphys)[i] = (vm_paddr_t)i << PDPSHIFT; ((pdp_entry_t *)DMPDPphys)[i] |= PG_RW | PG_V | PG_PS | - PG_G; + PG_G | PG_M | PG_A; } } |