summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2019-07-11 09:16:03 +0800
committerRay Ni <ray.ni@intel.com>2019-07-12 15:44:45 +0800
commitc630f69df01e832aeae45c37f33d2b93e98c9389 (patch)
tree1822e0ea6ff79b8ba84f0d01caef95a28c53003d
parent4eee0cc7cc0db74489b99c19eba056b53eda6358 (diff)
downloadedk2-c630f69df01e832aeae45c37f33d2b93e98c9389.tar.gz
edk2-c630f69df01e832aeae45c37f33d2b93e98c9389.tar.bz2
edk2-c630f69df01e832aeae45c37f33d2b93e98c9389.zip
UefiCpuPkg/PiSmmCpu: ReclaimPages: fix incorrect operator binding
Fixes: 4eee0cc7c Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index c31160735a..a3b62f7787 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -571,7 +571,7 @@ ReclaimPages (
//
// First, find the leaf entry has the smallest access record value
//
- for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof (*Pml4)) : 1; Pml5Index++) {
+ for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof (*Pml4)) : 1); Pml5Index++) {
if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] & IA32_PG_PMNT) != 0) {
//
// If the PML5 entry is not present or is masked, skip it