Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao 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>
if ((Pte[0] & IA32_PG_PS) == 0) {\r
// 4K-page entries are already mapped. Just hide the first one anyway.\r
Pte = (UINT64*)(UINTN)(Pte[0] & ~mAddressEncMask & ~(EFI_PAGE_SIZE - 1));\r
- Pte[0] &= ~IA32_PG_P; // Hide page 0\r
+ Pte[0] &= ~(UINT64)IA32_PG_P; // Hide page 0\r
} else {\r
// Create 4K-page entries\r
Pages = (UINTN)AllocatePageTableMemory (1);\r