diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-09-24 17:49:27 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-10-20 11:32:40 +0530 |
commit | e73b92d8623e9599245c6921025cfe0b40141f07 (patch) | |
tree | 0b0d25c7e5032c385c73f99a6fed8a174098d6b2 /lib/sbi/sbi_ecall_legacy.c | |
parent | b1678af210dc4b4e6d586d6d96617e9641618994 (diff) |
lib: sbi: Extend sbi_hsm_hart_started_mask() for domains
The sbi_hsm_hart_started_mask() API should take one more parameter
to allow caller specify domain under which started_mask is being
generated. Further, the sbi_hsm_hart_started_mask() depends on
sbi_hsm_hart_get_state() which also should return HART state under
specified domain.
This patch updates both sbi_hsm_hart_started_mask() and
sbi_hsm_hart_get_state() as-per above.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ecall_legacy.c')
-rw-r--r-- | lib/sbi/sbi_ecall_legacy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sbi/sbi_ecall_legacy.c b/lib/sbi/sbi_ecall_legacy.c index 3bfe749..909cbe3 100644 --- a/lib/sbi/sbi_ecall_legacy.c +++ b/lib/sbi/sbi_ecall_legacy.c @@ -10,6 +10,7 @@ #include <sbi/riscv_asm.h> #include <sbi/sbi_console.h> +#include <sbi/sbi_domain.h> #include <sbi/sbi_ecall.h> #include <sbi/sbi_ecall_interface.h> #include <sbi/sbi_error.h> @@ -33,7 +34,8 @@ static int sbi_load_hart_mask_unpriv(ulong *pmask, ulong *hmask, if (uptrap->cause) return SBI_ETRAP; } else { - sbi_hsm_hart_started_mask(0, &mask); + sbi_hsm_hart_started_mask(sbi_domain_thishart_ptr(), + 0, &mask); } *hmask = mask; |