cpu/x86/smm: Add SMM_LEGACY_ASEG
Followup will allow use of PARALLEL_MP with SMM_ASEG so some guards need to be adjusted. Change-Id: If032ce2be4749559db0d46ab5ae422afa7666785 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61480 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Felix Held
parent
bab9d72f15
commit
894f6f8229
@@ -9,4 +9,4 @@ ramstage-y += model_15_init.c
|
|||||||
smm-y += udelay.c
|
smm-y += udelay.c
|
||||||
|
|
||||||
subdirs-y += ../../mtrr
|
subdirs-y += ../../mtrr
|
||||||
subdirs-y += ../../smm
|
subdirs-$(CONFIG_SMM_LEGACY_ASEG) += ../../smm
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
|
|
||||||
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smm_init.c
|
ramstage-y += smm_init.c
|
||||||
|
@@ -114,6 +114,12 @@ config SMM_TSEG
|
|||||||
default y
|
default y
|
||||||
depends on !(NO_SMM || SMM_ASEG)
|
depends on !(NO_SMM || SMM_ASEG)
|
||||||
|
|
||||||
|
config SMM_LEGACY_ASEG
|
||||||
|
bool
|
||||||
|
default y if HAVE_SMI_HANDLER && SMM_ASEG && LEGACY_SMP_INIT
|
||||||
|
help
|
||||||
|
SMM support without PARALLEL_MP, to be deprecated.
|
||||||
|
|
||||||
if SMM_TSEG
|
if SMM_TSEG
|
||||||
|
|
||||||
config SMM_MODULE_HEAP_SIZE
|
config SMM_MODULE_HEAP_SIZE
|
||||||
|
@@ -391,6 +391,7 @@ void initialize_cpus(struct bus *cpu_bus)
|
|||||||
if (is_smp_boot())
|
if (is_smp_boot())
|
||||||
copy_secondary_start_to_lowest_1M();
|
copy_secondary_start_to_lowest_1M();
|
||||||
|
|
||||||
|
if (CONFIG(SMM_LEGACY_ASEG))
|
||||||
smm_init();
|
smm_init();
|
||||||
|
|
||||||
/* Initialize the bootstrap processor */
|
/* Initialize the bootstrap processor */
|
||||||
@@ -403,6 +404,7 @@ void initialize_cpus(struct bus *cpu_bus)
|
|||||||
if (is_smp_boot())
|
if (is_smp_boot())
|
||||||
wait_other_cpus_stop(cpu_bus);
|
wait_other_cpus_stop(cpu_bus);
|
||||||
|
|
||||||
|
if (CONFIG(SMM_LEGACY_ASEG))
|
||||||
smm_init_completion();
|
smm_init_completion();
|
||||||
|
|
||||||
if (is_smp_boot())
|
if (is_smp_boot())
|
||||||
|
@@ -3,16 +3,8 @@
|
|||||||
#ifndef __X86_SMI_DEPRECATED_H__
|
#ifndef __X86_SMI_DEPRECATED_H__
|
||||||
#define __X86_SMI_DEPRECATED_H__
|
#define __X86_SMI_DEPRECATED_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#if CONFIG(PARALLEL_MP) || !CONFIG(HAVE_SMI_HANDLER)
|
|
||||||
/* Empty stubs for platforms without SMI handlers. */
|
|
||||||
static inline void smm_init(void) { }
|
|
||||||
static inline void smm_init_completion(void) { }
|
|
||||||
#else
|
|
||||||
void smm_init(void);
|
void smm_init(void);
|
||||||
void smm_init_completion(void);
|
void smm_init_completion(void);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Entry from smmhandler.S. */
|
/* Entry from smmhandler.S. */
|
||||||
void smi_handler(void);
|
void smi_handler(void);
|
||||||
|
@@ -11,10 +11,8 @@ ramstage-y += lpc.c
|
|||||||
ramstage-y += usb.c
|
ramstage-y += usb.c
|
||||||
ramstage-y += usb2.c
|
ramstage-y += usb2.c
|
||||||
|
|
||||||
ifeq ($(CONFIG_SMM_ASEG),y)
|
ramstage-$(CONFIG_SMM_LEGACY_ASEG) += smi.c
|
||||||
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c
|
ramstage-$(CONFIG_SMM_LEGACY_ASEG) += ../../../cpu/x86/smm/smmrelocate.S
|
||||||
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += ../../../cpu/x86/smm/smmrelocate.S
|
|
||||||
endif
|
|
||||||
|
|
||||||
smm-y += smihandler.c
|
smm-y += smihandler.c
|
||||||
|
|
||||||
|
@@ -279,7 +279,7 @@ static void lpc_init(struct device *dev)
|
|||||||
/* Don't allow evil boot loaders, kernels, or
|
/* Don't allow evil boot loaders, kernels, or
|
||||||
* userspace applications to deceive us:
|
* userspace applications to deceive us:
|
||||||
*/
|
*/
|
||||||
if (CONFIG(HAVE_SMI_HANDLER) && !CONFIG(PARALLEL_MP))
|
if (CONFIG(SMM_LEGACY_ASEG))
|
||||||
aseg_smm_lock();
|
aseg_smm_lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,10 +28,8 @@ ifneq ($(CONFIG_BOARD_EMULATION_QEMU_X86_Q35),y)
|
|||||||
ramstage-y += madt.c
|
ramstage-y += madt.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SMM_ASEG),y)
|
ramstage-$(CONFIG_SMM_LEGACY_ASEG) += smi.c
|
||||||
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c
|
ramstage-$(CONFIG_SMM_LEGACY_ASEG) += ../../../cpu/x86/smm/smmrelocate.S
|
||||||
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += ../../../cpu/x86/smm/smmrelocate.S
|
|
||||||
endif
|
|
||||||
|
|
||||||
CPPFLAGS_common += -I$(src)/southbridge/intel/i82801ix/include
|
CPPFLAGS_common += -I$(src)/southbridge/intel/i82801ix/include
|
||||||
|
|
||||||
|
@@ -378,7 +378,7 @@ static void lpc_init(struct device *dev)
|
|||||||
/* Don't allow evil boot loaders, kernels, or
|
/* Don't allow evil boot loaders, kernels, or
|
||||||
* userspace applications to deceive us:
|
* userspace applications to deceive us:
|
||||||
*/
|
*/
|
||||||
if (CONFIG(HAVE_SMI_HANDLER) && !CONFIG(PARALLEL_MP))
|
if (CONFIG(SMM_LEGACY_ASEG))
|
||||||
aseg_smm_lock();
|
aseg_smm_lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <soc/nvs.h>
|
#include <soc/nvs.h>
|
||||||
|
|
||||||
#if !CONFIG(SMM_TSEG)
|
#if CONFIG(SMM_LEGACY_ASEG)
|
||||||
/* For qemu/x86-q35 to build properly. */
|
/* For qemu/x86-q35 to build properly. */
|
||||||
struct global_nvs *gnvs;
|
struct global_nvs *gnvs;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user