From 5c99d4e5446dab4e983dd25f70a193f29cdc9b35 Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 24 Feb 2003 00:39:50 +0000 Subject: [PATCH] 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 --- sys/amd64/amd64/pmap.c | 10 ++-------- 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 e5b8a7ca7537..8d6df393648e 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 e5b8a7ca7537..8d6df393648e 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);