[edk2-devel] [PATCH] UefiCpuPkg/CpuDxe: Fix boot error

Guo Dong guo.dong at intel.com
Fri Dec 11 03:11:06 UTC 2020


I agree with Ray to use RETF.

Thanks,
Guo

> -----Original Message-----
> From: Ni, Ray <ray.ni at intel.com>
> Sent: Thursday, December 10, 2020 6:48 PM
> To: Dong, Guo <guo.dong at intel.com>; devel at edk2.groups.io;
> thomas.lendacky at amd.com; Laszlo Ersek <lersek at redhat.com>
> Cc: Dong, Eric <eric.dong at intel.com>; Kumar, Rahul1
> <rahul1.kumar at intel.com>
> Subject: RE: [edk2-devel] [PATCH] UefiCpuPkg/CpuDxe: Fix boot error
> 
> >
> > [Guo] From my view point, it is not necessary to have these code for X64 since
> CS base
> > address would always use 0 in long mode. But I will leave this to package
> owner
> > to decide to remove it or not.
> > For now to support AMD case, maybe we could check rax value to decide to
> use
> > dword jump or qword jump. If high 4 bytes of rax is zero, dword jump will be
> used.
> > With this, it has exact same behavior when CpuDxe driver is dispatch below
> 4GB.
> >
> > >
> > > If more time is needed to figure it out, though, it is probably best to
> > > revert this in the mean time since I can't launch a VM (be it legacy or
> > > SEV) on the latest tree.
> >
> > [Guo] If we agree the above change to check rax, I could create a patch today.
> > Let me know if having other comments.
> >
> 
> Tom,
> We don't need to consider shadow stack because shadow stack is only enabled
> in SMM environment.
> 
> Guo,
> I suggest we either revert the patch to keep the original 4G limitation, or use
> RETF to be maximum
> compatible to Intel and AMD processors.
> Checking high 4 bytes of RAX hides the problem in AMD processors.
>
> Thanks,
> Ray


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68686): https://edk2.groups.io/g/devel/message/68686
Mute This Topic: https://groups.io/mt/78671060/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list