summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2012-04-13 13:42:15 +0800
committerMarc Jones <marcj303@gmail.com>2012-04-16 18:22:47 +0200
commitf72237346d9a0894b4675f0b6915da6fdcccd31e (patch)
tree3ccf4333bd94f38a68f3b76d3f161d27072316b5 /src/include
parentcaf494c83170e97b192e2174bc461482699a3712 (diff)
S3 code in coreboot public folder.
1. Move the Stack to high memory. 2. Restore the MTRR before Coreboot jump to the wakeup vector. Change-Id: I9872e02fcd7eed98e7f630aa29ece810ac32d55a Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/623 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbmem.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index c55a7cac22..33e2de4f98 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -28,17 +28,18 @@
#endif
#if CONFIG_HAVE_ACPI_RESUME
-#define HIGH_MEMORY_SIZE ((CONFIG_RAMTOP - CONFIG_RAMBASE) + HIGH_MEMORY_DEF_SIZE)
-#define HIGH_MEMORY_SAVE ( HIGH_MEMORY_SIZE - HIGH_MEMORY_DEF_SIZE )
+#define HIGH_MEMORY_SAVE (CONFIG_RAMTOP - CONFIG_RAMBASE)
+#define HIGH_MEMORY_SIZE (HIGH_MEMORY_SAVE + CONFIG_HIGH_SCRATCH_MEMORY_SIZE + HIGH_MEMORY_DEF_SIZE)
/* Delegation of resume backup memory so we don't have to
* (slowly) handle backing up OS memory in romstage.c
*/
#define CBMEM_BOOT_MODE 0x610
#define CBMEM_RESUME_BACKUP 0x614
-#else
+
+#else /* CONFIG_HAVE_ACPI_RESUME */
#define HIGH_MEMORY_SIZE HIGH_MEMORY_DEF_SIZE
-#endif
+#endif /* CONFIG_HAVE_ACPI_RESUME */
#define CBMEM_ID_FREESPACE 0x46524545
#define CBMEM_ID_GDT 0x4c474454
@@ -47,6 +48,7 @@
#define CBMEM_ID_PIRQ 0x49525154
#define CBMEM_ID_MPTABLE 0x534d5054
#define CBMEM_ID_RESUME 0x5245534d
+#define CBMEM_ID_RESUME_SCRATCH 0x52455343
#define CBMEM_ID_SMBIOS 0x534d4254
#define CBMEM_ID_TIMESTAMP 0x54494d45
#define CBMEM_ID_MRCDATA 0x4d524344