UefiCpuPkg/PiSmmCpuDxeSmm: Check ProcessorId == INVALID_APIC_ID
If PcdCpuHotPlugSupport is TRUE, gSmst->NumberOfCpus will be the
PcdCpuMaxLogicalProcessorNumber. If gSmst->SmmStartupThisAp() is invoked for
those un-existed processors, ASSERT() happened in ConfigSmmCodeAccessCheck().
This fix is to check if ProcessorId is valid before invoke
gSmst->SmmStartupThisAp() in ConfigSmmCodeAccessCheck() and to check if
ProcessorId is valid in InternalSmmStartupThisAp() to avoid unexpected DEBUG
error message displayed.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
(cherry picked from commit b7025df8f9
)
This commit is contained in:
@@ -1117,7 +1117,12 @@ ConfigSmmCodeAccessCheck (
|
||||
//
|
||||
for (Index = 0; Index < gSmst->NumberOfCpus; Index++) {
|
||||
if (Index != gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu) {
|
||||
|
||||
if (gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID) {
|
||||
//
|
||||
// If this processor does not exist
|
||||
//
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// Acquire Config SMM Code Access Check spin lock. The AP will release the
|
||||
// spin lock when it is done executing ConfigSmmCodeAccessCheckOnCurrentProcessor().
|
||||
|
Reference in New Issue
Block a user