diff options
author | AlmuHS <almuhs@github.com> | 2019-10-03 16:44:01 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-10-03 16:44:24 +0200 |
commit | 232962cf4f6551b99057d68219564fc275882228 (patch) | |
tree | 13ab7781e2cf1ffabe50549d657aa55f36e0ecbc | |
parent | 074eebb940b51767fd8b02c9db2cac592bc5dca4 (diff) |
fix: disable paging temporary mapping even if ncpu = 1
-rw-r--r-- | i386/i386at/model_dep.c | 9 |
1 files 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 |