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

Laszlo Ersek lersek at redhat.com
Thu Jan 7 17:32:54 UTC 2021


On 01/07/21 17:14, Dong, Guo wrote:
> 
> Thanks Tom to help verify this change and point out an extra comma after rcx.
> I will remove that extra comma when pushing this patch.
> I could send V3 patch if required to remove this extra comma.

I think a v3 is unneeded just for that.

Thanks
Laszlo

> 
> Thanks,
> Guo
> 
>> -----Original Message-----
>> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Lendacky,
>> Thomas
>> Sent: Thursday, January 7, 2021 8:02 AM
>> To: devel at edk2.groups.io; Dong, Guo <guo.dong at intel.com>
>> Cc: Dong, Eric <eric.dong at intel.com>; Ni, Ray <ray.ni at intel.com>;
>> lersek at redhat.com; Kumar, Rahul1 <rahul1.kumar at intel.com>
>> Subject: Re: [edk2-devel] [PATCH V2] UefiCpuPkg/CpuDxe: Fix boot error
>>
>> On 1/6/21 9:10 PM, Guo Dong via groups.io wrote:
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3084
>>>
>>> When DXE drivers are dispatched above 4GB memory in 64bit
>>> mode, the address setCodeSelectorLongJump in stack will
>>> be override by parameter. Jump to Qword is not supported
>>> by some processors. So use "o64 retf" instead.
>>>
>>> Signed-off-by: Guo Dong <guo.dong at intel.com>
>>
>> With one little comment below, I verified this method allows my system to
>> boot.
>>
>> Tested-by: Tom Lendacky <thomas.lendacky at amd.com>
>>
>>> ---
>>>   UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 8 +++-----
>>>   1 file changed, 3 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
>> b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
>>> index c3489bcc3e..a8216cd56f 100644
>>> --- a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
>>> +++ b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
>>> @@ -20,13 +20,11 @@
>>>   ;------------------------------------------------------------------------------
>>>   global ASM_PFX(SetCodeSelector)
>>>   ASM_PFX(SetCodeSelector):
>>> -    sub     rsp, 0x10
>>> +    push    rcx,
>>
>> Extraneous comma after rcx.
>>
>> Thanks,
>> Tom
>>
>>>       lea     rax, [setCodeSelectorLongJump]
>>> -    mov     [rsp], rax
>>> -    mov     [rsp+4], cx
>>> -    jmp     dword far [rsp]
>>> +    push    rax
>>> +    o64 retf
>>>   setCodeSelectorLongJump:
>>> -    add     rsp, 0x10
>>>       ret
>>>
>>>   ;------------------------------------------------------------------------------
>>>
>>
>>
>> 
>>
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69941): https://edk2.groups.io/g/devel/message/69941
Mute This Topic: https://groups.io/mt/79491640/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