UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code.

Remove useless code after change 93324390.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Eric Dong 2018-10-25 10:03:57 +08:00
parent e07e3cebc7
commit 31fb333431
2 changed files with 1 additions and 25 deletions

View File

@ -1272,7 +1272,6 @@ InitializeSmmCpuSemaphores (
UINTN TotalSize;
UINTN GlobalSemaphoresSize;
UINTN CpuSemaphoresSize;
UINTN MsrSemahporeSize;
UINTN SemaphoreSize;
UINTN Pages;
UINTN *SemaphoreBlock;
@ -1282,8 +1281,7 @@ InitializeSmmCpuSemaphores (
ProcessorCount = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
GlobalSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_GLOBAL) / sizeof (VOID *)) * SemaphoreSize;
CpuSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_CPU) / sizeof (VOID *)) * ProcessorCount * SemaphoreSize;
MsrSemahporeSize = MSR_SPIN_LOCK_INIT_NUM * SemaphoreSize;
TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize + MsrSemahporeSize;
TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize;
DEBUG((EFI_D_INFO, "One Semaphore Size = 0x%x\n", SemaphoreSize));
DEBUG((EFI_D_INFO, "Total Semaphores Size = 0x%x\n", TotalSize));
Pages = EFI_SIZE_TO_PAGES (TotalSize);
@ -1311,12 +1309,6 @@ InitializeSmmCpuSemaphores (
SemaphoreAddr += ProcessorCount * SemaphoreSize;
mSmmCpuSemaphores.SemaphoreCpu.Present = (BOOLEAN *)SemaphoreAddr;
SemaphoreAddr = (UINTN)SemaphoreBlock + GlobalSemaphoresSize + CpuSemaphoresSize;
mSmmCpuSemaphores.SemaphoreMsr.Msr = (SPIN_LOCK *)SemaphoreAddr;
mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter =
((UINTN)SemaphoreBlock + Pages * SIZE_4KB - SemaphoreAddr) / SemaphoreSize;
ASSERT (mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter >= MSR_SPIN_LOCK_INIT_NUM);
mPFLock = mSmmCpuSemaphores.SemaphoreGlobal.PFLock;
mConfigSmmCodeAccessCheckLock = mSmmCpuSemaphores.SemaphoreGlobal.CodeAccessCheckLock;

View File

@ -347,13 +347,6 @@ typedef struct {
volatile BOOLEAN *CandidateBsp;
} SMM_DISPATCHER_MP_SYNC_DATA;
#define MSR_SPIN_LOCK_INIT_NUM 15
typedef struct {
SPIN_LOCK *SpinLock;
UINT32 MsrIndex;
} MP_MSR_LOCK;
#define SMM_PSD_OFFSET 0xfb00
///
@ -376,21 +369,12 @@ typedef struct {
volatile BOOLEAN *Present;
} SMM_CPU_SEMAPHORE_CPU;
///
/// All MSRs semaphores' pointer and counter
///
typedef struct {
SPIN_LOCK *Msr;
UINTN AvailableCounter;
} SMM_CPU_SEMAPHORE_MSR;
///
/// All semaphores' information
///
typedef struct {
SMM_CPU_SEMAPHORE_GLOBAL SemaphoreGlobal;
SMM_CPU_SEMAPHORE_CPU SemaphoreCpu;
SMM_CPU_SEMAPHORE_MSR SemaphoreMsr;
} SMM_CPU_SEMAPHORES;
extern IA32_DESCRIPTOR gcSmiGdtr;