aboutsummaryrefslogtreecommitdiff
path: root/lib/utils/cppc
diff options
context:
space:
mode:
authorChen Pei <cp0613@linux.alibaba.com>2025-11-14 19:57:22 +0800
committerAnup Patel <anup@brainfault.org>2025-12-08 11:04:06 +0530
commitb8b26fe121d08daf9158845743dcfc16a95eda6a (patch)
tree4b0edaaa64ea06a32ce6a30e4ceed37b3cf9fe79 /lib/utils/cppc
parentf71bb323f46318f933068882438b37c4cba1125e (diff)
downloadopensbi-b8b26fe121d08daf9158845743dcfc16a95eda6a.zip
opensbi-b8b26fe121d08daf9158845743dcfc16a95eda6a.tar.gz
opensbi-b8b26fe121d08daf9158845743dcfc16a95eda6a.tar.bz2
lib: sbi: Enable Ssqosid Ext using mstateen0
The QoS Identifiers extension (Ssqosid) introduces the srmcfg register, which configures a hart with two identifiers: a Resource Control ID (RCID) and a Monitoring Counter ID (MCID). These identifiers accompany each request issued by the hart to shared resource controllers. If extension Smstateen is implemented together with Ssqosid, then Ssqosid also requires the SRMCFG bit in mstateen0 to be implemented. If mstateen0.SRMCFG is 0, attempts to access srmcfg in privilege modes less privileged than M-mode raise an illegal-instruction exception. If mstateen0.SRMCFG is 1 or if extension Smstateen is not implemented, attempts to access srmcfg when V=1 raise a virtual-instruction exception. This extension can be found in the RISC-V Instruction Set Manual: https://github.com/riscv/riscv-isa-manual Changes in v5: - Remove SBI_HART_EXT_SSQOSID dependency SBI_HART_PRIV_VER_1_12 Changes in v4: - Remove extraneous parentheses around SMSTATEEN0_SRMCFG Changes in v3: - Check SBI_HART_EXT_SSQOSID when swapping SRMCFG Changes in v2: - Remove trap-n-detect - Context switch CSR_SRMCFG Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Reviewed-by: Radim Krčmář <rkrcmar@ventanamicro.com> Link: https://lore.kernel.org/r/20251114115722.1831-1-cp0613@linux.alibaba.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/cppc')
0 files changed, 0 insertions, 0 deletions