Re: [PATCH v3 1/8] IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit


Kuo, Ted
 

Hi Ray,

Please see my inline comment.

Thanks,
Ted

-----Original Message-----
From: Ni, Ray <ray.ni@...>
Sent: Thursday, April 7, 2022 7:58 AM
To: devel@edk2.groups.io; Kuo, Ted <ted.kuo@...>
Cc: Chiu, Chasel <chasel.chiu@...>; Desimone, Nathaniel L <nathaniel.l.desimone@...>; Zeng, Star <star.zeng@...>; S, Ashraf Ali <ashraf.ali.s@...>
Subject: RE: [edk2-devel][PATCH v3 1/8] IntelFsp2Pkg: X64 compatible changes to support PEI in 64bit

-; UINT32
+; UINTN
; EFIAPI
-; AsmReadEsp (
+; AsmReadStackPointer (
; VOID
; );
;------------------------------------------------------------------------------
-global ASM_PFX(AsmReadEsp)
-ASM_PFX(AsmReadEsp):
+global ASM_PFX(AsmReadStackPointer)
+ASM_PFX(AsmReadStackPointer):
mov eax, esp
ret
I guess it's possible that bootloader sets up the stack above 4G.
If that's the case, above code doesn't work.
[Ted]: The above code is for IA32 only. We have a separate ReadRsp.nasm for X64. You can find it in the patch [edk2-devel][PATCH v3 4/8] IntelFsp2Pkg: FspSecCore support for X64.

Join devel@edk2.groups.io to automatically receive all group messages.