diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/pi/amd_resume_final.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/soc/amd/common/pi/amd_resume_final.c b/src/soc/amd/common/pi/amd_resume_final.c index 380ffc8b1a..995ac4654d 100644 --- a/src/soc/amd/common/pi/amd_resume_final.c +++ b/src/soc/amd/common/pi/amd_resume_final.c @@ -1,12 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <acpi/acpi.h> #include <bootstate.h> #include <amdblocks/agesawrapper_call.h> static void agesawrapper_s3finalrestore(void *unused) { - do_agesawrapper(AMD_S3FINAL_RESTORE, "amds3finalrestore"); + /* Needed since running on BS_OS_RESUME_CHECK to ensure execution before SMM lock */ + if (acpi_is_wakeup_s3()) + do_agesawrapper(AMD_S3FINAL_RESTORE, "amds3finalrestore"); } -BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, - agesawrapper_s3finalrestore, NULL); +BOOT_STATE_INIT_ENTRY(BS_OS_RESUME_CHECK, BS_ON_EXIT, agesawrapper_s3finalrestore, NULL); |