aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdfam10/Makefile.inc
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-09-05 18:39:34 -0500
committerMartin Roth <martinroth@google.com>2015-10-30 18:19:11 +0100
commit4ea0cc087eb7adf5ce49f445bf590129b9ba97e0 (patch)
treed1f6fa22b2770ab683b3f551f9b05ef16c0ce3df /src/northbridge/amd/amdfam10/Makefile.inc
parentfce128cdfb817eb8f8a88c3a815fb109e8a0a504 (diff)
northbridge/amd/amdfam10: Add Suspend to RAM (S3) Flash data storage area
Change-Id: I169fafc3a61e11c3e4781190053e57bf34502d7b Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/11951 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/amd/amdfam10/Makefile.inc')
-rw-r--r--src/northbridge/amd/amdfam10/Makefile.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdfam10/Makefile.inc b/src/northbridge/amd/amdfam10/Makefile.inc
index 8a105fd984..e4dd9e39f6 100644
--- a/src/northbridge/amd/amdfam10/Makefile.inc
+++ b/src/northbridge/amd/amdfam10/Makefile.inc
@@ -15,4 +15,17 @@ ramstage-y += get_pci1234.c
# Call show_all_routes() anywhere amdfam10.h is included.
#ramstage-y += util.c
+# Reserve 2x CONFIG_S3_DATA_SIZE to allow for random file placement
+# (not respecting erase sector boundaries) within CBFS
+$(obj)/coreboot_s3nv.rom: $(obj)/config.h
+ echo " S3 NVRAM $(CONFIG_S3_DATA_POS) (S3 storage area)"
+ # force C locale, so cygwin awk doesn't try to interpret the 0xff below as UTF-8 (or worse)
+ printf %d $(CONFIG_S3_DATA_SIZE) | LC_ALL=C awk '{for (i=0; i<$$1*2; i++) {printf "%c", 255}}' > $@.tmp
+ mv $@.tmp $@
+
+cbfs-files-$(CONFIG_HAVE_ACPI_RESUME) += s3nv
+s3nv-file := $(obj)/coreboot_s3nv.rom
+s3nv-align := $(CONFIG_S3_DATA_SIZE)
+s3nv-type := raw
+
endif