diff mbox

[edk2,FIXUP,1/2] UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm: add 0x67 prefix to far jump

Message ID 1466465780-21614-2-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek June 20, 2016, 11:36 p.m. UTC
When we enter protected mode, with the far jump still in big real mode,
the JMP instruction not only needs the 0x66 prefix (for 32-bit operand
size), but also the 0x67 prefix (for 32-bit address size). Use the a32
nasm modifier to enforce this.

This bug breaks S3 resume in the Ia32 + SMM_REQUIRE build of OVMF.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm
index 97cdb4cc9309..f7cdcce9a7b3 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm
@@ -77,7 +77,7 @@  o32     lidt       [cs:si]
 
 FLAT32_JUMP:
 
-        jmp   dword 0x20:0x0
+a32     jmp   dword 0x20:0x0
 
 BITS 32
 PMODE_ENTRY:                         ; protected mode entry point