Skip to content

Commit

Permalink
UefiCpuPkg/CpuDxe: fix an incorrect bit-wise operation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <[email protected]>
Reviewed-by: Hao Wu <[email protected]>
Jian J Wang committed Sep 10, 2018
1 parent 51d0100 commit 8e2018f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UefiCpuPkg/CpuDxe/CpuPageTable.c
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 8e2018f

Please sign in to comment.