Commit 79e42eb2 authored by Samuel Holland's avatar Samuel Holland Committed by Anup Patel
Browse files

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: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
parent b20ed9fe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment