diff options
author | Robert Morris <[email protected]> | 2019-06-05 14:05:46 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2019-06-05 14:05:46 -0400 |
commit | 31136437684b5987ef46f4c6947940cf96de75b3 (patch) | |
tree | 3c89b1f0e12bbddbf307259326ecb5f763ba6e09 /vm.c | |
parent | f1a727b971a59bab6025b4c4111342c27356ca40 (diff) | |
download | xv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.tar.gz xv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.tar.bz2 xv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.zip |
spinlocks using gcc intrinsics
push_off() / pop_off()
set up per-hart plic stuff so all harts get device interrupts
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -54,9 +54,13 @@ kvminit() // the highest virtual address in the kernel. mappages(kernel_pagetable, TRAMPOLINE, PGSIZE, (uint64)trampout, PTE_R | PTE_X); +} - // Switch h/w page table register to the kernel's page table, - // and enable paging. +// Switch h/w page table register to the kernel's page table, +// and enable paging. +void +kvminithart() +{ w_satp(MAKE_SATP(kernel_pagetable)); } |