diff --git a/src/soc/amd/common/block/cpu/smm/smi_apmc.c b/src/soc/amd/common/block/cpu/smm/smi_apmc.c index 9df6ae3132..7c98405e10 100644 --- a/src/soc/amd/common/block/cpu/smm/smi_apmc.c +++ b/src/soc/amd/common/block/cpu/smm/smi_apmc.c @@ -33,6 +33,8 @@ static void *find_save_state(int cmd) /* Check all nodes looking for the one that issued the IO */ for (core = 0; core < CONFIG_MAX_CPUS; core++) { state = smm_get_save_state(core); + if (!state) + continue; smm_io_trap = state->smm_io_trap_offset; /* Check for Valid IO Trap Word (bit1==1) */ if (!(smm_io_trap & SMM_IO_TRAP_VALID)) diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c index d2588cf766..617ee10f58 100644 --- a/src/soc/intel/braswell/smihandler.c +++ b/src/soc/intel/braswell/smihandler.c @@ -176,6 +176,8 @@ static em64t100_smm_state_save_area_t *smi_apmc_find_state_save(uint8_t cmd) /* Check all nodes looking for the one that issued the IO */ for (node = 0; node < CONFIG_MAX_CPUS; node++) { state = smm_get_save_state(node); + if (!state) + continue; /* Check for Synchronous IO (bit0==1) */ if (!(state->io_misc_info & (1 << 0))) diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c index 99906d944c..890167b45b 100644 --- a/src/soc/intel/broadwell/pch/smihandler.c +++ b/src/soc/intel/broadwell/pch/smihandler.c @@ -228,6 +228,8 @@ static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd) /* Check all nodes looking for the one that issued the IO */ for (node = 0; node < CONFIG_MAX_CPUS; node++) { state = smm_get_save_state(node); + if (!state) + continue; /* Check for Synchronous IO (bit0 == 1) */ if (!(state->io_misc_info & (1 << 0))) diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c index 3bdc2a47ac..88d3e808bb 100644 --- a/src/soc/intel/denverton_ns/smihandler.c +++ b/src/soc/intel/denverton_ns/smihandler.c @@ -141,6 +141,8 @@ static em64t100_smm_state_save_area_t *smi_apmc_find_state_save(uint8_t cmd) /* Check all nodes looking for the one that issued the IO */ for (node = 0; node < CONFIG_MAX_CPUS; node++) { state = smm_get_save_state(node); + if (!state) + continue; /* Check for Synchronous IO (bit0==1) */ if (!(state->io_misc_info & (1 << 0))) diff --git a/src/southbridge/intel/common/smihandler.c b/src/southbridge/intel/common/smihandler.c index 798f2f1387..b1a6a6689d 100644 --- a/src/southbridge/intel/common/smihandler.c +++ b/src/southbridge/intel/common/smihandler.c @@ -205,6 +205,8 @@ static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd) /* Check all nodes looking for the one that issued the IO */ for (node = 0; node < CONFIG_MAX_CPUS; node++) { state = smm_get_save_state(node); + if (!state) + continue; /* Check for Synchronous IO (bit0 == 1) */ if (!(state->io_misc_info & (1 << 0))) diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c index 8caafb716f..838b448db4 100644 --- a/src/southbridge/intel/lynxpoint/smihandler.c +++ b/src/southbridge/intel/lynxpoint/smihandler.c @@ -177,6 +177,8 @@ static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd) /* Check all nodes looking for the one that issued the IO */ for (node = 0; node < CONFIG_MAX_CPUS; node++) { state = smm_get_save_state(node); + if (!state) + continue; /* Check for Synchronous IO (bit0 == 1) */ if (!(state->io_misc_info & (1 << 0)))