summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-04-30 14:56:20 -0500
committerAaron Durbin <adurbin@chromium.org>2016-05-04 15:54:15 +0200
commita41e030fbc8281ea1f76e6f0f0cdea4e33c2fc6c (patch)
tree85d62f2c67711c987c6e0b45649d711bbb6ce669
parent5f72f960dfd13d2a7ade670650c54be48fb2b017 (diff)
downloadcoreboot-a41e030fbc8281ea1f76e6f0f0cdea4e33c2fc6c.tar.xz
cpu/x86/smm_module_loader: always build with SMM module support
The SMM module loader code was guarded by CONFIG_SMM_TSEG, however that's not necessary. It's up to the chipset to take advantage of the SMM module loading. It'll get optimized out if the code isn't used anyway so just expose the declarations. Change-Id: I6ba1b91d0c84febd4f1a92737b3d7303ab61b343 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14560 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/cpu/x86/smm/Makefile.inc3
-rw-r--r--src/include/cpu/x86/smm.h6
2 files changed, 2 insertions, 7 deletions
diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc
index c912a8f271..72c9796f81 100644
--- a/src/cpu/x86/smm/Makefile.inc
+++ b/src/cpu/x86/smm/Makefile.inc
@@ -14,6 +14,7 @@
##
ramstage-$(CONFIG_BACKUP_DEFAULT_SMM_REGION) += backup_default_smm.c
+ramstage-y += smm_module_loader.c
ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y)
$(eval $(call create_class_compiler,smm,x86_32))
@@ -42,8 +43,6 @@ smmstub-y += smm_stub.S
smm-y += smm_module_handler.c
-ramstage-y += smm_module_loader.c
-
ramstage-srcs += $(obj)/cpu/x86/smm/smm.manual
ramstage-srcs += $(obj)/cpu/x86/smm/smmstub.manual
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 64759b0bd2..2b13f8c711 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -488,8 +488,6 @@ void smi_release_lock(void);
/* Get PMBASE address */
u16 smm_get_pmbase(void);
-#if CONFIG_SMM_TSEG
-
struct smm_runtime {
u32 smbase;
u32 save_state_size;
@@ -520,8 +518,8 @@ void asmlinkage smm_handler_start(void *params);
/* Retrieve SMM save state for a given CPU. WARNING: This does not take into
* account CPUs which are configured to not save their state to RAM. */
void *smm_get_save_state(int cpu);
+#endif /* __SMM__ */
-#else
/* SMM Module Loading API */
/* The smm_loader_params structure provides direction to the SMM loader:
@@ -559,8 +557,6 @@ struct smm_loader_params {
/* Both of these return 0 on success, < 0 on failure. */
int smm_setup_relocation_handler(struct smm_loader_params *params);
int smm_load_module(void *smram, int size, struct smm_loader_params *params);
-#endif /* __SMM__ */
-#endif /* CONFIG_SMM_TSEG */
/* Backup and restore default SMM region. */
void *backup_default_smm_area(void);