diff options
author | Samuel Holland <samuel@sholland.org> | 2022-06-13 04:03:47 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-06-13 09:24:06 +0300 |
commit | b20ed9febe0b78228055ce69d8e3fbb13f64f1cc (patch) | |
tree | e1d0a3f7dfcf5342ec85d1e0f786e6a90a7e5f68 /include | |
parent | ce1d6188a2169c7771af1189cc8332e7a394cd19 (diff) | |
download | opensbi-b20ed9febe0b78228055ce69d8e3fbb13f64f1cc.tar.xz |
lib: sbi_hsm: Call a device hook during hart resume
Non-retentive suspend states may require platform-specific actions
during resume. For example, firmware may need to save and restore the
values of custom CSRs. Add a hook to support this.
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hsm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h index c16e871..6da8cee 100644 --- a/include/sbi/sbi_hsm.h +++ b/include/sbi/sbi_hsm.h @@ -37,6 +37,14 @@ struct sbi_hsm_device { * specified resume address */ int (*hart_suspend)(u32 suspend_type, ulong raddr); + + /** + * Perform platform-specific actions to resume from a suspended state. + * + * This includes restoring any platform state that was lost during + * non-retentive suspend. + */ + void (*hart_resume)(void); }; struct sbi_domain; |