diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-16 21:37:05 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-08 07:32:51 +0000 |
commit | e769bcee9a73ac712748fb55c38d072b39bbcd88 (patch) | |
tree | 77febfb1ef2cda03e01ab8e8342f8c9677d10b2b /src | |
parent | da1fde2ffb5d75e69f0ce459f36b9181cf4f5655 (diff) |
ACPI: Add and fill gnvs_ptr for smm_runtime
Change-Id: I823d04a4851437b4267a60886e5ab205bb2e1b10
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42464
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/x86/smm/smm_module_loader.c | 2 | ||||
-rw-r--r-- | src/cpu/x86/smm/smm_stub.S | 2 | ||||
-rw-r--r-- | src/include/cpu/x86/smm.h | 1 |
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 6e9781a2f3..fc1e1b3062 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 8086b756d4..425724d559 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 6671a513fc..a3101e5155 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. |