From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.50946.1680256999238548541 for ; Fri, 31 Mar 2023 03:03:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=lgT2CvoV; spf=pass (domain: intel.com, ip: 134.134.136.126, 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=1680256999; x=1711792999; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=M0e9uZTanQL9AKeI6SeXKue253wGP/B8Qseg78pvreU=; b=lgT2CvoVQH1d/9BMTUSHGn0K3+PlUpI2JR5K3CdLolpKzUlsZgsySr+D kOcLq4q+c417ywYEUJBhAIpNtr7oVMQ0ubt0eAxZWrvQAplmbtDcbbltS vDws7ngHAyv1WQt7MLIxVdSr9K7OSdFPu44jXpWno9KcrZwxK2LXF8KGL rriorSwFVFTHCb1e709gKdr/xLj2RFxtKRzY3cNK7VivyBxSa6DbflbhG FG87fA3wvnumg+nwUb8UYrY5Y2SkmdgR1oqHqx0pl0AmvFR0/UGOQENTL 9AVIV9ujChdbHGwS82kXvOPRjndfUpGy50NqTGkx61iB2BVS8LndFNuOJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="325379315" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="325379315" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 03:03:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="635233411" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="635233411" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 31 Mar 2023 03:03:18 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:03:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:03:17 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (192.55.55.70) 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:03:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZBM3v3gBKF9J9xo4YZ8G+rAiWkokkUohQeoH4OFJhzXyXtlUUSyh9SfaBQHKQgLA83p1a4DJVHUad+79nQsvoNLq1kzR0IiTHSdUPAdd76HfcAq1z/GLJ7Vzm6wxWOplatEva7F9sQGYrfZ4zHPzPiafBQUDujmLW6jXv3Swvwm1sw3lHUy+V/ZBBVuD5NLgaZMXhMPaqW7QYCHy2NyydBO4sQHWbZW0JIN28n0QUsTw4kY6Y1hk3J6QjWFZjEvZWK2Dhz+gAYkcsGhgMgIyJyOnRVqkWyrMQbLrrWONf8ZTPk5esXJWNsl2XOokmxY/jJ3lkIFUhVqC1xZvCUvfw== 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=x+n3O1D+9n/u2pNRD3dzi72eBUl/j5gIw6OzAv/Iavs=; b=bPAWFCIFOcWbLzrdtD5zIQxdXDr5lVdbI+I/dC1Lm1V2dCLv5pmka065WFvQt5xqlkw+SHKNOTId0D6piZz6NEcAnh2nhwoLWM1BsZkNxhGd2m2cDBElKLeiZV0T5Kbcj7x9YtNWx/tgx4WNGxOeClDBQ3yfP+rTxEvhyp79lV2uTtQsPhA4T89aCD8XcDVR+p6CIu3R/4v/ZauTz4Kpwe9zHQkzX0uGh/wO4YDvZ6col3jptb0pCWlncewXeX40w5DPqAtQ57PRBi9s/yM5TDqKXPCWbMQF/+TU+8rfyoMjpwpIvwqo9jRaGTdLPldPD67oVPeEMaDcehTPbz8gbg== 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 PH7PR11MB6978.namprd11.prod.outlook.com (2603:10b6:510:206::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.28; Fri, 31 Mar 2023 10:03:14 +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:03:14 +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/HER9hRXWkGRtHPtWdS3968UqAcg Date: Fri, 31 Mar 2023 10:03:14 +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_|PH7PR11MB6978:EE_ x-ms-office365-filtering-correlation-id: d06675ba-a3ec-4947-59e4-08db31cf24ac x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UTy1/5ewKX/MEFLMKYzobXRRP0PjDvKYgjA2RNtD9R8xTb+sohBkUTzvG541Ye+uxfxs17evs9oQswHCIVexDDOtmjNE66m+rG9OFBVhmSrCDNtgB2HX26proDuaP293m6iqrBcb3vQGKb2/Jxhyzh1GDe2mJOQb5r5ZpxrbyCXoay19elweQaLrx7avGGw3JT2SeH/dYJke1ddjaAM6u/yWGaFiMNK4xHtvRA6Dy1azXYqD4+rF0UY1oMKmygreJtadIOvDwdwMWltkCLt/s/LkUheF67FrcHOqluG0/fVVgO7Q+jCnbrb6OxzFDbPQNsTj1xrV/j3YjwolpcoepmNkZtIFYaybdJv0tN8+yaxa4l//w2HdsamNuYwivG6ECZ8ivzGbubLJ/14qhIj9q2kEZs7n/kQTwQyMgGzTwCY2RNj2NrmWW13npoEML90h9RSSwwx5ff68QRvHNIJ5dgDkyMl4ar27Q6+NOPJaJL22VByftMt/kEm4Cy6CiOJTTci9J+wmqNU9gpIkCZSqhodZeyEM4cbX7RGdybpqboHzSxSicgxyeCrCYbLzObTF6+k612CVGHMv9k8lWhbgb5EU3cXcNnbKx6XDTNv4o3dTWOh/z7f6JP5978LSVvkUW5efN2gqahT0xd3E14sbCg== 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)(346002)(366004)(39860400002)(396003)(376002)(136003)(451199021)(8936002)(66899021)(66574015)(2906002)(83380400001)(33656002)(38100700002)(52536014)(7696005)(9686003)(86362001)(122000001)(82960400001)(41300700001)(5660300002)(19627235002)(966005)(66556008)(76116006)(71200400001)(478600001)(8676002)(66946007)(64756008)(66476007)(54906003)(4326008)(66446008)(55016003)(26005)(186003)(316002)(110136005)(38070700005)(53546011)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?/ZTXl5mznxMifYG04IL3p/C/tuzbcSzwDJirAy2WhxrgRYGy/WemL3OH+w?= =?iso-8859-1?Q?pOjfrIJeZ0CvfDQLvTkaa9xgdE62lZC3SnUZGzc3xZ+fVgSYdPEoA+mmIV?= =?iso-8859-1?Q?KtYrESEHvYm7vb/ZLLhV1DipQex8xYpr21oKG96vNpgkuN/f/UAe0YxPtA?= =?iso-8859-1?Q?gQWpo5F72x/GWfR10+DMUd5r5GPe61ksW3mW+C3gG+qysA02gpNUpAFnNN?= =?iso-8859-1?Q?2VPh5XZbBcuACf4bDVRypLOK/wUf9s51WeihZIqI7KKeCY99BFq8w83giE?= =?iso-8859-1?Q?IvJQPzcMuJe9yWpzp6DDHW3BK1nRKJUII9xsKBBCS43uEeNtlMBWQVqRcn?= =?iso-8859-1?Q?7/qrsS6qS1riksOrHgU7nPzmgIOtXFtaXOnLLer4TSQpIyXH9Yz2JYM9N9?= =?iso-8859-1?Q?KCwDXujR065+6g8sldYyh4IRHrACM2AuuFBZgCtP0qZaPsSe3ufT28zJw/?= =?iso-8859-1?Q?bB3GvL2t7rB1e6p39rbO1w+j2kssWVoO/eXo2DaNdcXqoKFr00R4UWzCAs?= =?iso-8859-1?Q?Yt68XB4+kZ/f0rtdJ0ruqSovYNvwAy8On1PUnWBebrIFqBgtSxJfW6qlaJ?= =?iso-8859-1?Q?aCS/aDaKpz/F8RzAmpW+XQjGh7IAtH//v7L5dIDRkqOhWxra8DM86ABCMx?= =?iso-8859-1?Q?Re5DAWTQXJjK/Bs+8WSnmZ6NE5SCnJP4KWJ5DhWvkMsqDN6IKGANKQ3598?= =?iso-8859-1?Q?xHQ94eKYWPq+H0p48CqmTZO0N+UL7aYkLRA04RJ/gQA/MKCgpFAk4mcVw4?= =?iso-8859-1?Q?xwDfOJG9tB4JoRFmIIQ4kNLhbe3/zBx4w43F178GZTSKZuEd19PHYsD8+b?= =?iso-8859-1?Q?63sPyPbbO1dVhnXDWb7u/3SDD9FZHnOjVYIivA3xpY0/9l3FGGl8E4gDXx?= =?iso-8859-1?Q?0CQE29yRcXU3iPIpAvhq25kLVNavVrQyua76s7Qx0FJ2/fqQETFRzdczul?= =?iso-8859-1?Q?7sIJX/hHuRRbFWMridXO0BOmC+s8A4G80ftxoweiv6cwDxJKNZ0hCdU3Q5?= =?iso-8859-1?Q?A9JCqUC9xnhBaftiAbnXdKefyiYZE18FSza+jIdpCzw5hLX3V3SVLwhmMN?= =?iso-8859-1?Q?xTcwYR265Wmp/hwQJx7bR+dP38Pw6aGev1t1AopnWw6JpEPeG9t9zpqQ8D?= =?iso-8859-1?Q?BTT5z1ARrfelWzUQqdzgrvx2WeVFmrhpw6EKRsSWnjtiAdBCsIonlbnrju?= =?iso-8859-1?Q?UmgHuhwRlCg8q1ijNu75V8uR19Xx3CozRbZLITNVs2xV3QipWB8ZMlKTvk?= =?iso-8859-1?Q?nQLeynpYQCcQJu6AIDfots391qraUEI+/Z+6CY4gh3W3f9dLr7Q8YXBpD3?= =?iso-8859-1?Q?8Jyx8RtDfScLk117IfPAmhxZs1xIFtIUc8iEpU+R1L/LqAX3i5h0IkwwX3?= =?iso-8859-1?Q?x8xEcFRmXkVBuN7of/JYiVUk43+aAbI05TTX81Hg05cMREqaYdDEQ7rIz/?= =?iso-8859-1?Q?PhdvVZj3oJjWSsfPjopxEPXmYE86AdrfPjpMDdCs/BJcVXTMQtbDiqbkGf?= =?iso-8859-1?Q?KW6H7LvDU5dlhGLkRB+B7HJYPfjabWtfdAfgHu0qRdO4RY9OuSJDtsEKOy?= =?iso-8859-1?Q?22oZVaZhPYzKVxNg1KhYpwiwykwiGpN+nKuiyt7Zt2pfl5n1eGRtb/xjM/?= =?iso-8859-1?Q?LsiV1LSXu3V8o=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: d06675ba-a3ec-4947-59e4-08db31cf24ac X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2023 10:03:14.5739 (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: tin+ucA/fVHNtuMTZkEHlPLwlE8lMTmZaMKbqlgN1WsLX3+BWu0EhgeNxVILRe8+j28u5GDnnRn3WhACOUwL0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6978 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 I like this approach that allows "relocation entry guided" fixups done by e= ither GenFv or PE loader. Only concern is which to use between "#" and "%". > -----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