From 79da2d284983fbe9584247b0004d264d8b1265e6 Mon Sep 17 00:00:00 2001 From: Jian J Wang Date: Thu, 12 Oct 2017 12:49:18 +0800 Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix bitwise size issue Cc: Eric Dong Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Reviewed-by: Hao Wu --- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index 0d3223d714..17459c790c 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -891,7 +891,7 @@ Gen4GPageTable ( if ((Pte[0] & IA32_PG_PS) == 0) { // 4K-page entries are already mapped. Just hide the first one anyway. Pte = (UINT64*)(UINTN)(Pte[0] & ~mAddressEncMask & ~(EFI_PAGE_SIZE - 1)); - Pte[0] &= ~IA32_PG_P; // Hide page 0 + Pte[0] &= ~(UINT64)IA32_PG_P; // Hide page 0 } else { // Create 4K-page entries Pages = (UINTN)AllocatePageTableMemory (1);