summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-09-04 15:17:48 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-04 15:17:48 +0000
commiteabcdf3a3467778f10f3c919e135be531758b5bd (patch)
tree9cb81ab96a0ebd3d3fe135ca80507006675ce81b /MdePkg
parent49d9b71df24a5f598df39afc6c13845e00e8f52b (diff)
MdePkg NASM Thunk16: Work around NASM 2.09.04 - 2.10rc1 bug
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
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Thunk16.nasm6
-rw-r--r--MdePkg/Library/BaseLib/X64/Thunk16.nasm6
2 files changed, 10 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
index e8468a3fb..e3d0d4e41 100644
--- a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
+++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
@@ -85,7 +85,11 @@ _BackFromUserCode:
BITS 16
push ss
push cs
-o32 call dword .Base ; push eip
+ ;
+ ; Note: We can't use o32 on the next instruction because of a bug
+ ; in NASM 2.09.04 through 2.10rc1.
+ ;
+ call dword .Base ; push eip
.Base:
pushfd
cli ; disable interrupts
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.nasm b/MdePkg/Library/BaseLib/X64/Thunk16.nasm
index 6084fac8c..7c4a8d3e1 100644
--- a/MdePkg/Library/BaseLib/X64/Thunk16.nasm
+++ b/MdePkg/Library/BaseLib/X64/Thunk16.nasm
@@ -83,7 +83,11 @@ _BackFromUserCode:
BITS 16
push ss
push cs
-o32 call dword .Base ; push eip
+ ;
+ ; Note: We can't use o32 on the next instruction because of a bug
+ ; in NASM 2.09.04 through 2.10rc1.
+ ;
+ call dword .Base ; push eip
.Base:
push dword 0 ; reserved high order 32 bits of EFlags
pushfd