]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuDxe: fix an incorrect bit-wise operation
authorJian J Wang <jian.j.wang@intel.com>
Sat, 8 Sep 2018 02:43:00 +0000 (10:43 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Mon, 10 Sep 2018 09:08:22 +0000 (17:08 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1164

The left operand is 64-bit but right operand could be 32-bit.
A typecast is a must because of '~' op before it.

Cc: Hao A Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
UefiCpuPkg/CpuDxe/CpuPageTable.c

index ef6e080a0787280248313984d8cbf4b5979ec68f..0a980b97534edfb27d956fe6d01cf5fdc137500f 100644 (file)
@@ -1181,7 +1181,7 @@ DebugExceptionHandler (
 \r
   for (PFEntry = 0; PFEntry < mPFEntryCount[CpuIndex]; PFEntry++) {\r
     if (mLastPFEntryPointer[CpuIndex][PFEntry] != NULL) {\r
-      *mLastPFEntryPointer[CpuIndex][PFEntry] &= ~IA32_PG_P;\r
+      *mLastPFEntryPointer[CpuIndex][PFEntry] &= ~(UINT64)IA32_PG_P;\r
     }\r
   }\r
 \r