forked from Mirrors/opensbi
lib: sbi: fwft: factorize menvcfg read/write
MENVCFG access will be used as well for double trap, landing pad and shadow stack fwft support. Factorize that in a common function. Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
This commit is contained in:

committed by
Anup Patel

parent
b0a7e4b853
commit
b2f77f5fa8
@@ -214,7 +214,8 @@
|
||||
|
||||
#define ENVCFG_STCE (_ULL(1) << 63)
|
||||
#define ENVCFG_PBMTE (_ULL(1) << 62)
|
||||
#define ENVCFG_ADUE (_ULL(1) << 61)
|
||||
#define ENVCFG_ADUE_SHIFT 61
|
||||
#define ENVCFG_ADUE (_ULL(1) << ENVCFG_ADUE_SHIFT)
|
||||
#define ENVCFG_CDE (_ULL(1) << 60)
|
||||
#define ENVCFG_DTE (_ULL(1) << 59)
|
||||
#define ENVCFG_PMM (_ULL(0x3) << 32)
|
||||
@@ -228,8 +229,10 @@
|
||||
#define ENVCFG_CBIE_ILL _UL(0x0)
|
||||
#define ENVCFG_CBIE_FLUSH _UL(0x1)
|
||||
#define ENVCFG_CBIE_INV _UL(0x3)
|
||||
#define ENVCFG_SSE (_UL(1) << 3)
|
||||
#define ENVCFG_LPE (_UL(1) << 2)
|
||||
#define ENVCFG_SSE_SHIFT 3
|
||||
#define ENVCFG_SSE (_UL(1) << ENVCFG_SSE_SHIFT)
|
||||
#define ENVCFG_LPE_SHIFT 2
|
||||
#define ENVCFG_LPE (_UL(1) << ENVCFG_LPE_SHIFT)
|
||||
#define ENVCFG_FIOM _UL(0x1)
|
||||
|
||||
/* ===== User-level CSRs ===== */
|
||||
|
Reference in New Issue
Block a user