summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-04-16 03:45:28 +0000
committeralc <alc@FreeBSD.org>2004-04-16 03:45:28 +0000
commitc4d18d39a4f98928920f201d8d4ed05f43bd33e7 (patch)
treebdee0d82996fa9cf4ac08f6eaaba73ccef014644
parentf928512a2b8ef04ebab4b8686531ca6373413171 (diff)
downloadFreeBSD-src-c4d18d39a4f98928920f201d8d4ed05f43bd33e7.zip
FreeBSD-src-c4d18d39a4f98928920f201d8d4ed05f43bd33e7.tar.gz
Set the "global" attribute on the page table entries for the kernel and
direct mappings. This shaves a few seconds off of my buildworld times. Discussed with: peter@
-rw-r--r--sys/amd64/amd64/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index dd2cf7e..f918384 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -384,7 +384,7 @@ create_pagetables(void)
/* XXX not fully used, underneath 2M pages */
for (i = 0; (i << PAGE_SHIFT) < avail_start; i++) {
((pt_entry_t *)KPTphys)[i] = i << PAGE_SHIFT;
- ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V;
+ ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V | PG_G;
}
/* Now map the page tables at their location within PTmap */
@@ -397,7 +397,7 @@ create_pagetables(void)
/* This replaces some of the KPTphys entries above */
for (i = 0; (i << PDRSHIFT) < avail_start; i++) {
((pd_entry_t *)KPDphys)[i] = i << PDRSHIFT;
- ((pd_entry_t *)KPDphys)[i] |= PG_RW | PG_V | PG_PS;
+ ((pd_entry_t *)KPDphys)[i] |= PG_RW | PG_V | PG_PS | PG_G;
}
/* And connect up the PD to the PDP */
@@ -410,7 +410,7 @@ create_pagetables(void)
/* Now set up the direct map space using 2MB pages */
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;
+ ((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS | PG_G;
}
/* And the direct map space's PDP */
OpenPOWER on IntegriCloud