mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
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>
This commit is contained in:

committed by
Anup Patel

parent
ce1d6188a2
commit
b20ed9febe
@@ -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;
|
||||
|
Reference in New Issue
Block a user