diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-26 12:42:01 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-26 12:42:01 +0300 |
| commit | 5c335752c4fb7e472d68b2b2731c3674a10cbd97 (patch) | |
| tree | 9339ea883b640c177e699a98aae9601a04310258 /arch/riscv/init | |
| parent | 7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81 (diff) | |
| download | kmi-5c335752c4fb7e472d68b2b2731c3674a10cbd97.tar.gz kmi-5c335752c4fb7e472d68b2b2731c3674a10cbd97.zip | |
Identified issue with vmem implementation
+ Sensible mappings should help, discard what I wrote in the previous
commit. Nothing works unless I get vmem up and running properly.
Diffstat (limited to 'arch/riscv/init')
| -rw-r--r-- | arch/riscv/init/init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/init/init.c b/arch/riscv/init/init.c index 9b7d371..721712c 100644 --- a/arch/riscv/init/init.c +++ b/arch/riscv/init/init.c @@ -244,8 +244,6 @@ struct vm_branch_t *prepare_vmem() /* map root pte */ map_vmem(branch, (pm_t)branch, ROOT_PTE, VM_R | VM_W | VM_V, MM_KPAGE); - map_vmem(branch, 0x10000000, 0x10000000, VM_R | VM_W | VM_V, MM_KPAGE); - /* TODO: map more stuff? */ return branch; } @@ -276,6 +274,7 @@ void start_vmem(void *fdt, struct vm_branch_t *branch) else csr_write(CSR_SATP, SATP_MODE_Sv48 | pm_to_pnum((pm_t)(branch))); + __asm__ ("sfence.vma" : : : "memory"); /* Sv57 && Sv64 in the future? */ } |
