Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22641
Change subject: soc/amd/common: Add s3_resume.h file
......................................................................
soc/amd/common: Add s3_resume.h file
The common/spi.c file normally isn't built but may be by selecting the
right Kconfig symbols. A build error occurs due to a missing header
file. This may have been an oversight when stoneyridge was converted
to soc or when S3 was removed from all binaryPI implementations.
The spi.c file will be modified in a subsequent patch so it's
here maintained and made to build.
Add the missing file with to allow the file to build.
TEST: select SPI_FLASH and build Kahlee
BUG=b:69930455
Change-Id: I4ebb3098c6c1f42a94daa9b3d4eb7faa2fdf3f32
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
A src/soc/amd/common/s3_resume.h
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/22641/1
diff --git a/src/soc/amd/common/s3_resume.h b/src/soc/amd/common/s3_resume.h
new file mode 100644
index 0000000..39a0712
--- /dev/null
+++ b/src/soc/amd/common/s3_resume.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011-2017 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __S3_RESUME_H__
+#define __S3_RESUME_H__
+
+void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len);
+
+#endif /* __S3_RESUME_H__ */
--
To view, visit https://review.coreboot.org/22641
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ebb3098c6c1f42a94daa9b3d4eb7faa2fdf3f32
Gerrit-Change-Number: 22641
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22642
Change subject: soc/amd/common: Add S3 region to Kconfig
......................................................................
soc/amd/common: Add S3 region to Kconfig
Add the symbols back to Kconfig and make the S3 base and offset
depend on HAVE_ACPI_RESUME. These will form the "backup" region
for storing S3 data. The values are typical for AMD platforms and
should allow adequate room for rotation (the Stoney Ridge NV size
is 0x4c1 currently).
Note that the primary choice for the S3 save location will be
eventually be determined by the FMAP.
Change-Id: I67846e47d364ecfc01934e879e3299813fcda1b3
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/soc/amd/common/Kconfig
1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/22642/1
diff --git a/src/soc/amd/common/Kconfig b/src/soc/amd/common/Kconfig
index debedac..33713f9 100644
--- a/src/soc/amd/common/Kconfig
+++ b/src/soc/amd/common/Kconfig
@@ -11,4 +11,24 @@
source "src/soc/amd/common/block/Kconfig"
+config S3_DATA_POS
+ hex
+ depends on HAVE_ACPI_RESUME
+ default 0xffff0000
+ help
+ For designs not using a flash map, this is the physical address where
+ S3 resume data is stored in the SPI flash. Place this on a 4KB
+ boundary for best results. The designer must ensure the region does
+ not interfere with anything else in the image.
+
+config S3_DATA_SIZE
+ int
+ depends on HAVE_ACPI_RESUME
+ default 32768
+ help
+ For designs not using a flash map, this is the total size of the
+ region to be used for S3 resume data in the SPI flash. Make this
+ a multiple of 4KB for best results. The designer must ensure the
+ region does not interfere with anything else in the image.
+
endif # SOC_AMD_COMMON
--
To view, visit https://review.coreboot.org/22642
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I67846e47d364ecfc01934e879e3299813fcda1b3
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>