public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFT PATCH v2 0/6] UefiCpuPkg, OvmfPkf: Simplify CpuExceptionHandlerLib
@ 2023-03-30 21:20 Ard Biesheuvel
  2023-03-30 21:20 ` [RFT PATCH v2 1/6] BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress Ard Biesheuvel
                   ` (5 more replies)
  0 siblings, 6 replies; 29+ messages in thread
From: Ard Biesheuvel @ 2023-03-30 21:20 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Ni, Ray, Andrew Fish, Kinney, Michael D,
	Liu, Zhiguang, Rebecca Cran, Tom Lendacky

We have a special version of CpuExceptionHandlerLib for XCODE5, whose
linker (LLD) does not permit absolute symbol references in read-only
sections.

Instead of fixing this up at runtime (which is done by writing the fixed
up values to the .text section, which we'd prefer to avoid), pass the
appropriate linker switches to allow these absolute relocations.

Changes since v2:
- pass linker switches to permit absolute relocations in read-only
  regions, and keep all code in .text

Cc: Ni, Ray <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Liu, Zhiguang" <zhiguang.liu@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>

Ard Biesheuvel (6):
  BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress
  BaseTools/tools_def CLANGDWARF: Permit text relocations
  UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version
  UefiCpuPkg/CpuExceptionHandlerLib: Remove needless runtime fixups
  OvmfPkg: Drop special Xcode5 version of exception handler library
  UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version

 BaseTools/Conf/tools_def.template                                                                                |   8 +-
 OvmfPkg/AmdSev/AmdSevX64.dsc                                                                                     |   4 -
 OvmfPkg/CloudHv/CloudHvX64.dsc                                                                                   |   4 -
 OvmfPkg/IntelTdx/IntelTdxX64.dsc                                                                                 |   4 -
 OvmfPkg/Microvm/MicrovmX64.dsc                                                                                   |   4 -
 OvmfPkg/OvmfPkgIa32.dsc                                                                                          |   4 -
 OvmfPkg/OvmfPkgIa32X64.dsc                                                                                       |   4 -
 OvmfPkg/OvmfPkgX64.dsc                                                                                           |   4 -
 OvmfPkg/OvmfXen.dsc                                                                                              |   4 -
 UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf                                          |   2 +-
 UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf                                          |   2 +-
 UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf                                       |   2 +-
 UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf                                          |   2 +-
 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm                                           |  92 ++++++++++++++---
 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandlerAsm.nasm => SecPeiExceptionHandlerAsm.nasm} | 103 +++-----------------
 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf                                 |  65 ------------
 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.uni                                 |  18 ----
 17 files changed, 98 insertions(+), 228 deletions(-)
 rename UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandlerAsm.nasm => SecPeiExceptionHandlerAsm.nasm} (70%)
 delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
 delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.uni

-- 
2.39.2


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2023-03-31 15:08 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 21:20 [RFT PATCH v2 0/6] UefiCpuPkg, OvmfPkf: Simplify CpuExceptionHandlerLib Ard Biesheuvel
2023-03-30 21:20 ` [RFT PATCH v2 1/6] BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress Ard Biesheuvel
2023-03-30 21:54   ` [edk2-devel] " Marvin Häuser
2023-03-31  7:39     ` Ard Biesheuvel
2023-03-31  8:29       ` Marvin Häuser
2023-03-31  8:59         ` Ard Biesheuvel
2023-03-31  9:27           ` Marvin Häuser
2023-03-31  9:36             ` Ard Biesheuvel
2023-03-31 10:35               ` Marvin Häuser
2023-03-31 10:52               ` Gerd Hoffmann
2023-03-31 10:58                 ` Ard Biesheuvel
2023-03-31 11:00                 ` Marvin Häuser
2023-03-31  9:16         ` Gerd Hoffmann
2023-03-31 14:58         ` Rebecca Cran
2023-03-31 15:08           ` Marvin Häuser
2023-03-30 21:20 ` [RFT PATCH v2 2/6] BaseTools/tools_def CLANGDWARF: Permit text relocations Ard Biesheuvel
2023-03-30 21:20 ` [RFT PATCH v2 3/6] UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version Ard Biesheuvel
2023-03-31  4:21   ` Ni, Ray
2023-03-31  7:40     ` [edk2-devel] " Ard Biesheuvel
2023-03-31  8:01       ` Ni, Ray
2023-03-30 21:20 ` [RFT PATCH v2 4/6] UefiCpuPkg/CpuExceptionHandlerLib: Remove needless runtime fixups Ard Biesheuvel
2023-03-30 22:04   ` [edk2-devel] " Marvin Häuser
2023-03-31  5:08     ` Ni, Ray
2023-03-31  8:06       ` Marvin Häuser
2023-03-31  4:22   ` Ni, Ray
2023-03-30 21:21 ` [RFT PATCH v2 5/6] OvmfPkg: Drop special Xcode5 version of exception handler library Ard Biesheuvel
2023-03-31  0:37   ` [edk2-devel] " Yao, Jiewen
2023-03-30 21:21 ` [RFT PATCH v2 6/6] UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version Ard Biesheuvel
2023-03-31  4:23   ` [edk2-devel] " Ni, Ray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox