summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2018-12-21 22:29:28 +0300
committerAtish Patra <atish.patra@wdc.com>2018-12-22 09:11:21 +0300
commit88b173b33b0810fbeff91ee589073efb9099a904 (patch)
tree468d39a310348468d559460bcc2a6fae0d1f69cc /include
parenta6a5bb22a8c97f6191a0271f3dfe529038161675 (diff)
downloadopensbi-88b173b33b0810fbeff91ee589073efb9099a904.tar.xz
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 <atish.patra@wdc.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_platform.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index 6de52f6..00fadde 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)