]> xenbits.xensource.com Git - ovmf.git/commitdiff
UefiCpuPkg/PeiCpuExceptionHandlerLib: Use SEC/PEI specific asm component
authorArd Biesheuvel <ardb@kernel.org>
Mon, 3 Apr 2023 14:29:17 +0000 (22:29 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 6 Apr 2023 06:52:55 +0000 (06:52 +0000)
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>
UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf

index 5339f8e60404580153bc64f4c4399bfdf73903d1..3bcaff5c5fe4633adb0d8c643da054da42e34047 100644 (file)
@@ -28,7 +28,7 @@
   Ia32/ArchInterruptDefs.h\r
 \r
 [Sources.X64]\r
-  X64/Xcode5ExceptionHandlerAsm.nasm\r
+  X64/SecPeiExceptionHandlerAsm.nasm\r
   X64/ArchExceptionHandler.c\r
   X64/ArchInterruptDefs.h\r
 \r
@@ -62,3 +62,5 @@
 [FeaturePcd]\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard                    ## CONSUMES\r
 \r
+[BuildOptions]\r
+  XCODE:*_*_X64_NASM_FLAGS = -D NO_ABSOLUTE_RELOCS_IN_TEXT\r