]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
MdeModulePkg/DxeIplPeim: Relocate operation of PageMapLevel5Entry++
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / X64 / VirtualMemory.c
index b40b7e0c9813b06459f7008c25919ab778a64d18..2389f3eb485b2e5919ac01439ec0b4a8f800a804 100644 (file)
@@ -764,7 +764,7 @@ CreateIdentityMappingPageTables (
 \r
   for ( IndexOfPml5Entries = 0\r
       ; IndexOfPml5Entries < NumberOfPml5EntriesNeeded\r
-      ; IndexOfPml5Entries++, PageMapLevel5Entry++) {\r
+      ; IndexOfPml5Entries++) {\r
     //\r
     // Each PML5 entry points to a page of PML4 entires.\r
     // So lets allocate space for them and fill them in in the IndexOfPml4Entries loop.\r
@@ -780,6 +780,7 @@ CreateIdentityMappingPageTables (
       PageMapLevel5Entry->Uint64 = (UINT64) (UINTN) PageMapLevel4Entry | AddressEncMask;\r
       PageMapLevel5Entry->Bits.ReadWrite = 1;\r
       PageMapLevel5Entry->Bits.Present   = 1;\r
+      PageMapLevel5Entry++;\r
     }\r
 \r
     for ( IndexOfPml4Entries = 0\r