audk/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32
Jiaxin Wu f73b97fe7f UefiCpuPkg/PiSmmCpuDxeSmm: Check PDE entry exist or not before use
Before the commit 701b5797 & 4ceefd6d, 2MB-page will be created to
cover [0: 4G] by default if SmmProfile enabled, and it will be go
through to change 2MB-page into 4KB-page during page table update
(InitPaging). If so, there was no problem to assert PDE entry exist
in the RestorePageTableBelow4G.

But after above commits, PageTableMap API is used to create/update
the page table, 1G-page will be the default page table mode, and
only covers the limited address range. Those not covered ranges
will be marked as non-present in 1g-page level address. If so,
2M-page address might not exist, it's incorrect to assert PDE
entry exist in the RestorePageTableBelow4G.

The correct behavior should check PDE entry exist or not, if not,
PDE should be allocated and assigned to PDPTE.

Note:
RestorePageTableBelow4G () does not use 1G page size entries
for the creation of new pages, maintaining consistency with the
behavior of the original code.

The purpose of this patch is to ensure that a Page Directory Entry
(PDE) exists prior to its usage.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-08-02 05:13:42 +00:00
..
Cet.nasm UefiCpuPkg: Use macro CR4_CET_BIT to replace hard code value in Cet.nasm. 2023-12-07 09:43:43 +00:00
PageTbl.c UefiCpuPkg/PiSmmCpuDxeSmm: Check PDE entry exist or not before use 2024-08-02 05:13:42 +00:00
SmiEntry.nasm UefiCpuPkg: Backup and Restore MSR IA32_U_CET in SMI handler. 2023-12-07 09:43:43 +00:00
SmiException.nasm UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
SmmFuncsArch.c UefiCpuPkg:Remove code to wakeup AP and relocate ap 2024-06-04 07:40:27 +00:00
SmmProfileArch.c UefiCpuPkg: Use GenSmmPageTable() to create Smm S3 page table 2023-06-30 11:07:40 +05:30
SmmProfileArch.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00