]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg: Fix SMM code hangs when InitPaging
authorZhiguang Liu <zhiguang.liu@intel.com>
Wed, 4 Jan 2023 03:42:43 +0000 (11:42 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 3 Feb 2023 08:24:55 +0000 (08:24 +0000)
commit13b97736c876919b9786055829caaa4fa46984b7
tree3c86dc7643fa08d1257187c1ba93905be5f8e275
parent11f0014c0e3046e3762eac420b760091d0cdc063
UefiCpuPkg: Fix SMM code hangs when InitPaging

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4246

In function InitPaging, NumberOfPml5Entries is calculated by below code
NumberOfPml5Entries = (UINTN)LShiftU64 (1, SizeOfMemorySpace - 48);
If the SizeOfMemorySpace is larger than 48, NumberOfPml5Entries will be
larger than 1. However, this doesn't make sense if the hardware doesn't
support 5 level page table.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Eric Dong <eric.dong@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c