]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Revert "UefiCpuPkg/CpuDxe: Fix boot error"
authorLaszlo Ersek <lersek@redhat.com>
Thu, 17 Dec 2020 08:50:55 +0000 (09:50 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 18 Dec 2020 11:20:55 +0000 (11:20 +0000)
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 <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]

UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm

index 6ad32b49f4ef59338fbe2e56139372ad17bee05f..c3489bcc3e896f47281c8e1ba1fedbc9637d5beb 100644 (file)
@@ -23,8 +23,8 @@ ASM_PFX(SetCodeSelector):
     sub     rsp, 0x10\r
     lea     rax, [setCodeSelectorLongJump]\r
     mov     [rsp], rax\r
-    mov     [rsp+8], cx\r
-    jmp     qword far [rsp]\r
+    mov     [rsp+4], cx\r
+    jmp     dword far [rsp]\r
 setCodeSelectorLongJump:\r
     add     rsp, 0x10\r
     ret\r