UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex

This patch is to remove unnecessary CpuIndex.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Jiaxin Wu
2024-04-23 14:00:44 +08:00
committed by mergify[bot]
parent 9783dc01cc
commit c56ea95b28
5 changed files with 3 additions and 23 deletions

View File

@@ -31,11 +31,6 @@ UINT64 mSmBase;
//
volatile BOOLEAN mRebased;
//
// CpuIndex for current CPU
//
UINTN mCpuIndex;
/**
This function will get the SmBase for CpuIndex.
@@ -155,7 +150,7 @@ SmmInitHandler (
// SMM re-based flag can't be set before RSM, because SMM save state context might be override
// by next AP flow before it take effect.
//
SemaphoreHook (mCpuIndex, &mRebased);
SemaphoreHook (&mRebased);
}
/**
@@ -227,9 +222,8 @@ SmmRelocateBases (
ASSERT_EFI_ERROR (Status);
if (BspApicId != (UINT32)ProcessorInfo.ProcessorId) {
mRebased = FALSE;
mSmBase = GetSmBase (Index, SmmRelocationStart, TileSize);
mCpuIndex = Index;
mRebased = FALSE;
mSmBase = GetSmBase (Index, SmmRelocationStart, TileSize);
SendSmiIpi ((UINT32)ProcessorInfo.ProcessorId);
//
// Wait for this AP to finish its 1st SMI