diff options
Diffstat (limited to 'src/cpu/x86/smm/smm_module_handler.c')
-rw-r--r-- | src/cpu/x86/smm/smm_module_handler.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c index 79863d8fef..8c0e804523 100644 --- a/src/cpu/x86/smm/smm_module_handler.c +++ b/src/cpu/x86/smm/smm_module_handler.c @@ -22,6 +22,12 @@ #include <cpu/x86/smm.h> #include <rmodule.h> +#if CONFIG_SPI_FLASH_SMM +#include <spi-generic.h> +#endif + +static int do_driver_init = 1; + typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore; /* SMI multiprocessing semaphore */ @@ -154,6 +160,14 @@ void asmlinkage smm_handler_start(void *arg) printk(BIOS_SPEW, "\nSMI# #%d\n", cpu); + /* Allow drivers to initialize variables in SMM context. */ + if (do_driver_init) { +#if CONFIG_SPI_FLASH_SMM + spi_init(); +#endif + do_driver_init = 0; + } + cpu_smi_handler(); northbridge_smi_handler(); southbridge_smi_handler(); |