diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-05-10 02:47:32 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-10 08:00:47 +0300 |
commit | 22c4334f5c27c11cebeeba0a4426d26fcdb37327 (patch) | |
tree | dd73845419a7fc260d05bbdff8d00a63be11eb03 /include | |
parent | 1f235ec47f85ba90916493c7eb1378b5427a66b5 (diff) | |
download | opensbi-22c4334f5c27c11cebeeba0a4426d26fcdb37327.tar.xz |
lib: Add hart features in boot time print
We have now clear distinction between platform and hart features.
Modify the boot print messages to print hart specific features in
a string format.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Jonathan Balkind <jbalkind@cs.princeton.edu>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hart.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index beb61b6..cdcd865 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -22,6 +22,9 @@ enum sbi_hart_features { SBI_HART_HAS_MCOUNTEREN = (1 << 2), /** HART has timer csr implementation in hardware */ SBI_HART_HAS_TIME = (1 << 3), + + /** Last index of Hart features*/ + SBI_HART_HAS_LAST_FEATURE = SBI_HART_HAS_TIME, }; struct sbi_scratch; @@ -40,6 +43,7 @@ int sbi_hart_pmp_check_addr(struct sbi_scratch *scratch, unsigned long daddr, unsigned long attr); bool sbi_hart_has_feature(u32 hartid, unsigned long feature); unsigned long sbi_hart_get_features(u32 hartid); +int sbi_hart_get_features_str(u32 hartid, char *features_str, int nfstr); void __attribute__((noreturn)) sbi_hart_hang(void); |