Reviewed-by: Ray Ni <ray...@intel.com>

> -----Original Message-----
> From: Ard Biesheuvel <a...@kernel.org>
> Sent: Monday, April 3, 2023 10:29 PM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <a...@kernel.org>; Ni, Ray <ray...@intel.com>; Andrew
> Fish <af...@apple.com>; Kinney, Michael D <michael.d.kin...@intel.com>;
> Liu, Zhiguang <zhiguang....@intel.com>; Rebecca Cran
> <rebe...@bsdio.com>; Tom Lendacky <thomas.lenda...@amd.com>;
> Marvin Häuser <mhaeu...@posteo.de>
> Subject: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use
> SEC/PEI specific asm component
> 
> The PEI flavor of CpuExceptionHandlerLib never populates more than 32
> IDT vectors, and there is no CET shadow stack support in the PEI phase.
> So there is no need to use the generic ExceptionHandler NASM source,
> which carries a 256-entry template and CET support, and writes to its
> own .text section when built using XCODE, which is not permitted in the
> PEI phase. So let's switch to the reduced SEC/PEI version of this
> component, which is sufficient for PEI and doesn't suffer from the same
> issue.
> 
> Signed-off-by: Ard Biesheuvel <a...@kernel.org>
> ---
> 
> UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> index 5339f8e604045801..3bcaff5c5fe4633a 100644
> ---
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> +++
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> @@ -28,7 +28,7 @@ [Sources.Ia32]
>    Ia32/ArchInterruptDefs.h
> 
> 
> 
>  [Sources.X64]
> 
> -  X64/Xcode5ExceptionHandlerAsm.nasm
> 
> +  X64/SecPeiExceptionHandlerAsm.nasm
> 
>    X64/ArchExceptionHandler.c
> 
>    X64/ArchInterruptDefs.h
> 
> 
> 
> @@ -62,3 +62,5 @@ [Pcd]
>  [FeaturePcd]
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard                    ##
> CONSUMES
> 
> 
> 
> +[BuildOptions]
> 
> +  XCODE:*_*_X64_NASM_FLAGS = -D NO_ABSOLUTE_RELOCS_IN_TEXT
> 
> --
> 2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102600): https://edk2.groups.io/g/devel/message/102600
Mute This Topic: https://groups.io/mt/98036439/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to