Jordan: The patch is good. Reviewed-by: Gao, Liming <liming....@intel.com>
Please commit this patch. Thanks Liming -----Original Message----- From: Jordan Justen [mailto:jordan.l.jus...@intel.com] Sent: Thursday, September 04, 2014 1:33 AM To: edk2-devel@lists.sourceforge.net Cc: Mike Maslenkin Subject: [edk2] [PATCH] 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.jus...@intel.com> Cc: Mike Maslenkin <miha...@parallels.com> --- MdePkg/Library/BaseLib/Ia32/Thunk16.nasm | 6 +++++- MdePkg/Library/BaseLib/X64/Thunk16.nasm | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm index e8468a3..e3d0d4e 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 6084fac..7c4a8d3 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 -- 2.1.0 ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel