summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuDxe
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2018-09-08 10:43:00 +0800
committerJian J Wang <jian.j.wang@intel.com>2018-09-10 17:08:22 +0800
commit8e2018f944ed18400f468fd9380284d665535481 (patch)
tree87860e86e632575d2ab29879a5b873e2cdb95b7d /UefiCpuPkg/CpuDxe
parent51d0100b3c711554f28ff990f484e79e053fd518 (diff)
downloadedk2-8e2018f944ed18400f468fd9380284d665535481.tar.gz
edk2-8e2018f944ed18400f468fd9380284d665535481.tar.bz2
edk2-8e2018f944ed18400f468fd9380284d665535481.zip
UefiCpuPkg/CpuDxe: fix an incorrect bit-wise operation
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>
Diffstat (limited to 'UefiCpuPkg/CpuDxe')
-rw-r--r--UefiCpuPkg/CpuDxe/CpuPageTable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
index ef6e080a07..0a980b9753 100644
--- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
+++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
@@ -1181,7 +1181,7 @@ DebugExceptionHandler (
for (PFEntry = 0; PFEntry < mPFEntryCount[CpuIndex]; PFEntry++) {
if (mLastPFEntryPointer[CpuIndex][PFEntry] != NULL) {
- *mLastPFEntryPointer[CpuIndex][PFEntry] &= ~IA32_PG_P;
+ *mLastPFEntryPointer[CpuIndex][PFEntry] &= ~(UINT64)IA32_PG_P;
}
}