From 96e8676577407e3270881a9e41b4ba257da986bc Mon Sep 17 00:00:00 2001 From: Dun Tan Date: Fri, 17 Mar 2023 15:43:26 +0800 Subject: UefiCpuPkg/MpInitLib: Add code to initialize MapMask In function CreatePageTable(), add code to initialize MapMask to MAX_UINT64. When creating new page table or map non-present range to present, all attributes should be provided. Signed-off-by: Dun Tan Cc: Eric Dong Reviewed-by: Ray Ni Cc: Rahul Kumar Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann --- UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c b/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c index 7cf91ed9c4..f20068152b 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c +++ b/UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c @@ -36,10 +36,7 @@ CreatePageTable ( MapAttribute.Uint64 = Address; MapAttribute.Bits.Present = 1; MapAttribute.Bits.ReadWrite = 1; - - MapMask.Bits.PageTableBaseAddress = 1; - MapMask.Bits.Present = 1; - MapMask.Bits.ReadWrite = 1; + MapMask.Uint64 = MAX_UINT64; PageTable = 0; PageTableBufferSize = 0; -- cgit