]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/PiSmmCpu: ReclaimPages: fix incorrect operator binding
authorRay Ni <ray.ni@intel.com>
Thu, 11 Jul 2019 01:16:03 +0000 (09:16 +0800)
committerRay Ni <ray.ni@intel.com>
Fri, 12 Jul 2019 07:44:45 +0000 (15:44 +0800)
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>
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c

index c31160735a3790530058026df0a8009cc4be0d6d..a3b62f778741a04617096931cd90950cbc91c6a6 100644 (file)
@@ -571,7 +571,7 @@ ReclaimPages (
   //\r
   // First, find the leaf entry has the smallest access record value\r
   //\r
-  for (Pml5Index = 0; Pml5Index < Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof (*Pml4)) : 1; Pml5Index++) {\r
+  for (Pml5Index = 0; Pml5Index < (Enable5LevelPaging ? (EFI_PAGE_SIZE / sizeof (*Pml4)) : 1); Pml5Index++) {\r
     if ((Pml5[Pml5Index] & IA32_PG_P) == 0 || (Pml5[Pml5Index] & IA32_PG_PMNT) != 0) {\r
       //\r
       // If the PML5 entry is not present or is masked, skip it\r