Revert "UefiCpuPkg/CpuDxe: Fix boot error"

This reverts commit cee5b0441a.

Commit cee5b0441a ("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 <eric.dong@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Thomas Lendacky <thomas.lendacky@amd.com>
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 <thomas.lendacky@amd.com>
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 <James.Bottomley@HansenPartnership.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201217085055.15131-1-lersek@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3121
[lersek@redhat.com: add BZ link]
This commit is contained in:
Laszlo Ersek 2020-12-17 09:50:55 +01:00 committed by mergify[bot]
parent 96201ae7bf
commit 089285b42c
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,8 @@ ASM_PFX(SetCodeSelector):
sub rsp, 0x10 sub rsp, 0x10
lea rax, [setCodeSelectorLongJump] lea rax, [setCodeSelectorLongJump]
mov [rsp], rax mov [rsp], rax
mov [rsp+8], cx mov [rsp+4], cx
jmp qword far [rsp] jmp dword far [rsp]
setCodeSelectorLongJump: setCodeSelectorLongJump:
add rsp, 0x10 add rsp, 0x10
ret ret