diff options
Diffstat (limited to 'sys/arch/amd64/cpu/mp.c')
| -rw-r--r-- | sys/arch/amd64/cpu/mp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/arch/amd64/cpu/mp.c b/sys/arch/amd64/cpu/mp.c index ea36829..ddd4d8a 100644 --- a/sys/arch/amd64/cpu/mp.c +++ b/sys/arch/amd64/cpu/mp.c @@ -42,6 +42,7 @@ #include <md/cpu.h> #include <md/gdt.h> #include <mu/cpu.h> +#include <mu/mmu.h> #include <os/process.h> #include <os/sched.h> #include <vm/vm.h> @@ -117,6 +118,16 @@ static volatile uint32_t aps_up = 0; __section(".trampoline") static char ap_code[4096]; static void +clean_addrsp(void) +{ + struct mmu_vas old, new; + + mu_pmap_readvas(&old); + mu_pmap_forkvas(&new); + mu_pmap_writevas(&new); +} + +static void cpu_idle(struct mcb *mcb) { lapic_oneshot_usec(mcb, SCHED_QUANTUM); @@ -271,6 +282,7 @@ cpu_lm_entry(void) ); cpu_mtrr_fetch(); + clean_addrsp(); /* * Now we load all the MTRRs given to us by the BSP |
