summaryrefslogtreecommitdiff
path: root/src/cpu/intel/haswell
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2016-06-20 20:40:32 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2016-06-22 12:10:17 +0200
commitcf0e60faf4ff50dc9838611bdb22d61119d97cdd (patch)
tree467fc4b9b139019b2c41b1cea19e0fe0af47b280 /src/cpu/intel/haswell
parent8e627a2e51a213b4a71e8aa40667d651fad729b1 (diff)
downloadcoreboot-cf0e60faf4ff50dc9838611bdb22d61119d97cdd.tar.xz
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>
Diffstat (limited to 'src/cpu/intel/haswell')
-rw-r--r--src/cpu/intel/haswell/romstage.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/cpu/intel/haswell/romstage.c b/src/cpu/intel/haswell/romstage.c
index 0e8fd09837..11d449c1ae 100644
--- a/src/cpu/intel/haswell/romstage.c
+++ b/src/cpu/intel/haswell/romstage.c
@@ -273,29 +273,14 @@ void romstage_common(const struct romstage_params *params)
}
}
-static inline void prepare_for_resume(struct romstage_handoff *handoff)
-{
-/* Only need to save memory when ramstage isn't relocatable. */
-#if !CONFIG_RELOCATABLE_RAMSTAGE
-#if CONFIG_HAVE_ACPI_RESUME
- /* Back up the OS-controlled memory where ramstage will be loaded. */
- if (handoff != NULL && handoff->s3_resume) {
- void *src = (void *)CONFIG_RAMBASE;
- void *dest = cbmem_find(CBMEM_ID_RESUME);
- if (dest != NULL)
- memcpy(dest, src, HIGH_MEMORY_SAVE);
- }
-#endif
-#endif
-}
-
void romstage_after_car(void)
{
struct romstage_handoff *handoff;
handoff = romstage_handoff_find_or_add();
- prepare_for_resume(handoff);
+ if (handoff != NULL && handoff->s3_resume)
+ acpi_prepare_for_resume();
/* Load the ramstage. */
copy_and_run();