diff options
author | Heiko Stuebner <heiko@sntech.de> | 2022-10-04 19:42:24 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-10-13 07:22:03 +0300 |
commit | c316fa38c264a1c01f178621e79a8c451f5f5a46 (patch) | |
tree | 62262052208cc77bb9aee90c486f55ce270bb0bb /include | |
parent | e54cb3298bfcaa2ac56fe51d0f39c901d5397166 (diff) | |
download | opensbi-c316fa38c264a1c01f178621e79a8c451f5f5a46.tar.xz |
lib: sbi_hart: move hart_features struct to a public location
Platforms may need to override auto-detected hart features
in their override functions. So move the hart_features
struct to the sbi_hart.h header allowing us to pass it over
to platform-handlers.
Suggested-by: Atish Patra <atishp@atishpatra.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hart.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 0032364..95b40e7 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -41,6 +41,17 @@ enum sbi_hart_extensions { SBI_HART_EXT_MAX, }; +struct sbi_hart_features { + bool detected; + int priv_version; + unsigned long extensions; + unsigned int pmp_count; + unsigned int pmp_addr_bits; + unsigned long pmp_gran; + unsigned int mhpm_count; + unsigned int mhpm_bits; +}; + struct sbi_scratch; int sbi_hart_reinit(struct sbi_scratch *scratch); |