summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lin <[email protected]>2024-07-30 17:30:22 +0800
committerAnup Patel <[email protected]>2024-08-02 08:53:17 +0530
commit778949eeb8f36e01c37cb3ae6d82b0660a1bf6f7 (patch)
tree434cc21a8b9d84281d47f1b0c1b3f8e1e55e469d
parent65a3938fadc537af178c84a349ade31ec6a70846 (diff)
include: Adjust Sscofpmf mhpmevent mask for upper 8 bits
Currently, OpenSBI reserves the upper 16 bits in mhpmevent for the Sscofpmf extension. However, according to the Sscofpmf extension specification[1], it only defines the upper 8 bits in mhpmevent for privilege mode inhibit and counter overflow disable. Other bits are defined by the platform for event selection. Since vendors might define raw event encoding exceeding 48 bits in mhpmevent, we should adjust the MHPMEVENT_SSCOF_MASK to support it. Link: https://github.com/riscvarchive/riscv-count-overflow [1] Signed-off-by: Eric Lin <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--include/sbi/riscv_encoding.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
index 477fa3a1..2ed05f24 100644
--- a/include/sbi/riscv_encoding.h
+++ b/include/sbi/riscv_encoding.h
@@ -207,7 +207,7 @@
#endif
-#define MHPMEVENT_SSCOF_MASK _ULL(0xFFFF000000000000)
+#define MHPMEVENT_SSCOF_MASK _ULL(0xFF00000000000000)
#define ENVCFG_STCE (_ULL(1) << 63)
#define ENVCFG_PBMTE (_ULL(1) << 62)