wip commit

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2020-01-24 11:34:56 +08:00
parent 95951535e4
commit a06bd2aa0e
12 changed files with 145 additions and 101 deletions

10
asm.S
View File

@ -9,12 +9,20 @@
#endif
#define REGBYTES (1 << LOG_REGBYTES)
.global enable_mmu
.global return_from_interrupt
.text
enable_mmu:
la sp, _estack // Trash the stack and start over
return_from_interrupt:
la sp, _estack
mret // Return to kmain
.global flush_mmu
flush_mmu:
sfence.vma
ret
.global my_fence
.global read_satp
.text
read_satp: