From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.51165.1680258051667789891 for ; Fri, 31 Mar 2023 03:20:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=CNj1ADmY; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680258051; x=1711794051; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lvG0CahxIUidGoEoApRd6TqT6cQpOINK1WdYTBrN3ko=; b=CNj1ADmY72eF17+FVi+LVxu4Dex4SNhh7nFVK7bNIYjZUs2Jf0e5j74E MMACZJpjvAVcIxKl7GhypeuYUfVH27sjJBg8WnvPALxRcvgVd7LZWxf9x /UBBLLT0DwL6phse5xI44huPm0bQkWAAF8N8vNATncuz1H8ja1QRuL6F0 zjCav0tDgcC+//hT7J7n0rHu0aQUw9WN38kaa4Sjk4Mv9u+xqsvynxwHk aIysUpmhv8BBZqIgk9n7GjBoQ+OfGNRbAAHHoR/1lKt4cC6SoCCIEkbxt i2M3ctLgDwTDV+VsoC7y95n7Wvjw9Bz3z3V2YNI9EtkGyydwUNVjMFSNA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="369205751" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="369205751" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 03:20:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="754357465" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="754357465" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 31 Mar 2023 03:20:44 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 31 Mar 2023 03:20:43 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 31 Mar 2023 03:20:43 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Fri, 31 Mar 2023 03:20:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iAfGyh6TIarb3Sm845osX2pSqug3v2ncAMo4m187Xbhy6KursAj/t3UDpPJRmw4GpionaVy3Ur1TGGuiQxanXB+iR8PndAqbQ9W96nfBUl1JnFM1LoWLc02OiXeEp6JnjzMk5LvlFfl4qsoBQwJ4EbHJgpT10nCs6JEAwRftNnY7stYi4jgBpoGIS6nZVH0pEzH+Q+dEJT8JzMpY2wz2kP7z9FnLSA4dBLDg1xk8+2yblm9vMXQgLztqnqLvRjllj4+ProTY3ZEVbVNbBC8vMG20+rxN8wUq7VUnRE4NHE04HyT9XZjQWd2ANpM7JbYaCTxPiiebn4gFMK9ZA24sMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sJlXNfFe8t2XSUNNSqcXAJ2UG/iqLxELjrDrAV3nUwI=; b=NeDXUmU3lnpcHmMLu6zecgPNjIThnjbRjLHJ5YC7/LFyEE/J25m4hliUpCqtEEgCFi9MGBmGahhr5PAH0Ms8xNUiklmHqitMFtQsttgvQO0NleI8Qq5kor5WARUNUKSWv6M4MxKxErwib6QCMT+n5Br7+PjtMofW2mfFewH0yJRJKqLOEk9gY4xsHK1l8fj0azAj74kSj3y5wL0fVbnhM4C+j8f8b+PRb1niUnqmViKZvJVAwk1NoRWjCiWuxmQWkZlw1MFKuUG9CKTzcJdfmcViy6x/MujWT3ES8eMg80mhqwsDlf09fhuvI+u2iy5igS98z6PEZTk/nHtiKDAr2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DM4PR11MB5567.namprd11.prod.outlook.com (2603:10b6:5:39a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22; Fri, 31 Mar 2023 10:20:40 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%8]) with mapi id 15.20.6222.035; Fri, 31 Mar 2023 10:20:40 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "ardb@kernel.org" CC: Andrew Fish , "Kinney, Michael D" , "Liu, Zhiguang" , Rebecca Cran , Tom Lendacky , =?iso-8859-1?Q?Marvin_H=E4user?= Subject: Re: [edk2-devel] [RFT PATCH v3 3/5] UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only Thread-Topic: [edk2-devel] [RFT PATCH v3 3/5] UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only Thread-Index: AQHZY7FR/HER9hRXWkGRtHPtWdS3968UrWyA Date: Fri, 31 Mar 2023 10:20:39 +0000 Message-ID: References: <20230331091437.1593337-1-ardb@kernel.org> <20230331091437.1593337-4-ardb@kernel.org> In-Reply-To: <20230331091437.1593337-4-ardb@kernel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DM4PR11MB5567:EE_ x-ms-office365-filtering-correlation-id: af948077-bb22-474f-ad2d-08db31d193ca x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cX6fqKJjlzV6pHQHMJ3XV+4XYv7uhSvgxCDVRew9zXQ+VlquZhNPyVsbSWnXCuP2yRAJ6Xd8FmOonrTIUar8xAH6WL6Nmjqn/nTlGcRqQkzqQm5TlPjXYs1CGaqUrS8zdpjkySOi/c2bYUhMXs23V2KoZF24SVr9VARxb+vSq5HogQs2ja1lcNpyH3rh9u02VDOOk0vL6p1RZ06aIFoZ7nAjVyW/w9HOn3HMIic4KsQP0v5UdMUP3kUcrLr7hXwrVLt8JFWpO4X8P3mxeqop/IdbxwSnws6qQ1WR4/0yoWP4NBqRgeasOavaKNS9vgmFqLcU1e8y6YPEjSfq4cMeHS/yc+DXXFVwyka2sHk6HMevZzWNMx9nQ+EJlbirE3S9HyFu4FRdG6qQDDnCgqxLlfsMGyf1McQkE6nP7KfOFpRM8lf9itQC5npybFki+sq622HE+dnQk2ggq0uWbfuUOeabIEPknqxITR2iWxgj/IyM1MO2tO5//fBAY1UWTkpEP7DYLhwiACiBo28Edadek46kmfWNhQg6Gcv494FRK5lvZLWVifCeZT5nDoOygJDNYTLhzZMPOQnZhOEyym3x9F8WJ7SpJKRs30zjNuYFvwfT6PhERfuihz2NPpKb85jZJpOasslKBcEw4Of3SHPr2g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(366004)(376002)(346002)(396003)(136003)(451199021)(66574015)(9686003)(966005)(83380400001)(71200400001)(7696005)(316002)(26005)(19627235002)(186003)(2906002)(53546011)(54906003)(478600001)(110136005)(6506007)(33656002)(4326008)(122000001)(76116006)(55016003)(38100700002)(8936002)(52536014)(86362001)(82960400001)(8676002)(64756008)(66556008)(41300700001)(66476007)(66446008)(66946007)(5660300002)(38070700005)(66899021);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?OMpz7ukR1SDs41o9/FoKBkRRVUOIGAzENfqKa+reH4sqnr0VmF9tJsA24S?= =?iso-8859-1?Q?8FzoS9fiJCZHfsiijPsBZdvXBWbKAjWBloCCcsouQmB0+0ty+48AU4QuJQ?= =?iso-8859-1?Q?7JHrJuE3LPHfZKpqLwSg9ZgCn/6TEqJR6FpJd/q3caelJrxbkq/ODVN5IZ?= =?iso-8859-1?Q?eBhNyyuFe3PwbCvlG2Sl+GG4SgWpwKNYDFG9Zm0B4Nr1dhCd0aCe8QUJaw?= =?iso-8859-1?Q?LzR177BBv+emtOfaMBl7ipZ/uwBoqqj6IGJfyiMNH1PP5Zh1HF0P3aVHz1?= =?iso-8859-1?Q?aa5pBqV6dF9v2vEqbgWG7ctKLt8OoIouUq1HmWH+4/DG1oth0EBs/cBgQ5?= =?iso-8859-1?Q?8pjfJVNKz86+E21zESVrBeqvCwd0dNquFrEuQchSTI1eiVIyQz67Wu2lw2?= =?iso-8859-1?Q?6cM/PeICPtvErCaaVZa/GWtLm1C2VichclLrqQO3VU6UZCMguZmxIgoPie?= =?iso-8859-1?Q?lTIH2s0kY2EXAHn6N7qrggrLWLqNmeLl+gi4pvjCOAVMAiKuy/pLbyaig+?= =?iso-8859-1?Q?rNF+OyX6HTbAmgfUyI0oVXxKNGtVCXxnVgwLYDqnXeyw0wx1GHDJkbix9Z?= =?iso-8859-1?Q?tm8c1J4+5fkyRqM+7/DlqbgyqfK09r0FiEii87DcyZiFL4abkYpFop70Ks?= =?iso-8859-1?Q?jFf6H6rm53F6liT8vApmwbnbhpCkIxxC1ftZMuDBmrTjseejrCLaZhsAEQ?= =?iso-8859-1?Q?1Lic53S4wFkjbhKqPe86J5f9AT4JTaK5IC0fvdaT8xmyjdj8iiVFIZs7t0?= =?iso-8859-1?Q?6r8i2gVnv5/rPUOenerlrvW3fWSsKnKxoAVkedB9gJ7Girv0Re18RkpIEs?= =?iso-8859-1?Q?5orK72KhdtGC4xJwH7HMk8p139ynlxOOGK1/Bf78sMXjCKPaGyU9Bj1hZA?= =?iso-8859-1?Q?LlJZdLYmjbIrvHMrak79PMPsC/RfBDyznft3WOyfIQVASV3Wq7oReXe2rt?= =?iso-8859-1?Q?Zj70YSXHhW4sfz8LiuRBu0TJ0ZBOs745tamx+uD7HWEfixeAiNFuRzdZD6?= =?iso-8859-1?Q?vEeBoMXzzKtEM6MPADmfMttGKd9Mo+e0dFuVyQ+2HHPpTxHPl37GaaaLK0?= =?iso-8859-1?Q?FBdV9pbZbHMuZ3BGJQagvFva78/OnB4M8E8yUPJuqxMmy/7M+RYF3+0WhP?= =?iso-8859-1?Q?vC9cLoB1bK494Af1Obg4kolirS9DqVzI1JPHjEl7wZYLd+27XXmB+fZlz/?= =?iso-8859-1?Q?d9PpU1DHwQ2j6wld6qs8FZ7KYLJ+JmNt9tEfYj7tepKbBMDp0PjoVOAQMv?= =?iso-8859-1?Q?kiic4ykUugsgj74Ro2m8N+LaEEEdfHMExcp5VX7k6cC7pY0J1zPT5x9g6e?= =?iso-8859-1?Q?IdoZ7wV8vILtW3VfQAqmeefPq6H6xn67PjUWPM42ZOH9Eyb/A8a3tJGKKC?= =?iso-8859-1?Q?ZIWJG2bsc80Qim7KDLenGrV1+o41aG0LLpJR5HZ8mKxw80WdU65RGN4sQh?= =?iso-8859-1?Q?6kVvD7SXZZ5hyiKRuqpHjFAkIdfDNlOah1BKSApMnA+69iVq54J4gETMLd?= =?iso-8859-1?Q?aCjFHtWdnUWmQnRHOF228YQUvMgg04ebhf/H43oT2sJw75ipOQE+Lp7MjO?= =?iso-8859-1?Q?KLaOShgwaGru5z/OLCGKEB2DSSt2odLpE/xj1vglGLM9W9ORfbX3B9ZyE5?= =?iso-8859-1?Q?TjOrjFv5Bk6yE=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: af948077-bb22-474f-ad2d-08db31d193ca X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2023 10:20:39.9970 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PRtxHj9gkwIYmN4+hw/z/x40dm7JqsjiJz0FErteNSXdQF70MC9UCQVvJ/a4Z2rSzREcMt2uoAnVkVPwfvyOlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5567 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ok I see that the macro is added to PP flags. I thought it's added to NASM build flags. Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ard > Biesheuvel > Sent: Friday, March 31, 2023 5:15 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Ni, Ray ; Andrew > Fish ; Kinney, Michael D ; > Liu, Zhiguang ; Rebecca Cran > ; Tom Lendacky ; > Marvin H=E4user > Subject: [edk2-devel] [RFT PATCH v3 3/5] > UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only >=20 > The CPU exception handler library code was rewritten at some point to > populate the vector code templates with absolute references at runtime, > given that the XCODE linker does not permit absolute references in > executable code when creating PIE executables. >=20 > This is rather unfortunate, as this prevents us from using strict > permissions on the memory mappings, given that the .text section needs > to be writable at runtime for this arrangement to work. >=20 > So let's make this hack XCODE-only, by setting a preprocessor #define > from the command line when using the XCODE toolchain, and only including > the runtime fixup code when the macro is defined. >=20 > While at it, rename the Xcode5ExceptionHandlerAsm.nasm source file and > drop the Xcode5 prefix: this code is used by other toolchains too. >=20 > Signed-off-by: Ard Biesheuvel > --- >=20 > UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.in > f | 5 ++++- >=20 > UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf > | 4 +++- >=20 > UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.i > nf | 4 +++- >=20 > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandler > Asm.nasm =3D> ExceptionHandlerAsm.nasm} | 10 ++++++++++ > 4 files changed, 20 insertions(+), 3 deletions(-) >=20 > diff --git > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib. > inf > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib > .inf > index d0f82095cf926e99..ee9df805c05df4f7 100644 > --- > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib. > inf > +++ > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib > .inf > @@ -28,7 +28,7 @@ [Sources.Ia32] > Ia32/ArchInterruptDefs.h >=20 >=20 >=20 > [Sources.X64] >=20 > - X64/Xcode5ExceptionHandlerAsm.nasm >=20 > + X64/ExceptionHandlerAsm.nasm >=20 > X64/ArchExceptionHandler.c >=20 > X64/ArchInterruptDefs.h >=20 >=20 >=20 > @@ -61,3 +61,6 @@ [LibraryClasses] > MemoryAllocationLib >=20 > DebugLib >=20 > CcExitLib >=20 > + >=20 > +[BuildOptions] >=20 > + XCODE:*_*_X64_PP_FLAGS =3D -DNO_ABSOLUTE_RELOCS_IN_TEXT >=20 > diff --git > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > index 5339f8e604045801..83970c54712f22a2 100644 > --- > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > +++ > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > @@ -28,7 +28,7 @@ [Sources.Ia32] > Ia32/ArchInterruptDefs.h >=20 >=20 >=20 > [Sources.X64] >=20 > - X64/Xcode5ExceptionHandlerAsm.nasm >=20 > + X64/ExceptionHandlerAsm.nasm >=20 > X64/ArchExceptionHandler.c >=20 > X64/ArchInterruptDefs.h >=20 >=20 >=20 > @@ -62,3 +62,5 @@ [Pcd] > [FeaturePcd] >=20 > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## > CONSUMES >=20 >=20 >=20 > +[BuildOptions] >=20 > + XCODE:*_*_X64_PP_FLAGS =3D -DNO_ABSOLUTE_RELOCS_IN_TEXT >=20 > diff --git > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLi > b.inf > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLi > b.inf > index 8f8a5dab79303f87..acd2936aef4490a5 100644 > --- > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLi > b.inf > +++ > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLi > b.inf > @@ -28,7 +28,7 @@ [Sources.Ia32] > Ia32/ArchInterruptDefs.h >=20 >=20 >=20 > [Sources.X64] >=20 > - X64/Xcode5ExceptionHandlerAsm.nasm >=20 > + X64/ExceptionHandlerAsm.nasm >=20 > X64/ArchExceptionHandler.c >=20 > X64/ArchInterruptDefs.h >=20 >=20 >=20 > @@ -61,3 +61,5 @@ [Pcd] > [FeaturePcd] >=20 > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## > CONSUMES >=20 >=20 >=20 > +[BuildOptions] >=20 > + XCODE:*_*_X64_PP_FLAGS =3D -DNO_ABSOLUTE_RELOCS_IN_TEXT >=20 > diff --git > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandle > rAsm.nasm > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.n > asm > similarity index 95% > rename from > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerA > sm.nasm > rename to > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas > m > index 957478574253e619..3823656ea7d4c3b8 100644 > --- > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandle > rAsm.nasm > +++ > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.n > asm > @@ -59,7 +59,11 @@ AsmIdtVectorBegin: > %rep 256 >=20 > push strict dword %[Vector] ; This instruction pushes sign-extend= ed 8- > byte value on stack >=20 > push rax >=20 > +#ifdef NO_ABSOLUTE_RELOCS_IN_TEXT >=20 > mov rax, strict qword 0 ; mov rax, ASM_PFX(CommonInterrup= tEntry) >=20 > +#else >=20 > + mov rax, ASM_PFX(CommonInterruptEntry) >=20 > +#endif >=20 > jmp rax >=20 > %assign Vector Vector+1 >=20 > %endrep >=20 > @@ -69,8 +73,12 @@ HookAfterStubHeaderBegin: > push strict dword 0 ; 0 will be fixed >=20 > VectorNum: >=20 > push rax >=20 > +#ifdef NO_ABSOLUTE_RELOCS_IN_TEXT >=20 > mov rax, strict qword 0 ; mov rax, HookAfterStubHeaderEn= d >=20 > JmpAbsoluteAddress: >=20 > +#else >=20 > + mov rax, HookAfterStubHeaderEnd >=20 > +#endif >=20 > jmp rax >=20 > HookAfterStubHeaderEnd: >=20 > mov rax, rsp >=20 > @@ -457,6 +465,7 @@ ASM_PFX(AsmGetTemplateAddressMap): > lea rax, [HookAfterStubHeaderBegin] >=20 > mov qword [rcx + 0x10], rax >=20 >=20 >=20 > +#ifdef NO_ABSOLUTE_RELOCS_IN_TEXT >=20 > ; Fix up CommonInterruptEntry address >=20 > lea rax, [ASM_PFX(CommonInterruptEntry)] >=20 > lea rcx, [AsmIdtVectorBegin] >=20 > @@ -468,6 +477,7 @@ ASM_PFX(AsmGetTemplateAddressMap): > lea rax, [HookAfterStubHeaderEnd] >=20 > lea rcx, [JmpAbsoluteAddress] >=20 > mov qword [rcx - 8], rax >=20 > +#endif >=20 >=20 >=20 > ret >=20 >=20 >=20 > -- > 2.39.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#102258): > https://edk2.groups.io/g/devel/message/102258 > Mute This Topic: https://groups.io/mt/97969651/1712937 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20