summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2024-06-26 14:49:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-28 15:25:27 +0000
commit1c19ccd5103b918efef9c4076e92d175cfba8d81 (patch)
treefd06434cd0b8388d522436e9b1583f98a0401914 /UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
parent14cb36685bdc260d67c119a81f55e49a1f8e0ca3 (diff)
downloadedk2-1c19ccd5103b918efef9c4076e92d175cfba8d81.tar.gz
edk2-1c19ccd5103b918efef9c4076e92d175cfba8d81.tar.bz2
edk2-1c19ccd5103b918efef9c4076e92d175cfba8d81.zip
UefiCpuPkg/PiSmmCpuDxeSmm: Refactor code to create default Page Table
For MM: Since all accessible NON-MMRAM memory and attribute shall be in ResourceDescriptor HOBs for MM, the page table for MM can be finalized and created in the default Page. For SMM: There are still 2 steps for the finalized default Page: 1. Create default Page 2. update the page table in the first SMI when SMM ready to lock happen This patch to refactor the GenSmmPageTable() function to create the default Page Table for Both SMM and MM: 1. Create NonMmram MemoryRegion 2. Gen NonMmram MemoryRegion PageTable 3. Gen MMRAM Range PageTable 4. Consider PcdCpuSmmStackGuard & PcdNullPointerDetectionPropertyMask cases. Meanwhile, mXdSupported needs to be initialized before GenSmmPageTable since it's required by GenSmmPageTable function. So, move the mXdSupported init from CheckFeatureSupported to the common EntryPoint function. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Dun Tan <dun.tan@intel.com> Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com> Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Yuanhao Xie <yuanhao.xie@intel.com>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
index 2edfd7a8b2..e8f3f6492f 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
@@ -39,9 +39,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// CPU generic definition
//
-#define CPUID1_EDX_XD_SUPPORT 0x100000
-#define MSR_EFER 0xc0000080
-#define MSR_EFER_XD 0x800
+#define MSR_EFER 0xc0000080
+#define MSR_EFER_XD 0x800
#define CPUID1_EDX_BTS_AVAILABLE 0x200000