summaryrefslogtreecommitdiff
path: root/include/sbi
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-09-24 15:19:27 +0300
committerAnup Patel <anup@brainfault.org>2020-10-20 09:02:40 +0300
commite73b92d8623e9599245c6921025cfe0b40141f07 (patch)
tree0b0d25c7e5032c385c73f99a6fed8a174098d6b2 /include/sbi
parentb1678af210dc4b4e6d586d6d96617e9641618994 (diff)
downloadopensbi-e73b92d8623e9599245c6921025cfe0b40141f07.tar.xz
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 'include/sbi')
-rw-r--r--include/sbi/sbi_hsm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h
index 18d129b..296b267 100644
--- a/include/sbi/sbi_hsm.h
+++ b/include/sbi/sbi_hsm.h
@@ -19,6 +19,7 @@
#define SBI_HART_STARTED 3
#define SBI_HART_UNKNOWN 4
+struct sbi_domain;
struct sbi_scratch;
int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot);
@@ -27,10 +28,10 @@ void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch);
int sbi_hsm_hart_start(struct sbi_scratch *scratch, u32 hartid,
ulong saddr, ulong smode, ulong priv);
int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow);
-int sbi_hsm_hart_get_state(u32 hartid);
+int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid);
int sbi_hsm_hart_state_to_status(int state);
-bool sbi_hsm_hart_started(u32 hartid);
-int sbi_hsm_hart_started_mask(ulong hbase, ulong *out_hmask);
+int sbi_hsm_hart_started_mask(const struct sbi_domain *dom,
+ ulong hbase, ulong *out_hmask);
void sbi_hsm_prepare_next_jump(struct sbi_scratch *scratch, u32 hartid);
#endif