From 7993ca2c8e092428eb59febea13a31659450850c Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Wed, 6 May 2020 13:35:00 +0530 Subject: [PATCH] include: sbi: Remove redundant page table related defines We don't have page table programming in OpenSBI so let's remove redundant page table related defines from riscv_encoding.h. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- include/sbi/riscv_encoding.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h index 8c3e6f16..674e9b93 100644 --- a/include/sbi/riscv_encoding.h +++ b/include/sbi/riscv_encoding.h @@ -123,35 +123,15 @@ #define PMP_SHIFT 2 #define PMP_COUNT 16 -/* page table entry (PTE) fields */ -#define PTE_V _UL(0x001) /* Valid */ -#define PTE_R _UL(0x002) /* Read */ -#define PTE_W _UL(0x004) /* Write */ -#define PTE_X _UL(0x008) /* Execute */ -#define PTE_U _UL(0x010) /* User */ -#define PTE_G _UL(0x020) /* Global */ -#define PTE_A _UL(0x040) /* Accessed */ -#define PTE_D _UL(0x080) /* Dirty */ -#define PTE_SOFT _UL(0x300) /* Reserved for Software */ - -#define PTE_PPN_SHIFT 10 - -#define PTE_TABLE(PTE) \ - (((PTE) & (PTE_V | PTE_R | PTE_W | PTE_X)) == PTE_V) - #if __riscv_xlen == 64 #define MSTATUS_SD MSTATUS64_SD #define SSTATUS_SD SSTATUS64_SD -#define RISCV_PGLEVEL_BITS 9 #define SATP_MODE SATP64_MODE #else #define MSTATUS_SD MSTATUS32_SD #define SSTATUS_SD SSTATUS32_SD -#define RISCV_PGLEVEL_BITS 10 #define SATP_MODE SATP32_MODE #endif -#define RISCV_PGSHIFT 12 -#define RISCV_PGSIZE (1 << RISCV_PGSHIFT) #define CSR_USTATUS 0x0 #define CSR_FFLAGS 0x1