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.50803.1680256722988690446 for ; Fri, 31 Mar 2023 02:58:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dfSCpPZ3; 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=1680256722; x=1711792722; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j1aWLvSrFnSIBVRcdu68aXg4Y/0/H0/TuE9SeLudDtI=; b=dfSCpPZ3JEYuA4jBvF52xkXA7lBb/XnrBkzt831w9x7vpN65BN5dQ0ZB XCF9+wty3kgLPe+xTEk54C0j2e0tqVXFADCGTp8T0yxV3flNQvf8ZoYmg NMlmjjvtS6F7RJc9kp9cfvPjO1mqhKTEY2Phid4XrZcu2uj3aI/3WNpyC u7stsWHaELcXWRM4eChot9+QFMBm2Lhz3FQT5s0+L1yOkZhHjqz2aGvfI 0BI6gkjhFoklDjpWPByYbYkdhmIge3ohFpWavTjWVcGIoS7UqUTZJZRQC E00gF7goip6tF4eEAM5J//HAJ7LK71mBcZiyFkCaGqVFYl/HB7mB9uhPO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="369201306" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="369201306" 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 02:58:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="754347569" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="754347569" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 31 Mar 2023 02:58:32 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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 02:58:30 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) 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 02:58:30 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (134.134.137.100) 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 02:58:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b7AY6cg3zDbOSU2q+SEv4wfWUmmulsm7G42rVhlRNAZqntmJXRCHt7DQv2/AZPgyvmeoasOeAgPFiNcd5q7p6u450fj5V3zl9PwoynRDa9aHpRTKnNvxXl+Zlyg8t69fNzEFJmUzU8lc+pR6mqBYmS9c0wma+crZcZpg/XlxTW5Dt52AbZY2lrHt78HaFqzVMEIzJ1jciN5lqwm/jE3LtBxnu4lqX3y5j1aF5kSNfy+6bik462yFC8bdozNz4QTMR9robT1f1JMEvNTotVw6OfIv4/Jqj7gyv8sIcAzIGTHsZRPcYYaxH+AYRLZ4U9m9bOMQyKLzebDTMOEttKnO1A== 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=KEKorv6WQ1DuHP4xWGSP0uSGKuteFPRy0lE6XxvkCio=; b=eKDkKhHyOqIeCK+LZGJ7QZwr5PlOXV3DQJNtOKKI1b1pBMJJ95smR3T2Jr/fZ9clbxs75ibhhiZRI95PHg8PBlTq9G6e89cE/cW3qbFZLeMPl1YCwHr6C5OD0YXcUUTLlKibqXxClllJ5g8MO02iO8jOxRj4+pmfAp592mzPpRWj5aUo8ez4k5UQEj+gocFWlccFJopQWY6Lsm3KdpwLDcmMin8gHpDLbjCylx4iSNMN3npAgUlgIlIlZ/3UaUVcIGBIvDja5IEAa6DZn+YK/MuDEXbdZbT1VolBh7eiQEX8UjdKD4rIU3FdWryppocyMIYScptlHwuG9xEMOvwjYg== 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 PH8PR11MB7096.namprd11.prod.outlook.com (2603:10b6:510:214::10) 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 09:58:27 +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 09:58:27 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Ni, Ray" , Ard Biesheuvel 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 2/5] UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version Thread-Topic: [edk2-devel] [RFT PATCH v3 2/5] UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version Thread-Index: AQHZY7Fh30tON8oed0yb8fvrle16gK8UotBQgAAERDA= Date: Fri, 31 Mar 2023 09:58:27 +0000 Message-ID: References: <20230331091437.1593337-1-ardb@kernel.org> <20230331091437.1593337-3-ardb@kernel.org> <17517877FE72B326.27612@groups.io> In-Reply-To: <17517877FE72B326.27612@groups.io> 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_|PH8PR11MB7096:EE_ x-ms-office365-filtering-correlation-id: 08900f1d-1fa5-4761-3a52-08db31ce795a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +u2eDkMjMQ+4bXCEMImx29VtoKUTocJDf8LQsXSGnIXQLod1X5eTQuGZ1K1XcUcBcnYeKxCsb1CBXyKEv9CfkGrovrS2qhQNEEftiDIjKdUp+myDrUQLl4tlwBqUGF1EbChZMW0PEVgQn6ZzVAiMzVKnsO5xThwWqj4nPs0GnofqQWfmO7eNsnQdAl64naKiCet2KdX4Z1trGGRNNykyYWVy0PmO2/r6GMtYdSR8g8RyAXsuZrqV9KEFoJvu1RTel2k0JBMZRWzoYcVaztHSUcmcSD63W4Dh7rQ9+OK2+z2zNRWX0duOsY97ddCbqDRQ9/e0DU56FCIRKDzv5ZKccMx4hdrEgKAvVJV8sdnRJBzehiqdG8Hobz6ECMisGkQ1Qjt91uSDsxMTu02nj3+uqCpa1dn5MWLp843U1Taolo7sc/dEyGnN+4qfk+U+w/rKPWNj55J7+Lp397CBcMIsXMoVuH/LtkNBkXuZ9Bw3q8CgiCJm4Yhp1HLtRAsMD8Alj9vyhYz/ZvyIiqK5F4Nv1L4OGOg8u9mAM8Sgocr/8qkSAVvU73AnJ7Z/EYXtp4es8mmHS6kZoRn7Ev3yJ6I4hkaHLbDgqpZe5jBI19qu+2REoJ2E3eDwwLmTjAxMG94Qy1G17L2AA457KGrzA8G1vQ== 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)(376002)(396003)(136003)(39860400002)(366004)(346002)(451199021)(38070700005)(122000001)(38100700002)(82960400001)(110136005)(478600001)(54906003)(4326008)(5660300002)(76116006)(52536014)(66946007)(64756008)(66476007)(66446008)(66556008)(86362001)(316002)(55016003)(19627235002)(41300700001)(2906002)(66899021)(9686003)(26005)(53546011)(6506007)(71200400001)(966005)(83380400001)(7696005)(33656002)(66574015)(8936002)(8676002)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?Wyg6X+8WBavlz9NNybkH4u7H6LkWoQYzmgquPNje/Oe+7zAOzAw0niEMQt?= =?iso-8859-1?Q?vw3BanT4fEOfXr/KbxJFw+62g6n0mTuYLPZgqVLlnLHU3dXmaktl2B6xK/?= =?iso-8859-1?Q?PuBKf5X4uRjAYkWsQk8x73j7+ABhjrVb247WtrImwMs0XazMvesfB/zllB?= =?iso-8859-1?Q?O4fSwzIaX5h5TfmAuMZM7BZXmK6RFYxMH2atOtYNnQHRJwiW6QXPeZ/wu/?= =?iso-8859-1?Q?5Zai+W4HxXVB/7lfUA5s647rnapBYXBUI77FY5WQSV8JLTNMVhDZHY/B+W?= =?iso-8859-1?Q?GawUhRMgwxEkf2K7EgXJMCpIA+b/WKFtWI5uKXwky/q9PadETavVc0Xwaq?= =?iso-8859-1?Q?Tqal82JlCFImysBjujL9EqHQnE3A+wCjlcFfPY+czkxdbVjgy8BmRfCzKQ?= =?iso-8859-1?Q?aqcJHdNhwuqtK/CdLsr/XPJC9HeQaaWKUbYbSxPX5z9lbJOtmYV76qpso5?= =?iso-8859-1?Q?TvQuR8B3kNAq772353mO0SnnhzmSs7P7U/PEAvxT6M2sSnYEzGpHlKAdCW?= =?iso-8859-1?Q?4xMBc1eYiQ5arU7FDiR7+WaCK4IUQ5XOhN2nyFHd9wEa0mN8CJpKQ3MSA+?= =?iso-8859-1?Q?/bCdLLizEDOAOTxEhnkrJUGyXCsgj0q9jL3SP+AV09jmM1IIHTPkpV/8dW?= =?iso-8859-1?Q?2Zw1XadyQnWXr+lihcoo0Mt7Qg597+Tq2RvhgbYcuNZu7BqcInUZA0sQw0?= =?iso-8859-1?Q?nXlXIokxh9mZgCGR2GUB6c1wOhqkSTEs6fp8ogtpDfeKZzO5sfRaAvzhYK?= =?iso-8859-1?Q?+ObSntkBpq6vYDkC4UonaeiYCIdDMobzR6BIfijKyPNhl/CNi/iP6FNk3K?= =?iso-8859-1?Q?6oapw8Vhb6qGKfo6w3xOPQsZyB5gq30hdOdpdMea7+TGePjhl6qVfd/IpV?= =?iso-8859-1?Q?CWQnWceRCwp1QmAiGCw7kjhUAMdz2b7s01YXMvVmm7siSdFfD1A3ePybaC?= =?iso-8859-1?Q?G0nqr0t62G/ZoRvnHQeMJ7tP/6EOwVbpDOaKPJvLy1SQEEQyF8tST1dAUf?= =?iso-8859-1?Q?/Aut++b7l4kQgyvkiwPc0I+6XSJ6LNMVNUZycZVT85T+5mI294/oYPt93I?= =?iso-8859-1?Q?INmcrbnT3ZGhadd/8B+JMLNhL/Oop3Twix5MOK1ZjrLHiwk7sFy61fVc+L?= =?iso-8859-1?Q?6+R5VkImaHFM58CdP9o+9UJUeUZ/g9/nBHgDKuUueY0e6Ue819RTasq5Te?= =?iso-8859-1?Q?yFoaC5fzzGNnkpdbeBsapbvPDRzDkDht2BiaxfeIaR8YRDkiGaxs92iUxz?= =?iso-8859-1?Q?uiwzRDAkCOZd5RVVgcdcgaIovwNCjOce5TAR/+IPKzldlEcnc3oaN2o1Ol?= =?iso-8859-1?Q?Yo8tp8DUxKw/IDumLpooZO1jnI3hZiBPWI0rE9/opDxrJRZqn+akVxn1Ta?= =?iso-8859-1?Q?U80IicUIyWu201Y2fIBIgCprD0K0ve4LcyEcYIVgSIPqqPRJggKyH9bQEA?= =?iso-8859-1?Q?samW4wRFDHq6osf1FfA2v65ekiq9vN8ACrNOQP8bkZcu+d7n6VbauMvRnN?= =?iso-8859-1?Q?4y3o3BW//tUwPUQGQIuNMZCCAK+u1kkz6G/eHZINPeytddeQhEWa1dbMAc?= =?iso-8859-1?Q?kdi/56yKGFkR7rBQnoB6MMP+PUnJkqOw08gPfsbb77IsMDp2dTWHvXSvG2?= =?iso-8859-1?Q?yvzd7DVYc2mg4=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: 08900f1d-1fa5-4761-3a52-08db31ce795a X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2023 09:58:27.1580 (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: 8cp4NTHHkIo7wxcl5eppe6ARtmZ0IXJUKkXZfl5Jqfx6Fn4nbBmAtR/gGX8nEuWfaNi6TIQ5CX1uDbtW0AYHmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB7096 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 By the way, which ("%" or "#") should be used for def check in NASM? I thought we need to use "%" but your patch uses "#". > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Friday, March 31, 2023 5:56 PM > To: Ard Biesheuvel ; devel@edk2.groups.io > Cc: Andrew Fish ; Kinney, Michael D > ; Liu, Zhiguang ; > Rebecca Cran ; Tom Lendacky > ; Marvin H=E4user > Subject: Re: [edk2-devel] [RFT PATCH v3 2/5] > UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version >=20 > Ard, > Thanks for the detailed commit messages. That really helps me to > understand why XCODE version > was needed. >=20 > However, I feel it would be great if you can "highlight" what are changed= by > this patch. > The following is just an example. You can reword as you like. >=20 > 1. Change for non-XCODE SecPeiCpuExceptionHandlerLib: > * Use SecPeiExceptionHandlerAsm.nasm (renamed from > ExceptionHandlerAsm.nasm) > * Removed some unnecessary absolute references > * (32 IDT stubs are still in .text.) > 2. Change for XCODE SecPeiCpuExceptionHandlerLib: > * Use SecPeiExceptionHandlerAsm.nasm instead of > Xcode5ExceptionHandlerAsm.nasm > * CET logic is not in SecPeiExceptionHandlerAsm.nasm (but aligns to no= n- > XCODE lib instance) > * Fixed a bug that does runtime fixup in TEXT section in SPI flash. > * Emitted the code carrying the absolute symbol references into the .d= ata > which XCODE or > LLD linkers allow. > Then fixup can be done by other build tools such as GenFv if the cod= e runs > in SPI flash, > or by PE coff loader if the code is loaded to memory. >=20 > Again, thanks for the quick patches just because I asked some XCODE > questions. >=20 > Thanks, > Ray >=20 > > -----Original Message----- > > From: 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: [RFT PATCH v3 2/5] UefiCpuPkg/CpuExceptionHandlerLib: Use > single > > SEC/PEI version > > > > Currently, we use the non-Xcode5 version of ExceptionHandlerAsm.nasm > > only for the SEC and PEI phases, and this version was not compatible > > with the XCODE or LLD linkers, which do not permit absolute relocations > > in read-only sections. > > > > Given that SEC and PEI code typically executes in place from flash and > > does not use page alignment for sections, we can simply emit the code > > carrying the absolute symbol references into the .data segment instead. > > This works around the linker's objections, and the resulting image will > > be mapped executable in its entirety anyway. Since this is only needed > > for XCODE, let's make this change conditionally using a preprocessor > > macro. > > > > Let's rename the .nasm file to reflect the fact that is used for the > > SecPei flavor of this library only, and while at it, remove some > > unnecessary absolute references. > > > > Also update the Xcode specific version of this library, and use this > > source file instead. This is necesessary, as the Xcode specific version > > modifies its own code at runtime, which is not permitted in SEC or PEI. > > Note that this also removes CET support from the Xcode5 specific build > > of the SEC/PEI version of this library, but this is not needed this > > early in any case, and this aligns it with other toolchains, which use > > this version of the library, which does not have CET support either. > > > > Signed-off-by: Ard Biesheuvel > > --- > > > > > UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib > > .inf | 4 +++- > > > > > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{ExceptionHandlerAsm.na > > sm =3D> SecPeiExceptionHandlerAsm.nasm} | 12 ++++++++---- > > > > > UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHa > > ndlerLib.inf | 4 +++- > > 3 files changed, 14 insertions(+), 6 deletions(-) > > > > diff --git > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandler > > Lib.inf > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandler > > Lib.inf > > index df44371fe018e06d..885bb6638ab58620 100644 > > --- > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandler > > Lib.inf > > +++ > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandler > > Lib.inf > > @@ -28,7 +28,7 @@ [Sources.Ia32] > > Ia32/ArchInterruptDefs.h > > > > > > > > [Sources.X64] > > > > - X64/ExceptionHandlerAsm.nasm > > > > + X64/SecPeiExceptionHandlerAsm.nasm > > > > X64/ArchExceptionHandler.c > > > > X64/ArchInterruptDefs.h > > > > > > > > @@ -58,3 +58,5 @@ [Pcd] > > [FeaturePcd] > > > > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## > > CONSUMES > > > > > > > > +[BuildOptions] > > > > + XCODE:*_*_X64_PP_FLAGS =3D -DNO_ABSOLUTE_RELOCS_IN_TEXT > > > > diff --git > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.n > > asm > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/SecPeiExceptionHandler > > Asm.nasm > > similarity index 94% > > rename from > > > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nas > > m > > rename to > > > UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/SecPeiExceptionHandlerA > > sm.nasm > > index aaf8d622e6f3b8f1..ec45c60181906c14 100644 > > --- > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.n > > asm > > +++ > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/SecPeiExceptionHandler > > Asm.nasm > > @@ -27,7 +27,9 @@ extern ASM_PFX(CommonExceptionHandler) > > SECTION .data > > > > > > > > DEFAULT REL > > > > +#ifndef NO_ABSOLUTE_RELOCS_IN_TEXT > > > > SECTION .text > > > > +#endif > > > > > > > > ALIGN 8 > > > > > > > > @@ -51,6 +53,9 @@ HookAfterStubHeaderBegin: > > push rax > > > > mov rax, HookAfterStubHeaderEnd > > > > jmp rax > > > > + > > > > +SECTION .text > > > > + > > > > HookAfterStubHeaderEnd: > > > > mov rax, rsp > > > > and sp, 0xfff0 ; make sure 16-byte aligned for excepti= on context > > > > @@ -276,8 +281,7 @@ DrFinish: > > ; and make sure RSP is 16-byte aligned > > > > ; > > > > sub rsp, 4 * 8 + 8 > > > > - mov rax, ASM_PFX(CommonExceptionHandler) > > > > - call rax > > > > + call ASM_PFX(CommonExceptionHandler) > > > > add rsp, 4 * 8 + 8 > > > > > > > > cli > > > > @@ -384,10 +388,10 @@ DoIret: > > ; comments here for definition of address map > > > > global ASM_PFX(AsmGetTemplateAddressMap) > > > > ASM_PFX(AsmGetTemplateAddressMap): > > > > - mov rax, AsmIdtVectorBegin > > > > + lea rax, [AsmIdtVectorBegin] > > > > mov qword [rcx], rax > > > > mov qword [rcx + 0x8], (AsmIdtVectorEnd - AsmIdtVectorBegin) = / 32 > > > > - mov rax, HookAfterStubHeaderBegin > > > > + lea rax, [HookAfterStubHeaderBegin] > > > > mov qword [rcx + 0x10], rax > > > > ret > > > > > > > > diff --git > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuException > > HandlerLib.inf > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuException > > HandlerLib.inf > > index 619b39d7f1de9ae3..17f872bb15eb0ff7 100644 > > --- > > > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuException > > HandlerLib.inf > > +++ > > > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuException > > HandlerLib.inf > > @@ -33,7 +33,7 @@ [Sources.Ia32] > > Ia32/ArchInterruptDefs.h > > > > > > > > [Sources.X64] > > > > - X64/Xcode5ExceptionHandlerAsm.nasm > > > > + X64/SecPeiExceptionHandlerAsm.nasm > > > > X64/ArchExceptionHandler.c > > > > X64/ArchInterruptDefs.h > > > > > > > > @@ -63,3 +63,5 @@ [Pcd] > > [FeaturePcd] > > > > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## > > CONSUMES > > > > > > > > +[BuildOptions] > > > > + XCODE:*_*_X64_PP_FLAGS =3D -DNO_ABSOLUTE_RELOCS_IN_TEXT > > > > -- > > 2.39.2 >=20 >=20 >=20 >=20 >=20