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>
This commit is contained in:
Atish Patra
2020-05-09 16:47:32 -07:00
committed by Anup Patel
parent 1f235ec47f
commit 22c4334f5c
3 changed files with 89 additions and 0 deletions

View File

@@ -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);