diff options
author | Anup Patel <anup.patel@wdc.com> | 2021-02-06 14:48:56 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-03-03 13:51:15 +0530 |
commit | 74756891cc3524084add9879d451cd67bf446bd7 (patch) | |
tree | d7203cd1281640443a469c57f441a213eb431511 /include | |
parent | 807d71c4ff11b8dd9a6366819314db704e0f6aca (diff) |
lib: sbi: Implement SBI HSM suspend function
This patch implements the SBI HSM suspend function. Using this
new SBI call, the S-mode software can put calling HART in platform
specific suspend (i.e. low-power) state. For a successful retentive
suspend, the SBI call will return without errors upon resuming
whereas for a successful non-retentive suspend, the SBI call will
resume from a user provided resume address.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hsm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h index 4250515..bf0c1a5 100644 --- a/include/sbi/sbi_hsm.h +++ b/include/sbi/sbi_hsm.h @@ -22,6 +22,10 @@ int sbi_hsm_hart_start(struct sbi_scratch *scratch, const struct sbi_domain *dom, u32 hartid, ulong saddr, ulong smode, ulong priv); int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow); +void sbi_hsm_hart_resume_start(struct sbi_scratch *scratch); +void sbi_hsm_hart_resume_finish(struct sbi_scratch *scratch); +int sbi_hsm_hart_suspend(struct sbi_scratch *scratch, u32 suspend_type, + ulong raddr, ulong rmode, ulong priv); int sbi_hsm_hart_get_state(const struct sbi_domain *dom, u32 hartid); int sbi_hsm_hart_interruptible_mask(const struct sbi_domain *dom, ulong hbase, ulong *out_hmask); |