public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>
Cc: Eric Dong <eric.dong@intel.com>, Guo Dong <guo.dong@intel.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Rahul Kumar <rahul1.kumar@intel.com>, Ray Ni <ray.ni@intel.com>,
	Thomas Lendacky <thomas.lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH] Revert "UefiCpuPkg/CpuDxe: Fix boot error"
Date: Fri, 18 Dec 2020 13:10:14 +0100	[thread overview]
Message-ID: <65b302bb-9019-2843-8400-b1304584ad75@redhat.com> (raw)
In-Reply-To: <20201217085055.15131-1-lersek@redhat.com>

On 12/17/20 09:50, Laszlo Ersek wrote:
> 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>
> ---
> 
> Notes:
>     The broken patch was committed on December 8th; Tom reported the
>     regression the next day, and James reported it independently on Dec
>     14th/15th (dependent on one's time zone).
>     
>     Nine days after merging the broken patch, I've only seen "pondering" of
>     how we should fix the issue. I'll tell you how: I'm going to merge this
>     revert later today unless I see a patch that implements the RETFQ-based
>     replacement.
>     
>     Regressing code and not working diligently to address the problem is
>     unacceptable.
> 
>  UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
> index 6ad32b49f4ef..c3489bcc3e89 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
> 

Merged as commit 089285b42c69, via
<https://github.com/tianocore/edk2/pull/1241>.

Laszlo


      parent reply	other threads:[~2020-12-18 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  8:50 [PATCH] Revert "UefiCpuPkg/CpuDxe: Fix boot error" Laszlo Ersek
2020-12-17 14:40 ` [edk2-devel] " Laszlo Ersek
2020-12-18 12:10 ` Laszlo Ersek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65b302bb-9019-2843-8400-b1304584ad75@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox