]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/ResetVector/Vtf0/Ia32/Flat32ToFlat64.asm
UefiCpuPkg: Clean up source files
[mirror_edk2.git] / UefiCpuPkg / ResetVector / Vtf0 / Ia32 / Flat32ToFlat64.asm
index 9eba864c2853831224346dc955a1aeaf42bd26ce..5b6b375330d708229b88788929024aa43fa12583 100644 (file)
@@ -2,7 +2,7 @@
 ; @file\r
 ; Transition from 32 bit flat protected mode into 64 bit flat protected mode\r
 ;\r
-; Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -20,12 +20,11 @@ BITS    32
 ;\r
 Transition32FlatTo64Flat:\r
 \r
-    mov     eax, ((ADDR_OF_START_OF_RESET_CODE & ~0xfff) - 0x1000)\r
-    mov     cr3, eax\r
+    OneTimeCall SetCr3ForPageTables64\r
 \r
     mov     eax, cr4\r
     bts     eax, 5                      ; enable PAE\r
-    mov     cr4, eax                    \r
+    mov     cr4, eax\r
 \r
     mov     ecx, 0xc0000080\r
     rdmsr\r