lib: sbi: Detect menvcfg CSR at boot time
authorAtish Patra <atishp@rivosinc.com>
Tue, 29 Mar 2022 13:55:36 +0000 (19:25 +0530)
committerAnup Patel <anup@brainfault.org>
Tue, 5 Apr 2022 03:20:48 +0000 (08:50 +0530)
commit31fecad46d1461c3bc6a4ef6d6aa461a19c1d78e
tree83d18d3e99399a7cc14a3d8650d881e1351bb70d
parent722f80d8e994c0fd9b72780259e7ed27893cc704
lib: sbi: Detect menvcfg CSR at boot time

We add the menvcfg CSR as a HART feature and detect it at boot time
using traping mechanism.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
include/sbi/sbi_hart.h
lib/sbi/sbi_hart.c