]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
Fix the bug in x64 thunk code that it cannot handle the case when GDT is loaded in...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / EnablePaging32.S
index 858755508a72e56c4add016e14b7b58210c4f329..2afc12f86f07f248eff3eeee28b95288eaca1273 100644 (file)
@@ -21,7 +21,7 @@
 #\r
 #------------------------------------------------------------------------------\r
 \r
-.globl ASM_PFX(InternalX86EnablePaging32)\r
+ASM_GLOBAL ASM_PFX(InternalX86EnablePaging32)\r
 \r
 #------------------------------------------------------------------------------\r
 # VOID\r
@@ -38,14 +38,14 @@ ASM_PFX(InternalX86EnablePaging32):
     movl    8(%esp), %ecx\r
     movl    12(%esp), %edx\r
     pushfl\r
-    pop     %edi\r
+    pop     %edi                        # save flags in edi\r
     cli\r
     movl    %cr0, %eax\r
     btsl    $31, %eax\r
     movl    16(%esp), %esp\r
     movl    %eax, %cr0\r
     push    %edi\r
-    popfl\r
+    popfl                               # restore flags\r
     push    %edx\r
     push    %ecx\r
     call    *%ebx\r