]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg NASM Thunk16: Work around NASM 2.09.04 - 2.10rc1 bug
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 4 Sep 2014 15:17:48 +0000 (15:17 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Sep 2014 15:17:48 +0000 (15:17 +0000)
Without this change, NASM 2.09.04 will hang with OVMF+CSM on both IA32
and X64.

Tested on OVMF+CSM on GCC49 with NASM 2.07, 2.09.04 and 2.11.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16058 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
MdePkg/Library/BaseLib/X64/Thunk16.nasm

index e8468a3fbfb67b7eff97c378d4a51aac6fc40804..e3d0d4e4173858dd29694c16067397b2f2510d05 100644 (file)
@@ -85,7 +85,11 @@ _BackFromUserCode:
 BITS    16\r
     push    ss\r
     push    cs\r
-o32 call    dword .Base                 ; push eip\r
+    ;\r
+    ; Note: We can't use o32 on the next instruction because of a bug\r
+    ; in NASM 2.09.04 through 2.10rc1.\r
+    ;\r
+    call    dword .Base                 ; push eip\r
 .Base:\r
     pushfd\r
     cli                                 ; disable interrupts\r
index 6084fac8c42cf477c008e450c9cdf5323a9aa158..7c4a8d3e1759f0e22588fe6923af4be2bcabcf40 100644 (file)
@@ -83,7 +83,11 @@ _BackFromUserCode:
 BITS    16\r
     push    ss\r
     push    cs\r
-o32 call    dword .Base                 ; push eip\r
+    ;\r
+    ; Note: We can't use o32 on the next instruction because of a bug\r
+    ; in NASM 2.09.04 through 2.10rc1.\r
+    ;\r
+    call    dword .Base                 ; push eip\r
 .Base:\r
     push    dword 0                     ; reserved high order 32 bits of EFlags\r
     pushfd\r