mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-24 04:32:05 +01:00
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>
This commit is contained in:
1 parent
a6a5bb22a8
commit
88b173b33b
8 files changed
+24
-7
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user