summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801gx
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-04-21 08:43:09 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-08-19 15:31:51 +0000
commit2e50142f62c20c437100ac3a1a1a50720a31a9d6 (patch)
treec704bd5afb96170069561364359b42e236ad89fb /src/southbridge/intel/i82801gx
parent0cc2ce432771a2625214973c471461e7df9c4a12 (diff)
downloadcoreboot-2e50142f62c20c437100ac3a1a1a50720a31a9d6.tar.xz
i82801dx/gx/ix/jx: Add low-memory backup for S3 path
SMM relocation code overwrite low memory owned by OS. Change-Id: Ifa3d28bed3d3db65b0707bde62ae2b424a231f1a Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/19405 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/southbridge/intel/i82801gx')
-rw-r--r--src/southbridge/intel/i82801gx/smi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/southbridge/intel/i82801gx/smi.c b/src/southbridge/intel/i82801gx/smi.c
index 17a81c1757..7355d117a4 100644
--- a/src/southbridge/intel/i82801gx/smi.c
+++ b/src/southbridge/intel/i82801gx/smi.c
@@ -287,6 +287,7 @@ static void smi_set_eos(void)
}
extern uint8_t smm_relocation_start, smm_relocation_end;
+static void *default_smm_area = NULL;
static void smm_relocate(void)
{
@@ -304,6 +305,8 @@ static void smm_relocate(void)
return;
}
+ default_smm_area = backup_default_smm_area();
+
/* copy the SMM relocation code */
memcpy((void *)0x38000, &smm_relocation_start,
&smm_relocation_end - &smm_relocation_start);
@@ -412,6 +415,11 @@ void smm_init(void)
smi_set_eos();
}
+void smm_init_completion(void)
+{
+ restore_default_smm_area(default_smm_area);
+}
+
void smm_lock(void)
{
/* LOCK the SMM memory window and enable normal SMM.