* riscv64/riscv64/pmap.h: Remove RISCV_PT_SHIFT (PAGE_SHIFT already covers this). * riscv64/include/mach/riscv64/exception.h: Add EXC_RISCV64_ECALL_S, EXC_RISCV64_I_PAGEFAULT, EXC_RISCV64_L_PAGEFAULT, EXC_RISCV64_S_PAGEFAULT. --- riscv64/include/mach/riscv64/exception.h | 4 ++++ riscv64/riscv64/pmap.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/riscv64/include/mach/riscv64/exception.h b/riscv64/include/mach/riscv64/exception.h index 3a5cc95f..7a14c718 100644 --- a/riscv64/include/mach/riscv64/exception.h +++ b/riscv64/include/mach/riscv64/exception.h @@ -37,6 +37,7 @@ * EXC_SOFTWARE */ #define EXC_RISCV64_ECALL_U 8 /* ECALL from user mode */ +#define EXC_RISCV64_ECALL_S 9 /* ECALL from supervisor mode */ #define EXC_RISCV64_ECALL_M 11 /* ECALL from machine mode */ /* @@ -44,6 +45,9 @@ */ #define EXC_RISCV64_ACCESS_FAULT 1 /* Access fault */ #define EXC_RISCV64_LOAD_FAULT 5 /* Load access fault */ +#define EXC_RISCV64_I_PAGEFAULT 12 /* Instruction page fault */ +#define EXC_RISCV64_L_PAGEFAULT 13 /* Load page fault */ +#define EXC_RISCV64_S_PAGEFAULT 15 /* Store/AMO page fault */ /* * EXC_BREAKPOINT diff --git a/riscv64/riscv64/pmap.h b/riscv64/riscv64/pmap.h index 4355d297..fbb163ba 100644 --- a/riscv64/riscv64/pmap.h +++ b/riscv64/riscv64/pmap.h @@ -32,7 +32,6 @@ typedef phys_addr_t pt_entry_t; #define PT_ENTRY_NULL ((pt_entry_t *) 0) #define RISCV_PT_LEVELS 3 -#define RISCV_PT_SHIFT 12 /* 12-bit page offset */ #define RISCV_VPN_BITS 9 #define RISCV_PTE_SIZE 8 #define RISCV_PT_ENTRIES 512 -- 2.43.0
