summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c2
-rw-r--r--src/cpu/x86/smm/smm_stub.S2
-rw-r--r--src/include/cpu/x86/smm.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index 6e9781a2f303..fc1e1b306229 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <string.h>
+#include <acpi/acpi_gnvs.h>
#include <rmodule.h>
#include <cpu/x86/smm.h>
#include <commonlib/helpers.h>
@@ -261,6 +262,7 @@ static int smm_module_setup_stub(void *smbase, size_t smm_size,
stub_params->runtime.smm_size = smm_size;
stub_params->runtime.save_state_size = params->per_cpu_save_state_size;
stub_params->runtime.num_cpus = params->num_concurrent_stacks;
+ stub_params->runtime.gnvs_ptr = (uintptr_t)acpi_get_gnvs();
/* Initialize the APIC id to CPU number table to be 1:1 */
for (i = 0; i < params->num_concurrent_stacks; i++)
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 8086b756d465..425724d559a9 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -36,6 +36,8 @@ save_state_size:
.long 0
num_cpus:
.long 0
+gnvs_ptr:
+.long 0
/* allows the STM to bring up SMM in 32-bit mode */
start32_offset:
.long smm_trampoline32 - _start
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 6671a513fc3e..a3101e515572 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -61,6 +61,7 @@ struct smm_runtime {
u32 smm_size;
u32 save_state_size;
u32 num_cpus;
+ u32 gnvs_ptr;
/* STM's 32bit entry into SMI handler */
u32 start32_offset;
/* The apic_id_to_cpu provides a mapping from APIC id to CPU number.