aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/boot/acpi.c40
-rw-r--r--src/arch/x86/include/arch/acpi.h2
2 files changed, 18 insertions, 24 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 96ece06af9..1c373ac6c0 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -622,37 +622,31 @@ void acpi_write_hest(acpi_hest_t *hest)
}
#if CONFIG_HAVE_ACPI_RESUME
-void suspend_resume(void)
+void acpi_resume(void *wake_vec)
{
- void *wake_vec;
-
- /* If we happen to be resuming find wakeup vector and jump to OS. */
- wake_vec = acpi_find_wakeup_vector();
- if (wake_vec) {
#if CONFIG_HAVE_SMI_HANDLER
- u32 *gnvs_address = cbmem_find(CBMEM_ID_ACPI_GNVS_PTR);
+ u32 *gnvs_address = cbmem_find(CBMEM_ID_ACPI_GNVS_PTR);
- /* Restore GNVS pointer in SMM if found */
- if (gnvs_address && *gnvs_address) {
- printk(BIOS_DEBUG, "Restore GNVS pointer to 0x%08x\n",
- *gnvs_address);
- smm_setup_structures((void *)*gnvs_address, NULL, NULL);
- }
+ /* Restore GNVS pointer in SMM if found */
+ if (gnvs_address && *gnvs_address) {
+ printk(BIOS_DEBUG, "Restore GNVS pointer to 0x%08x\n",
+ *gnvs_address);
+ smm_setup_structures((void *)*gnvs_address, NULL, NULL);
+ }
#endif
- /* Call mainboard resume handler first, if defined. */
- if (mainboard_suspend_resume)
- mainboard_suspend_resume();
+ /* Call mainboard resume handler first, if defined. */
+ if (mainboard_suspend_resume)
+ mainboard_suspend_resume();
#if CONFIG_COVERAGE
- coverage_exit();
+ coverage_exit();
#endif
- /* Tear down the caching of the ROM. */
- if (disable_cache_rom)
- disable_cache_rom();
+ /* Tear down the caching of the ROM. */
+ if (disable_cache_rom)
+ disable_cache_rom();
- post_code(POST_OS_RESUME);
- acpi_jump_to_wakeup(wake_vec);
- }
+ post_code(POST_OS_RESUME);
+ acpi_jump_to_wakeup(wake_vec);
}
/* This is to be filled by SB code - startup value what was found. */
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 022a45fd52..306f7da046 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -558,7 +558,7 @@ void acpi_save_gnvs(u32 gnvs_address);
/* 0 = S0, 1 = S1 ...*/
extern u8 acpi_slp_type;
-void suspend_resume(void);
+void acpi_resume(void *wake_vec);
void __attribute__((weak)) mainboard_suspend_resume(void);
void *acpi_find_wakeup_vector(void);
void *acpi_get_wakeup_rsdp(void);