arch/x86: Sanity checking on HAVE_SMI_HANDLER
Fail at build-time if one of the following happens: Platform includes SMI handler setup function smm_init() in the build when configuration has HAVE_SMI_HANDLER=n. Platform does not implement smm_init_completion() when HAVE_SMI_HANDLER=y. Change-Id: I7d61c155d2b7c2d71987980db4c25d520452dabf Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21097 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
a9450081cf
commit
e09cd1b787
|
@ -77,3 +77,7 @@ void smm_lock(void)
|
||||||
{
|
{
|
||||||
/* We lock SMM in CPU init */
|
/* We lock SMM in CPU init */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void smm_init_completion(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -593,11 +593,13 @@ void initialize_cpus(struct bus *cpu_bus)
|
||||||
recover_lowest_1M();
|
recover_lowest_1M();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Platform-specific code for SMI handler overrides this. */
|
#if !IS_ENABLED(CONFIG_HAVE_SMI_HANDLER)
|
||||||
__attribute__((weak)) void smm_init(void)
|
/* Empty stubs for platforms without SMI handlers. */
|
||||||
|
void smm_init(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak)) void smm_init_completion(void)
|
void smm_init_completion(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -312,6 +312,10 @@ void smm_init(void)
|
||||||
smi_set_eos();
|
smi_set_eos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void smm_init_completion(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void smm_lock(void)
|
void smm_lock(void)
|
||||||
{
|
{
|
||||||
/* LOCK the SMM memory window and enable normal SMM.
|
/* LOCK the SMM memory window and enable normal SMM.
|
||||||
|
|
Loading…
Reference in New Issue