summaryrefslogtreecommitdiff
path: root/i386/i386/mp_desc.c
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-06-27 18:47:47 +0200
committerAlmuHS <almuhs@github.com>2019-06-27 18:47:47 +0200
commite0603719902c282f98dd60ecffdf1dc9c7b1a738 (patch)
tree1f6c385dd52828be027085216a98f6b080b759ff /i386/i386/mp_desc.c
parent651e65e124c2b124a41c094f78cfe9f9a6b100b5 (diff)
experiment: get rid of temporary direct mapping after start AP
Diffstat (limited to 'i386/i386/mp_desc.c')
-rw-r--r--i386/i386/mp_desc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c
index c1dac103..e55b7500 100644
--- a/i386/i386/mp_desc.c
+++ b/i386/i386/mp_desc.c
@@ -529,6 +529,9 @@ start_other_cpus(void)
int cpu;
vm_offset_t stack_start;
int apic_id = lapic->apic_id.r >>24;
+ extern pt_entry_t *kernel_page_dir;
+ extern int nb_direct_value;
+ int i = 0;
printf("found %d cpus\n", ncpu);
printf("The current cpu is: %d\n", cpu_number());
@@ -563,6 +566,11 @@ start_other_cpus(void)
stack_start += STACK_SIZE;
}
}
+
+ /* Get rid of the temporary direct mapping and flush it out of the TLB. */
+ for (i = 0 ; i < nb_direct_value; i++){
+ kernel_page_dir[lin2pdenum_cont(INIT_VM_MIN_KERNEL_ADDRESS) + i] = 0;
+ }
}
#endif /* NCPUS > 1 */