]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm
UefiCpuPkg/PiSmmCpu: Enable 5L paging only when phy addr line > 48
authorRay Ni <ray.ni@intel.com>
Thu, 5 Sep 2019 22:18:47 +0000 (06:18 +0800)
committerRay Ni <ray.ni@intel.com>
Fri, 13 Sep 2019 08:20:54 +0000 (16:20 +0800)
commit86ad762fa7a51cbf94e34e732961aae3de3339c3
treed7572c31274c1c4170de2774b73488b9adde029d
parent5a9db858806912ebd4e836aaa607ef6d87ce9c0d
UefiCpuPkg/PiSmmCpu: Enable 5L paging only when phy addr line > 48

Today's behavior is to enable 5l paging when CPU supports it
(CPUID[7,0].ECX.BIT[16] is set).

The patch changes the behavior to enable 5l paging when two
conditions are both met:
1. CPU supports it;
2. The max physical address bits is bigger than 48.

Because 4-level paging can support to address physical address up to
2^48 - 1, there is no need to enable 5-level paging with max
physical address bits <= 48.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm