diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-09-19 14:26:52 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-10-20 13:56:36 +0530 |
commit | 3a30d2c34d9c287f49419b44c768ffb70764325c (patch) | |
tree | 363cac510778fecc2c182ebcf58d5519cec33b08 /lib/sbi/sbi_domain.c | |
parent | e73b92d8623e9599245c6921025cfe0b40141f07 (diff) |
lib: sbi: Extend sbi_hsm_hart_start() for domains
The sbi_hsm_hart_start() should consider the domain under which we
are trying to start the HART. This will help ensure that HART A can
start HART B only if both HARTs A and B belong to the same domain.
We also have a special case when we bring-up boot HART of non-root
domains in sbi_domain_finalize() where we should skip domain checks
in sbi_hsm_hart_start(). To achieve this, sbi_hsm_hart_start() should
do domain checks only when domain parameter is non-NULL.
This patch extends sbi_hsm_hart_start() as-per above.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_domain.c')
-rw-r--r-- | lib/sbi/sbi_domain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c index 86dfefd..9bde5fb 100644 --- a/lib/sbi/sbi_domain.c +++ b/lib/sbi/sbi_domain.c @@ -324,8 +324,10 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid) scratch->next_mode = dom->next_mode; scratch->next_arg1 = dom->next_arg1; } else { - rc = sbi_hsm_hart_start(scratch, dhart, dom->next_addr, - dom->next_mode, dom->next_arg1); + rc = sbi_hsm_hart_start(scratch, NULL, dhart, + dom->next_addr, + dom->next_mode, + dom->next_arg1); if (rc) return rc; } |