From ed4be45d58ea482c1c8172bc4b2fa1c6af75c75f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 15 Feb 2021 13:20:35 +0100 Subject: cpu/x86/smm: Move apic_id_to_cpu map to smm_stub params This is only consumed by the stub and not by the relocation handler or the permanent handler, so move it out of the runtime struct. Change-Id: I01ed0a412c23c8a82d88408be058a27e55d0dc4d Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/50762 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/include/cpu/x86/smm.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/include/cpu/x86/smm.h') diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index 692da5c7d7..badcb394c7 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -62,13 +62,6 @@ struct smm_runtime { 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. - * The CPU number is indicated by the index into the array by matching - * the default APIC id and value at the index. The stub loader - * initializes this array with a 1:1 mapping. If the APIC ids are not - * contiguous like the 1:1 mapping it is up to the caller of the stub - * loader to adjust this mapping. */ - u8 apic_id_to_cpu[CONFIG_MAX_CPUS]; } __packed; struct smm_module_params { @@ -88,6 +81,13 @@ struct smm_stub_params { u32 c_handler; u32 fxsave_area; u32 fxsave_area_size; + /* The apic_id_to_cpu provides a mapping from APIC id to CPU number. + * The CPU number is indicated by the index into the array by matching + * the default APIC id and value at the index. The stub loader + * initializes this array with a 1:1 mapping. If the APIC ids are not + * contiguous like the 1:1 mapping it is up to the caller of the stub + * loader to adjust this mapping. */ + u8 apic_id_to_cpu[CONFIG_MAX_CPUS]; struct smm_runtime runtime; } __packed; @@ -150,6 +150,7 @@ struct smm_loader_params { smm_handler_t handler; + struct smm_stub_params *stub_params; struct smm_runtime *runtime; /* The following are only used by X86_SMM_LOADER_VERSION2 */ -- cgit v1.2.3