diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-11-11 08:13:11 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-12-04 15:27:46 +0300 |
commit | c709d40a671f38bf956532a8d573c14d327d66e5 (patch) | |
tree | 8e99147c0eeb34366bc4fd80255d84fd37cde073 /lib | |
parent | 4e370224dff1a3e9886165dd7b429016d8907c5f (diff) | |
download | opensbi-c709d40a671f38bf956532a8d573c14d327d66e5.tar.xz |
lib: sbi: Auto start domain only if boot HART within limits
The sbi_domain_finalize() should auto start a domain only if the
boot HART is withing limits (i.e. less than SBI_HARTMASK_MAX_BITS).
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi/sbi_domain.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c index ac920b8..ecb098c 100644 --- a/lib/sbi/sbi_domain.c +++ b/lib/sbi/sbi_domain.c @@ -403,6 +403,10 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid) /* Domain boot HART */ dhart = dom->boot_hartid; + /* Ignore of boot HART is off limits */ + if (SBI_HARTMASK_MAX_BITS <= dhart) + continue; + /* Ignore if boot HART not possible for this domain */ if (!sbi_hartmask_test_hart(dhart, dom->possible_harts)) continue; |