diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-03-18 19:27:12 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-03-25 10:52:13 +0100 |
commit | beca921d98f70f39ee9e13e429eb9e67c0d377d7 (patch) | |
tree | 512dcf4e05679a7ac2c823c239a400de11bf7174 /EdkCompatibilityPkg | |
parent | dbd62b34bcacd8aa2b8ded6a1104b6c14ddf3419 (diff) | |
download | edk2-beca921d98f70f39ee9e13e429eb9e67c0d377d7.tar.gz edk2-beca921d98f70f39ee9e13e429eb9e67c0d377d7.tar.bz2 edk2-beca921d98f70f39ee9e13e429eb9e67c0d377d7.zip |
EdkCompatibilityPkg: SmmBaseHelper: remove set but unused variables
This patch also eliminates an AsmReadCr3() call in PageFaultHandler(), but
that should not be a problem.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r-- | EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c index 16566d2b29..5f220dd476 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c @@ -228,7 +228,6 @@ WriteCpuSaveState ( IN EFI_SMM_CPU_SAVE_STATE *ToWrite
)
{
- EFI_STATUS Status;
UINTN Index;
EFI_SMM_CPU_STATE *State;
EFI_SMI_CPU_SAVE_STATE *SaveState;
@@ -250,14 +249,14 @@ WriteCpuSaveState ( State->x86.AutoHALTRestart = SaveState->AutoHALTRestart;
for (Index = 0; Index < sizeof (mCpuSaveStateConvTable) / sizeof (CPU_SAVE_STATE_CONVERSION); Index++) {
- Status = mSmmCpu->WriteSaveState (
- mSmmCpu,
- (UINTN)sizeof (UINT32),
- mCpuSaveStateConvTable[Index].Register,
- CpuIndex,
- ((UINT8 *)SaveState) +
- mCpuSaveStateConvTable[Index].Offset
- );
+ mSmmCpu->WriteSaveState (
+ mSmmCpu,
+ (UINTN)sizeof (UINT32),
+ mCpuSaveStateConvTable[Index].Register,
+ CpuIndex,
+ ((UINT8 *)SaveState) +
+ mCpuSaveStateConvTable[Index].Offset
+ );
}
}
@@ -345,14 +344,12 @@ PageFaultHandler ( )
{
BOOLEAN IsHandled;
- UINT64 *PageTable;
UINT64 PFAddress;
UINTN NumCpuStatePages;
ASSERT (mPageTableHookEnabled);
AcquireSpinLock (&mPFLock);
- PageTable = (UINT64*)(UINTN)(AsmReadCr3 () & mPhyMask);
PFAddress = AsmReadCr2 ();
NumCpuStatePages = EFI_SIZE_TO_PAGES (mNumberOfProcessors * sizeof (EFI_SMM_CPU_SAVE_STATE));
IsHandled = FALSE;
|