sbi: sbi_domain_context: Check privilege spec version before accessing S-mode CSRs
SCOUNTEREN and SENVCFG may not be supported on certain RISC-V core, so check the existence of these CSRs via privilege spec version to prevent illegal instructions. Signed-off-by:Yu Chien Peter Lin <peterlin@andestech.com> Signed-off-by:
Alvin Chang <alvinga@andestech.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
parent
7862c244
Please register or sign in to comment