diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2024-07-15 10:16:12 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-02 05:13:42 +0000 |
commit | f73b97fe7f3ff12f021ea786235ec25d69d8c23c (patch) | |
tree | 242c6aaae54a95a8fcd95e8160fd7e1439597e71 /PcAtChipsetPkg | |
parent | 9d8a5fbd0ca7ed563544e71d2dbdd23b0a3f53e3 (diff) | |
download | edk2-f73b97fe7f3ff12f021ea786235ec25d69d8c23c.tar.gz |
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>
Diffstat (limited to 'PcAtChipsetPkg')
0 files changed, 0 insertions, 0 deletions