Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspSwitchStackLib Support for X64 Build

2022-02-22 Thread Ma, Maurice
Several comments as below: 1. Need to ensure sufficient space to save IDT The following will only reserve 8 bytes on stack to save IDT. It is fine for x86, but for x64 mode, the SIDT needs at least 80 bits. So we might want to reserve 16 byte for the changes listed below to void buffer ov

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspSwitchStackLib Support for X64 Build

2022-02-21 Thread Chiu, Chasel
onday, February 14, 2022 4:38 PM > To: devel@edk2.groups.io; S, Ashraf Ali > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Zeng, Star ; Kuo, Ted > ; Duggapu, Chinni B ; > Chaganty, Rangasai V ; Solanki, Digant H > ; V, Sangeetha > Subject: RE: [edk2-devel] [PATCH] IntelFsp2Pkg: Ba

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseFspSwitchStackLib Support for X64 Build

2022-02-14 Thread Ni, Ray
The patch itself looks good to me. But when I read the code further, the SwapStack() is implemented as below. I think you need to enhance it to support the case when RSP is above 4GB. 1. Change UINT32 NewStack to UINTN 2. Change CoreStack from UINT32 to UINTN. UINT32 SwapStack ( IN UINT32 NewS