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 <ardb@kernel.org>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Ard Biesheuvel 2023-04-03 22:29:17 +08:00 committed by mergify[bot]
parent 95f0330953
commit 4764aa50ef
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,7 @@
Ia32/ArchInterruptDefs.h Ia32/ArchInterruptDefs.h
[Sources.X64] [Sources.X64]
X64/Xcode5ExceptionHandlerAsm.nasm X64/SecPeiExceptionHandlerAsm.nasm
X64/ArchExceptionHandler.c X64/ArchExceptionHandler.c
X64/ArchInterruptDefs.h X64/ArchInterruptDefs.h
@ -62,3 +62,5 @@
[FeaturePcd] [FeaturePcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## CONSUMES gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## CONSUMES
[BuildOptions]
XCODE:*_*_X64_NASM_FLAGS = -D NO_ABSOLUTE_RELOCS_IN_TEXT