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....@intel.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
1.8.3.1


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

Reply via email to