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

Ni, Ray ray.ni at intel.com
Fri Dec 11 01:47:43 UTC 2020


> 
> [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 (#68681): https://edk2.groups.io/g/devel/message/68681
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