forked from Mirrors/opensbi
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>
This commit is contained in:

committed by
Anup Patel

parent
e54cb3298b
commit
c316fa38c2
@@ -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);
|
||||
|
Reference in New Issue
Block a user