diff options
author | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2015-09-05 18:46:24 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2015-10-27 15:12:08 +0100 |
commit | 2003844378e71194cb2fe5d6ee6d92a6293cb3a2 (patch) | |
tree | 7ecbc06271cfe3dda4feeee081c8e48201ac92da /src/cpu/amd/car | |
parent | ff5d0b251830bdb4595972f2b2824ec780a09dca (diff) | |
download | coreboot-2003844378e71194cb2fe5d6ee6d92a6293cb3a2.tar.xz |
cpu/amd/car: Add initial Suspend to RAM (S3) support
Romstage handoff copied from cpu/intel/haswell/romstage.c
Change-Id: I1e1a67fa3c2c13cebcf8f0af318055b9d97d0a59
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/11953
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/cpu/amd/car')
-rw-r--r-- | src/cpu/amd/car/post_cache_as_ram.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c index 8ec5c3b840..61d47a2ed9 100644 --- a/src/cpu/amd/car/post_cache_as_ram.c +++ b/src/cpu/amd/car/post_cache_as_ram.c @@ -1,4 +1,5 @@ /* Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>, Raptor Engineering + * Copyright (C) 2012 ChromeOS Authors * 2005.6 by yhlu * 2006.3 yhlu add copy data from CAR to ram */ @@ -9,6 +10,7 @@ #include <cpu/amd/mtrr.h> #include <cpu/amd/car.h> #include <arch/acpi.h> +#include <romstage_handoff.h> #include "cbmem.h" #include "cpu/amd/car/disable_cache_as_ram.c" @@ -95,6 +97,13 @@ void post_cache_as_ram(void) { void *resume_backup_memory = NULL; + struct romstage_handoff *handoff; + handoff = romstage_handoff_find_or_add(); + if (handoff != NULL) + handoff->s3_resume = acpi_is_wakeup_s3(); + else + printk(BIOS_DEBUG, "Romstage handoff structure not added!\n"); + int s3resume = acpi_is_wakeup_s3(); if (s3resume) { cbmem_recovery(s3resume); @@ -140,6 +149,7 @@ void cache_as_ram_new_stack (void) if (acpi_is_wakeup_s3()) { resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); + print_car_debug("Resume backup memory location: %p\n", resume_backup_memory); } prepare_ramstage_region(resume_backup_memory); |