xref: /aosp_15_r20/external/coreboot/src/soc/amd/common/pi/amd_resume_final.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpi.h>
4 #include <bootstate.h>
5 #include <amdblocks/agesawrapper_call.h>
6 
agesawrapper_s3finalrestore(void * unused)7 static void agesawrapper_s3finalrestore(void *unused)
8 {
9 	/* Needed since running on BS_OS_RESUME_CHECK to ensure execution before SMM lock */
10 	if (acpi_is_wakeup_s3())
11 		do_agesawrapper(AMD_S3FINAL_RESTORE, "amds3finalrestore");
12 }
13 
14 BOOT_STATE_INIT_ENTRY(BS_OS_RESUME_CHECK, BS_ON_EXIT, agesawrapper_s3finalrestore, NULL);
15