ACPI S3: Add common recovery code

There is nothing to backup with RELOCATABLE_RAMSTAGE.

Change-Id: I780a71e48d23e202fb0e9c70e34420066fa0e5b5
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15243
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki
2016-06-20 20:40:32 +03:00
parent 8e627a2e51
commit cf0e60faf4
4 changed files with 20 additions and 17 deletions

View File

@@ -22,6 +22,8 @@
#include <romstage_handoff.h>
#include <rules.h>
#if ENV_RAMSTAGE
/* This is filled with acpi_is_wakeup() call early in ramstage. */
int acpi_slp_type = -1;
@@ -75,6 +77,19 @@ void acpi_fail_wakeup(void)
if (acpi_slp_type == 3 || acpi_slp_type == 2)
acpi_slp_type = 0;
}
#endif /* ENV_RAMSTAGE */
void acpi_prepare_for_resume(void)
{
if (!HIGH_MEMORY_SAVE)
return;
/* Back up the OS-controlled memory where ramstage will be loaded. */
void *src = (void *)CONFIG_RAMBASE;
void *dest = cbmem_find(CBMEM_ID_RESUME);
if (dest != NULL)
memcpy(dest, src, HIGH_MEMORY_SAVE);
}
void acpi_prepare_resume_backup(void)
{