]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/EnablePaging64.nasm
MdePkg: Replace Opcode with the corresponding instructions.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / EnablePaging64.nasm
index 544e3c38924647e89e1a2f38eaaf4686275e30c5..ef1145807752612ec6486ada898c477d90736993 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>\r
 ; SPDX-License-Identifier: BSD-2-Clause-Patent\r
 ;\r
 ; Module Name:\r
@@ -44,16 +44,12 @@ ASM_PFX(InternalX86EnablePaging64):
     mov     cr0, eax                    ; enable paging\r
     retf                                ; topmost 2 dwords hold the address\r
 .0:\r
-    DB      0x67, 0x48                    ; 32-bit address size, 64-bit operand size\r
-    mov     ebx, [esp]                  ; mov rbx, [esp]\r
-    DB      0x67, 0x48\r
-    mov     ecx, [esp + 8]              ; mov rcx, [esp + 8]\r
-    DB      0x67, 0x48\r
-    mov     edx, [esp + 0x10]            ; mov rdx, [esp + 10h]\r
-    DB      0x67, 0x48\r
-    mov     esp, [esp + 0x18]            ; mov rsp, [esp + 18h]\r
-    DB      0x48\r
-    add     esp, -0x20                   ; add rsp, -20h\r
-    call    ebx                         ; call rbx\r
+BITS 64\r
+    mov     rbx, [esp]\r
+    mov     rcx, [esp + 8]\r
+    mov     rdx, [esp + 0x10]\r
+    mov     rsp, [esp + 0x18]\r
+    add     rsp, -0x20\r
+    call    rbx\r
     hlt                                 ; no one should get here\r
 \r