mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/PiSmmCpuDxeSmm: Remove RestrictedMemoryAccess check for MM CPU
The PcdCpuSmmRestrictedMemoryAccess is declared as either a dynamic or fixed PCD. It is not recommended for use in the MM CPU driver. Furthermore, IsRestrictedMemoryAccess() is only needed for SMM. Therefor, there is no need for MM to consume the PcdCpuSmmRestrictedMemoryAccess. So, this patch is to add the SMM specific file for its own functions, with the change, the dependency of the MM CPU driver on PcdCpuSmmRestrictedMemoryAccess can be removed. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
b4820f2d65
commit
b437b5ca4c
|
@ -229,17 +229,3 @@ RestoreCr2 (
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
Return whether access to non-SMRAM is restricted.
|
||||
|
||||
@retval TRUE Access to non-SMRAM is restricted.
|
||||
@retval FALSE Access to non-SMRAM is not restricted.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRestrictedMemoryAccess (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include "PiSmmCpuCommon.h"
|
||||
|
||||
/**
|
||||
Return whether access to non-SMRAM is restricted.
|
||||
|
||||
@retval TRUE Access to non-SMRAM is restricted.
|
||||
@retval FALSE Access to non-SMRAM is not restricted.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRestrictedMemoryAccess (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
|
@ -56,6 +56,7 @@
|
|||
Ia32/SmiEntry.nasm
|
||||
Ia32/SmiException.nasm
|
||||
Ia32/Cet.nasm
|
||||
Ia32/SmmFuncsArchDxeSmm.c
|
||||
|
||||
[Sources.X64]
|
||||
X64/PageTbl.c
|
||||
|
@ -65,6 +66,7 @@
|
|||
X64/SmiEntry.nasm
|
||||
X64/SmiException.nasm
|
||||
X64/Cet.nasm
|
||||
X64/SmmFuncsArchDxeSmm.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
|
|
@ -131,6 +131,3 @@
|
|||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
[Pcd.X64]
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmRestrictedMemoryAccess ## CONSUMES
|
||||
|
|
|
@ -866,17 +866,3 @@ RestoreCr2 (
|
|||
{
|
||||
AsmWriteCr2 (Cr2);
|
||||
}
|
||||
|
||||
/**
|
||||
Return whether access to non-SMRAM is restricted.
|
||||
|
||||
@retval TRUE Access to non-SMRAM is restricted.
|
||||
@retval FALSE Access to non-SMRAM is not restricted.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRestrictedMemoryAccess (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGetBool (PcdCpuSmmRestrictedMemoryAccess);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include "PiSmmCpuCommon.h"
|
||||
|
||||
/**
|
||||
Return whether access to non-SMRAM is restricted.
|
||||
|
||||
@retval TRUE Access to non-SMRAM is restricted.
|
||||
@retval FALSE Access to non-SMRAM is not restricted.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRestrictedMemoryAccess (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGetBool (PcdCpuSmmRestrictedMemoryAccess);
|
||||
}
|
Loading…
Reference in New Issue