[coreboot] Patch set updated for coreboot: cb4673e AMD S3: Remove the hardcoded volatile position

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Sun Aug 5 05:46:39 CEST 2012


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1408

-gerrit

commit cb4673e961ca3e35564053cfc3896b476b9b8271
Author: zbao <fishbaozi at gmail.com>
Date:   Sun Aug 5 11:46:23 2012 +0800

    AMD S3: Remove the hardcoded volatile position
    
    Change-Id: I4bcf3f3435f0ba487955d14ed1b010fd94b9f625
    Signed-off-by: Zheng Bao <zheng.bao at amd.com>
    Signed-off-by: zbao <fishbaozi at gmail.com>
---
 src/cpu/amd/agesa/s3_resume.h    |    6 +++---
 src/southbridge/amd/Kconfig      |    5 +++++
 src/southbridge/amd/Makefile.inc |    4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/cpu/amd/agesa/s3_resume.h b/src/cpu/amd/agesa/s3_resume.h
index 16ec411..10bc826 100644
--- a/src/cpu/amd/agesa/s3_resume.h
+++ b/src/cpu/amd/agesa/s3_resume.h
@@ -20,9 +20,9 @@
 #ifndef S3_RESUME_H
 #define S3_RESUME_H
 
-#define S3_DATA_NONVOLATILE_POS	0xFFFF7000
-#define S3_DATA_VOLATILE_POS	0xFFFF0000
-#define S3_DATA_MTRR_POS	0xFFFF6000
+#define S3_DATA_NONVOLATILE_POS	(CONFIG_S3_VOLATILE_POS + 0x7000)
+#define S3_DATA_VOLATILE_POS	CONFIG_S3_VOLATILE_POS
+#define S3_DATA_MTRR_POS	(CONFIG_S3_VOLATILE_POS + 0x6000)
 
 typedef enum {
 	S3DataTypeNonVolatile=0,            ///< NonVolatile Data Type
diff --git a/src/southbridge/amd/Kconfig b/src/southbridge/amd/Kconfig
index 867afca..23f6c06 100644
--- a/src/southbridge/amd/Kconfig
+++ b/src/southbridge/amd/Kconfig
@@ -14,3 +14,8 @@ source src/southbridge/amd/sb800/Kconfig
 source src/southbridge/amd/cimx/Kconfig
 source src/southbridge/amd/agesa/Kconfig
 source src/southbridge/amd/sr5650/Kconfig
+
+# This can be overriden by mainboard/Kconfig
+config S3_VOLATILE_POS
+	hex
+	default 0xFFFF0000
diff --git a/src/southbridge/amd/Makefile.inc b/src/southbridge/amd/Makefile.inc
index 9709715..d2b9b65 100644
--- a/src/southbridge/amd/Makefile.inc
+++ b/src/southbridge/amd/Makefile.inc
@@ -20,14 +20,14 @@ ifeq ($(CONFIG_HAVE_ACPI_RESUME), y)
 ifeq ($(CONFIG_CPU_AMD_AGESA), y)
 
 $(obj)/s3.rom:
-	echo "    S3 NVRAM   0xffff0000 (S3 storage area)"
+	echo "    S3 NVRAM   $(CONFIG_S3_VOLATILE_POS) (S3 storage area)"
 	# force C locale, so cygwin awk doesn't try to interpret the 0xff below as UTF-8 (or worse)
 	LC_ALL=C awk 'BEGIN {for (i=0; i<32768; i++) {printf "%c", 255}}' > $@.tmp
 	mv $@.tmp $@
 
 cbfs-files-y += s3nv
 s3nv-file := $(obj)/s3.rom
-s3nv-position := 0xffff0000
+s3nv-position := $(CONFIG_S3_VOLATILE_POS)
 s3nv-type := raw
 
 endif # CONFIG_CPU_AMD_AGESA == y




More information about the coreboot mailing list