From 232962cf4f6551b99057d68219564fc275882228 Mon Sep 17 00:00:00 2001 From: AlmuHS Date: Thu, 3 Oct 2019 16:44:01 +0200 Subject: fix: disable paging temporary mapping even if ncpu = 1 --- i386/i386at/model_dep.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 015f5abe..63a12036 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -528,7 +528,10 @@ i386at_init(void) #if INIT_VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS - /* Get rid of the temporary direct mapping and flush it out of the TLB. */ + /* Get rid of the temporary direct mapping and flush it out of the TLB (only if there are an only cpu). */ + +if(ncpu == 1){ + for (i = 0 ; i < nb_direct; i++) { #ifdef MACH_XEN @@ -539,11 +542,11 @@ i386at_init(void) #endif /* MACH_PSEUDO_PHYS */ printf("couldn't unmap frame %d\n", i); #else /* MACH_XEN */ - /* XXX: Uncomment*/ - //kernel_page_dir[lin2pdenum_cont(INIT_VM_MIN_KERNEL_ADDRESS) + i] = 0; + kernel_page_dir[lin2pdenum_cont(INIT_VM_MIN_KERNEL_ADDRESS) + i] = 0; #endif /* MACH_XEN */ } #endif +} /* Keep BIOS memory mapped */ #ifdef LINUX_DEV #if VM_MIN_KERNEL_ADDRESS != 0 -- cgit v1.2.3