mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
UefiCpuPkg/PiSmmCpuDxeSmm: Clean mCpuSmmRestrictedMemoryAccess
Currently, mCpuSmmRestrictedMemoryAccess is only used by the IsRestrictedMemoryAccess(). And IsRestrictedMemoryAccess() can consume the PcdCpuSmmRestrictedMemoryAccess directly. Therefore, mCpuSmmRestrictedMemoryAccess can be cleaned to simply the code logic. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
633a755d99
commit
b4820f2d65
@ -15,7 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
LIST_ENTRY mPagePool = INITIALIZE_LIST_HEAD_VARIABLE (mPagePool);
|
LIST_ENTRY mPagePool = INITIALIZE_LIST_HEAD_VARIABLE (mPagePool);
|
||||||
BOOLEAN m1GPageTableSupport = FALSE;
|
BOOLEAN m1GPageTableSupport = FALSE;
|
||||||
BOOLEAN mCpuSmmRestrictedMemoryAccess;
|
|
||||||
X86_ASSEMBLY_PATCH_LABEL gPatch5LevelPagingNeeded;
|
X86_ASSEMBLY_PATCH_LABEL gPatch5LevelPagingNeeded;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -207,10 +206,9 @@ SmmInitPageTable (
|
|||||||
//
|
//
|
||||||
InitializeSpinLock (mPFLock);
|
InitializeSpinLock (mPFLock);
|
||||||
|
|
||||||
mCpuSmmRestrictedMemoryAccess = PcdGetBool (PcdCpuSmmRestrictedMemoryAccess);
|
m1GPageTableSupport = Is1GPageSupport ();
|
||||||
m1GPageTableSupport = Is1GPageSupport ();
|
m5LevelPagingNeeded = Is5LevelPagingNeeded ();
|
||||||
m5LevelPagingNeeded = Is5LevelPagingNeeded ();
|
mPhysicalAddressBits = CalculateMaximumSupportAddress (m5LevelPagingNeeded);
|
||||||
mPhysicalAddressBits = CalculateMaximumSupportAddress (m5LevelPagingNeeded);
|
|
||||||
PatchInstructionX86 (gPatch5LevelPagingNeeded, m5LevelPagingNeeded, 1);
|
PatchInstructionX86 (gPatch5LevelPagingNeeded, m5LevelPagingNeeded, 1);
|
||||||
if (m5LevelPagingNeeded) {
|
if (m5LevelPagingNeeded) {
|
||||||
mPagingMode = m1GPageTableSupport ? Paging5Level1GB : Paging5Level;
|
mPagingMode = m1GPageTableSupport ? Paging5Level1GB : Paging5Level;
|
||||||
@ -220,7 +218,6 @@ SmmInitPageTable (
|
|||||||
|
|
||||||
DEBUG ((DEBUG_INFO, "5LevelPaging Needed - %d\n", m5LevelPagingNeeded));
|
DEBUG ((DEBUG_INFO, "5LevelPaging Needed - %d\n", m5LevelPagingNeeded));
|
||||||
DEBUG ((DEBUG_INFO, "1GPageTable Support - %d\n", m1GPageTableSupport));
|
DEBUG ((DEBUG_INFO, "1GPageTable Support - %d\n", m1GPageTableSupport));
|
||||||
DEBUG ((DEBUG_INFO, "PcdCpuSmmRestrictedMemoryAccess - %d\n", mCpuSmmRestrictedMemoryAccess));
|
|
||||||
DEBUG ((DEBUG_INFO, "PhysicalAddressBits - %d\n", mPhysicalAddressBits));
|
DEBUG ((DEBUG_INFO, "PhysicalAddressBits - %d\n", mPhysicalAddressBits));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -881,5 +878,5 @@ IsRestrictedMemoryAccess (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return mCpuSmmRestrictedMemoryAccess;
|
return PcdGetBool (PcdCpuSmmRestrictedMemoryAccess);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user