Browse Source

replace `spbtr` with `satp`

The LLVM IAS currently does not support the older spelling for the CSR.
Update the references to the modern name.
pull/241/head
Saleem Abdulrasool 5 years ago
parent
commit
1b4dc9d8fd
  1. 2
      machine/minit.c
  2. 2
      pk/mmap.c

2
machine/minit.c

@ -46,7 +46,7 @@ static void mstatus_init()
// Disable paging
if (supports_extension('S'))
write_csr(sptbr, 0);
write_csr(satp, 0);
}
// send S-mode interrupts and most exceptions straight to S-mode

2
pk/mmap.c

@ -560,7 +560,7 @@ uintptr_t pk_vm_init()
__map_kernel_range(KVA_START, MEM_START, mem_size, PROT_READ|PROT_WRITE|PROT_EXEC);
flush_tlb();
write_csr(sptbr, ((uintptr_t)root_page_table >> RISCV_PGSHIFT) | SATP_MODE_CHOICE);
write_csr(satp, ((uintptr_t)root_page_table >> RISCV_PGSHIFT) | SATP_MODE_CHOICE);
uintptr_t kernel_stack_top = __page_alloc_assert() + RISCV_PGSIZE;

Loading…
Cancel
Save