From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.39111.1680211278113544318 for ; Thu, 30 Mar 2023 14:21:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VuD1dfZy; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DD2E8B82A41; Thu, 30 Mar 2023 21:21:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D611DC433D2; Thu, 30 Mar 2023 21:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680211274; bh=ZO4cmakQaMCDD8GE+6Ym4nRTljqpEEo+dUVWDko/9s4=; h=From:To:Cc:Subject:Date:From; b=VuD1dfZyGGvfYX/N8BRYWWCtspUqiKe0l2JS+jwwDKaeS/uRIAkXE/5CaqlnOP46e JXeAZHlj1BhACZ0Pynv4tQF6PO+B8NXO0kNP7xtiYnM4h8pZQMch38ZiAmE276+jq/ ni++4zHTgf8leKX2EL1NGuIJuQHZMFXQvXMU0lTaQPIrGXQnraOzehdW7mX1LXeWBk B7+MwYf19uor9Hc4p69/Ew9YRoHKciwtz7ZKxLuMMpsMQ7PZpfwmfSrIn0kpwamwuA 48VVcFa0TsYhG0GTHhObjlpIU28PZCWaRXp1hYkCZ66Ea61tTZaLhqSLobt+lu9hsd j8T0wqrfbnuGA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Ni, Ray , Andrew Fish , "Kinney, Michael D" , "Liu, Zhiguang" , Rebecca Cran , Tom Lendacky Subject: [RFT PATCH v2 0/6] UefiCpuPkg, OvmfPkf: Simplify CpuExceptionHandlerLib Date: Thu, 30 Mar 2023 23:20:55 +0200 Message-Id: <20230330212101.1566931-1-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable We have a special version of CpuExceptionHandlerLib for XCODE5, whose=0D linker (LLD) does not permit absolute symbol references in read-only=0D sections.=0D =0D Instead of fixing this up at runtime (which is done by writing the fixed=0D up values to the .text section, which we'd prefer to avoid), pass the=0D appropriate linker switches to allow these absolute relocations.=0D =0D Changes since v2:=0D - pass linker switches to permit absolute relocations in read-only=0D regions, and keep all code in .text=0D =0D Cc: Ni, Ray =0D Cc: Andrew Fish =0D Cc: "Kinney, Michael D" =0D Cc: "Liu, Zhiguang" =0D Cc: Rebecca Cran =0D Cc: Tom Lendacky =0D =0D Ard Biesheuvel (6):=0D BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress=0D BaseTools/tools_def CLANGDWARF: Permit text relocations=0D UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version=0D UefiCpuPkg/CpuExceptionHandlerLib: Remove needless runtime fixups=0D OvmfPkg: Drop special Xcode5 version of exception handler library=0D UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version=0D =0D BaseTools/Conf/tools_def.template = | 8 +-=0D OvmfPkg/AmdSev/AmdSevX64.dsc = | 4 -=0D OvmfPkg/CloudHv/CloudHvX64.dsc = | 4 -=0D OvmfPkg/IntelTdx/IntelTdxX64.dsc = | 4 -=0D OvmfPkg/Microvm/MicrovmX64.dsc = | 4 -=0D OvmfPkg/OvmfPkgIa32.dsc = | 4 -=0D OvmfPkg/OvmfPkgIa32X64.dsc = | 4 -=0D OvmfPkg/OvmfPkgX64.dsc = | 4 -=0D OvmfPkg/OvmfXen.dsc = | 4 -=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf = | 2 +-=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf = | 2 +-=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf= | 2 +-=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf = | 2 +-=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm = | 92 ++++++++++++++---=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandlerAsm.n= asm =3D> SecPeiExceptionHandlerAsm.nasm} | 103 +++-----------------=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerL= ib.inf | 65 ------------=0D UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerL= ib.uni | 18 ----=0D 17 files changed, 98 insertions(+), 228 deletions(-)=0D rename UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandl= erAsm.nasm =3D> SecPeiExceptionHandlerAsm.nasm} (70%)=0D delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiC= puExceptionHandlerLib.inf=0D delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiC= puExceptionHandlerLib.uni=0D =0D -- =0D 2.39.2=0D =0D