diff options
author | Samuel Holland <samuel@sholland.org> | 2022-06-13 04:03:48 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-06-13 09:24:06 +0300 |
commit | 79e42eb2d646097198aed935042e289e53ff9876 (patch) | |
tree | 1a8e0cc332bbd68c7acc98c82737c4fab9b362f5 /include | |
parent | b20ed9febe0b78228055ce69d8e3fbb13f64f1cc (diff) | |
download | opensbi-79e42eb2d646097198aed935042e289e53ff9876.tar.xz |
lib: sbi_hsm: Assume a consistent resume address
The suspend code needs to know the resume address for two reasons:
1) Programming some hardware register or management firmware. Here we
assume the hardware/firmware maintains its state between suspends,
so it only needs to be programmed once at startup.
2) When a non-retentive suspend request ends up being retentive, due
to lack of hardware support, pending interrupt, or for some other
reason. However, the behavior here is not platform-dependent, and
this can be handled in the generic hart suspend function.
Since neither situation requires the platform-level suspend function to
know the resume address, stop passing it to that function. Instead,
handle the non-retentive to retentive situation generically.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h index 6da8cee..d6cc468 100644 --- a/include/sbi/sbi_hsm.h +++ b/include/sbi/sbi_hsm.h @@ -34,9 +34,9 @@ struct sbi_hsm_device { * the hart resumes normal execution. * * For successful non-retentive suspend, the hart will resume from - * specified resume address + * the warm boot entry point. */ - int (*hart_suspend)(u32 suspend_type, ulong raddr); + int (*hart_suspend)(u32 suspend_type); /** * Perform platform-specific actions to resume from a suspended state. |