lib: sbi: Detect Smstateen CSRs at boot-time
authorMayuresh Chitale <mchitale@ventanamicro.com>
Mon, 11 Apr 2022 03:04:10 +0000 (08:34 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 11 Apr 2022 03:04:10 +0000 (08:34 +0530)
commitd44568a0f2e6301d3ad77a48370b0bfef4bfe5a0
treee8d11a4bc4516db5f3a0537d438c1e160bdc4657
parent499601a4fff98ff258076c010c980c5dbcc0c24d
lib: sbi: Detect Smstateen CSRs at boot-time

Extend HART feature detection to discover Smstateen CSRs at boot-time
and configure mstateen envcfg bit depending on availability of
menvcfg CSR.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
include/sbi/sbi_hart.h
lib/sbi/sbi_hart.c