diff options
author | jake <jake@FreeBSD.org> | 2003-02-24 00:39:50 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-02-24 00:39:50 +0000 |
commit | 5c99d4e5446dab4e983dd25f70a193f29cdc9b35 (patch) | |
tree | 66a618dd51f3964a0565363bc108985a51e0cc03 /sys | |
parent | 5bd49ab3829a8bbc375bf4df415a2faac009e6bc (diff) | |
download | FreeBSD-src-5c99d4e5446dab4e983dd25f70a193f29cdc9b35.zip FreeBSD-src-5c99d4e5446dab4e983dd25f70a193f29cdc9b35.tar.gz |
Use the direct mapping of IdlePTD setup in locore for proc0's page directory,
instead of allocating another page of kva and mapping it in again. This was
likely an oversight in revision 1.174 (cut and paste from pmap_pinit).
Discussed with: peter, tegge
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 10 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index e5b8a7c..8d6df39 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1255,14 +1255,8 @@ void pmap_pinit0(pmap) struct pmap *pmap; { - pmap->pm_pdir = - (pd_entry_t *)kmem_alloc_pageable(kernel_map, PAGE_SIZE); - pmap_kenter((vm_offset_t)pmap->pm_pdir, (vm_offset_t)IdlePTD); -#ifndef I386_CPU - invlpg((vm_offset_t)pmap->pm_pdir); -#else - invltlb(); -#endif + + pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvlist); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index e5b8a7c..8d6df39 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1255,14 +1255,8 @@ void pmap_pinit0(pmap) struct pmap *pmap; { - pmap->pm_pdir = - (pd_entry_t *)kmem_alloc_pageable(kernel_map, PAGE_SIZE); - pmap_kenter((vm_offset_t)pmap->pm_pdir, (vm_offset_t)IdlePTD); -#ifndef I386_CPU - invlpg((vm_offset_t)pmap->pm_pdir); -#else - invltlb(); -#endif + + pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvlist); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); |