summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorDun Tan <dun.tan@intel.com>2023-03-17 15:43:26 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-27 08:21:58 +0000
commit96e8676577407e3270881a9e41b4ba257da986bc (patch)
tree1f9179780f3c71333c28e0efa5e1967a211e4ab7 /UefiCpuPkg
parentc90cb726f8755a7e9833e2802e35877cf1ecd3a9 (diff)
downloadedk2-96e8676577407e3270881a9e41b4ba257da986bc.tar.gz
edk2-96e8676577407e3270881a9e41b4ba257da986bc.tar.bz2
edk2-96e8676577407e3270881a9e41b4ba257da986bc.zip
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 <dun.tan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c5
1 files changed, 1 insertions, 4 deletions
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;