From 089285b42c69b3e105070a3deb349eaf1c50d35b Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 17 Dec 2020 09:50:55 +0100 Subject: Revert "UefiCpuPkg/CpuDxe: Fix boot error" This reverts commit cee5b0441af39dd6f76cc4e0447a1c7f788cbb00. Commit cee5b0441af3 ("UefiCpuPkg/CpuDxe: Fix boot error", 2020-12-08) breaks CpuDxe (and with it, OVMF boot) on AMD processors. AMD processors cannot do far jumps to 64-bit targets, as documented in the AMD64 Architecture Programmer's Manual. Revert the patch until a RETFQ-based substitute is posted. Cc: Eric Dong Cc: Guo Dong Cc: James Bottomley Cc: Rahul Kumar Cc: Ray Ni Cc: Thomas Lendacky Ref: https://edk2.groups.io/g/devel/message/68597 Ref: https://www.redhat.com/archives/edk2-devel-archive/2020-December/msg00493.html Reported-by: Thomas Lendacky Ref: https://edk2.groups.io/g/devel/message/68832 Ref: https://www.redhat.com/archives/edk2-devel-archive/2020-December/msg00737.html Reported-by: James Bottomley Signed-off-by: Laszlo Ersek Message-Id: <20201217085055.15131-1-lersek@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3121 [lersek@redhat.com: add BZ link] --- UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm index 6ad32b49f4..c3489bcc3e 100644 --- a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm +++ b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm @@ -23,8 +23,8 @@ ASM_PFX(SetCodeSelector): sub rsp, 0x10 lea rax, [setCodeSelectorLongJump] mov [rsp], rax - mov [rsp+8], cx - jmp qword far [rsp] + mov [rsp+4], cx + jmp dword far [rsp] setCodeSelectorLongJump: add rsp, 0x10 ret -- cgit v1.2.3