diff --git a/src/soc/amd/common/block/cpu/smm/smi_handler.c b/src/soc/amd/common/block/cpu/smm/smi_handler.c index e535cb0f14..ee8423a0f5 100644 --- a/src/soc/amd/common/block/cpu/smm/smi_handler.c +++ b/src/soc/amd/common/block/cpu/smm/smi_handler.c @@ -7,6 +7,11 @@ #include #include +__weak void mainboard_handle_smi(int event) +{ + printk(BIOS_WARNING, "SMI event %d is missing handler\n", event); +} + static void process_smi_sources(uint32_t reg) { const uint32_t status = smi_read32(reg); @@ -19,6 +24,8 @@ static void process_smi_sources(uint32_t reg) source_handler = get_smi_source_handler(i + bit_zero); if (source_handler) source_handler(); + else if (reg != SMI_REG_SMISTS0 || (status & GEVENT_MASK) == 0) + mainboard_handle_smi(i + bit_zero); } } diff --git a/src/soc/amd/common/block/include/amdblocks/smm.h b/src/soc/amd/common/block/include/amdblocks/smm.h index 187eddf691..46008fae2e 100644 --- a/src/soc/amd/common/block/include/amdblocks/smm.h +++ b/src/soc/amd/common/block/include/amdblocks/smm.h @@ -14,3 +14,5 @@ void *get_smi_source_handler(int source); void handle_smi_gsmi(void); void handle_smi_store(void); void clear_tvalid(void); +/* See SMITYPE_* for list possible of events. GEVENTS are handled with mainboard_smi_gpi. */ +void mainboard_handle_smi(int event);