audk/UefiCpuPkg/PiSmmCpuDxeSmm/X64
Dun Tan db59ff333d UefiCpuPkg:Limit PhysicalAddressBits in special case
When creating smm page table, limit maximum
supported physical addresses bits returned by
CalculateMaximumSupportAddress() to 47 if
5-Level Paging is disabled.

This commit is to avoid issue that more than
47-bit physical addresses are requested in smm
page table when 5-level paging is disabled.
4-level paging supports translating 48-bit
linear addresses to 52-bit physical addresses.
Since linear addresses are sign-extended,
linear-address space of 4-level paging is:
[0, 2^47-1] and
[0xffff8000_00000000, 0xffffffff_ffffffff].
So only [0, 2^47-1] linear-address range maps
to the identical physical-address range when
5-Level paging is disabled.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
2024-01-15 01:46:36 +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
MpFuncs.nasm UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PageTbl.c UefiCpuPkg:Limit PhysicalAddressBits in special case 2024-01-15 01:46:36 +00:00
Semaphore.c UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +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: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h 2023-06-30 11:07:40 +05:30
SmmInit.nasm UefiCpuPkg/PiSmm: Fix various typos 2020-02-10 22:30:07 +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