UefiCpuPkg/PiSmmCpu: Restrict access per PcdCpuSmmRestrictedMemoryAccess
Today's behavior is to always restrict access to non-SMRAM regardless the value of PcdCpuSmmRestrictedMemoryAccess. Because RAS components require to access all non-SMRAM memory, the patch changes the code logic to honor PcdCpuSmmRestrictedMemoryAccess so that only when the PCD is true, the restriction takes affect and page table memory is also protected. Because IA32 build doesn't reference this PCD, such restriction always takes affect in IA32 build. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -1450,4 +1450,15 @@ InitializeDataForMmMp (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
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
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user