Skip to content

Commit 778949e

Browse files
dslin1010avpatel
authored andcommitted
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]>
1 parent 65a3938 commit 778949e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/sbi/riscv_encoding.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207

208208
#endif
209209

210-
#define MHPMEVENT_SSCOF_MASK _ULL(0xFFFF000000000000)
210+
#define MHPMEVENT_SSCOF_MASK _ULL(0xFF00000000000000)
211211

212212
#define ENVCFG_STCE (_ULL(1) << 63)
213213
#define ENVCFG_PBMTE (_ULL(1) << 62)

0 commit comments

Comments
 (0)