diff options
| author | Atish Patra <[email protected]> | 2018-12-21 11:29:28 -0800 |
|---|---|---|
| committer | Atish Patra <[email protected]> | 2018-12-21 22:11:21 -0800 |
| commit | 88b173b33b0810fbeff91ee589073efb9099a904 (patch) | |
| tree | 468d39a310348468d559460bcc2a6fae0d1f69cc /include | |
| parent | a6a5bb22a8c97f6191a0271f3dfe529038161675 (diff) | |
Introduce hart disabled parameter in platform.
As of now, uboot doesn't have support for SMP.
Moreover, unleashed board has a E51 hart which
doesn't not support S mode.
We should only boot only 1 non-zero hart.
Signed-off-by: Atish Patra <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_platform.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h index 6de52f63..00fadde9 100644 --- a/include/sbi/sbi_platform.h +++ b/include/sbi/sbi_platform.h @@ -33,6 +33,7 @@ struct sbi_platform { u64 features; u32 hart_count; u32 hart_stack_size; + u64 disabled_hart_mask; int (*cold_early_init)(void); int (*cold_final_init)(void); int (*warm_early_init)(u32 target_hart); @@ -83,6 +84,13 @@ static inline const char *sbi_platform_name(struct sbi_platform *plat) return NULL; } +static inline bool sbi_platform_hart_disabled(struct sbi_platform *plat, u32 hartid) +{ + if (plat && (plat->disabled_hart_mask & (1 << hartid))) + return 1; + else + return 0; +} static inline u32 sbi_platform_hart_count(struct sbi_platform *plat) { if (plat) |
