From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.11289.1588947114257473537 for ; Fri, 08 May 2020 07:11:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=v3H/QaiV; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) IronPort-SDR: aYRNGK2fzVypfSH41Mfav+gfUM9C7uL6S3/tkiBliKSCWjZHNboLv/rCURqY1r5S5ix78bubqa +opVlViFtprQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 07:11:53 -0700 IronPort-SDR: mD1pgTGPt7LJ4QUCydeGVQ/u8QuwSJrLvBVFhY2AC9L/y1wjdM89CNA9IuLIz2+DFwPhuzR/+p mL1AtIrx+g4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,367,1583222400"; d="scan'208";a="264337121" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 08 May 2020 07:11:53 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 07:11:53 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 07:11:52 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 May 2020 07:11:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f1fbYW9EoTH7+ZGY6ZEagkHt0DVygsluuufFLM4GX/xIQURwZoAqO6kEja2U2GspQtmwzjh6I+5UYRneeyBLNjSj77d4CkIZcGFqlCzvTQhQxn1HJpYC31rolhsBswwCrtYGHa4XX+Om6jCiZ/lT0zAe0/pQkXERBfgCM27Ugc5nt6111eLbFZEK1V+ipbKjJlqG4gzC3PohRiD8AUeOnMuMBIWMRtUdsqcpsWUkPK6y+F0VvQms88jJbJM0GcPDPf45S2xGfdIlj15b7dEg3rwMuEOsedCxSkX5fO5PliiRkdW23y/vPuMi6AXL0APBWbg5dy3o5UWTiVTMP2iZfQ== 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-SenderADCheck; bh=YtbOCOL2bEDHSOMHB/EHLTgmnOnkMtTFmd2mSX42A7M=; b=LvOTeLZtddsps271STqJhtcnO2BMK7+tUA+s5820hnjOBtwdGrEVWHlf8V/+CxGzM7wzMXdHSdwVtiXUH/MypRgXaRmAd6YsZlCIpXammzVSGLpyQelpev1N9PVx0zzofxVH9vU8osZ/AQlkRRJnF07h0GfpS1yd3zdkRVUo5BD6oz+7QZI9ocdY6MnHsAJrHxnTJS2ZfYMIJMxwFcilu+LaopIF6c4ll2a2KxfLtia23/2JFD09da4yEecxxIpk3dVuchoCkVFWnSpgrU4Y0hpXRZYtpe0LGYjvuf0pFdpwmN8XMnMuwXHImDa4bLE88ZQKBglN87s2U6lcEuujag== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YtbOCOL2bEDHSOMHB/EHLTgmnOnkMtTFmd2mSX42A7M=; b=v3H/QaiVtlmuQ6ar5rzGUJKxiv3u5AWUBK7xQn4RRQt3bZQbuC+OYPf8gcDubInmbWZkGpA8/5/qLQW4FdX1+GOrkTnSkGqoGElXKL4cc1TEtCPZVWwTiyK1QGjgI4IsLXJyoRjCjz8cG8xxZwZflP2E4Gho6WCQLp+eNLH7ncE= Received: from BN6PR11MB3972.namprd11.prod.outlook.com (2603:10b6:405:7f::11) by BN6PR11MB1683.namprd11.prod.outlook.com (2603:10b6:404:3f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Fri, 8 May 2020 14:11:50 +0000 Received: from BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::75bf:f1b7:1d9d:475d]) by BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::75bf:f1b7:1d9d:475d%3]) with mapi id 15.20.2958.035; Fri, 8 May 2020 14:11:50 +0000 From: "Liming Gao" To: Laszlo Ersek , "Justen, Jordan L" , "Dong, Eric" , "Ni, Ray" CC: Tom Lendacky , "devel@edk2.groups.io" , Ard Biesheuvel , "Anthony Perard" , Julien Grall , "Brijesh Singh" , Andrew Fish , "Chiu, Chasel" , "Steele, Kelly" , "Kinney, Michael D" , "Desimone, Nathaniel L" , "Qian, Yi" , "Sun, Zailiang" Subject: Re: [PATCH v3 0/3] XCODE5 toolchain binary patching fix Thread-Topic: [PATCH v3 0/3] XCODE5 toolchain binary patching fix Thread-Index: AQHWJHCGJRM+Yn+1WUyc79NilwVLwKieDtIAgAAs+pA= Date: Fri, 8 May 2020 14:11:50 +0000 Message-ID: References: <8d38706c-1d89-88ca-1760-935566fd62e7@redhat.com> In-Reply-To: <8d38706c-1d89-88ca-1760-935566fd62e7@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 477ea140-ec16-42c6-c203-08d7f359c0da x-ms-traffictypediagnostic: BN6PR11MB1683: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 039735BC4E x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XSD4Y/C1wr47uzZZdxD/+GZPAr0iZi6fOWHN9BPlQMz2Y1jo7BwUY6z5HsQNFhRLaTTO+vNpJ/Q5CERrkyfkWDtJHOnr3/GqGDrkhDJtC7zfgwwHw0+oW4hWN/AKBN9fMp8e7rTOM40YMnzT2j7L2HODn7qSTQjGVWYgtX48Ksjoy+ZlMC4VEqfv52ZivfDJdpxJOPcOlarwiKW3zGEGymAbTMzAeZH3rqljx1fZt1lXu21/zH/eD3ibjVcXhF4KH0ZlqjYd5AVDyqEGUG3QuKdVQ5ZG4oe5d/VlarVngG6MNTTvMgYkaaN11jEliDHJ+U9qzE7J0Arzlc6pgNrO/fi2qZ0Olj1nV4imv7FOTPm4XAwyXyIPuBypEVvBIoy4xr7aHqhcEFQy0YdF8t0l6bDOTsMid3beQ7OWMMzT9yzEl+DpE1h1YvIfc8YpGFgh09ud/ZVFtzzLh0EutH+/BqD/f/qs3XMjltUsOr4oOUifipg9FuFcirHWy0WChjQE1qlw9qmF7mRi0OPltElZa5kcyeCOhVNd8PDirUdKSbgQlmjDu5kNSM4gjEv+8+BZgKwmo58xp+v5MK2En9FEkb8aFazKs09iMMkjndYHh4o= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB3972.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(136003)(396003)(376002)(39860400002)(346002)(33430700001)(5660300002)(55016002)(53546011)(6636002)(7696005)(186003)(9686003)(66476007)(966005)(66446008)(86362001)(478600001)(66946007)(19627235002)(26005)(64756008)(66556008)(110136005)(316002)(71200400001)(6506007)(33656002)(107886003)(33440700001)(4326008)(83310400001)(83320400001)(83290400001)(83280400001)(52536014)(8936002)(76116006)(54906003)(83300400001)(2906002)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: PqSpQmmvHOljxpH4+Mev5jqWbsCYW18eojc4d53Bxv2Ve0elC31RFhquNWIt5T7I5PV7wrz61dqFcYv7QsT2J1BsRZdMBKBwpx+jxV6rD1GACf4H2JLdCXS9W+WatjSNw+b+ix349ZhEvmabqf6pr7R3eUyH/v/YrWba8G37ErpJhG++0JQ050bUaoj8mva1VzM8nFyGWi4suHS9HK7RKEnHGA3UVa0AbUkpET+JyWKDg+RGeBmSoLFGOIInucE1sEg0ZZYALb/24EMZAMQg7fFGfsplIwtUQupvomKiboGaWNbJ8udbWqfZxyaAYahzQt7cUaZkvIFmHPmVRZIN9HAdHmU9DEHXPj/hU8U5C1/o8sIHH9z5S9rL8mGd+qPpwWDJ7Y208wUn347IUuImAVeiMJAxdCuDo5C2FycR0Dxbzs+Lim1q5DqPZFqBGLOcOfzlqO77t+81HzKGYMwlVoi6SyPK6dMnBW9U9tqFMNxUFwd8H0v55OUpG8Ah30CI MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 477ea140-ec16-42c6-c203-08d7f359c0da X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2020 14:11:50.7936 (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: HuyL7S/kYBwkHEC7u2HtLqo6qdII3JxIWHcqUdlM5vM9wHLcrVDydObhUCrKPJcHZ+c/5rjQ8cHvv7cO7s8SSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1683 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Laszlo: This change is OK to me. It doesn't impact those platforms, because their= SEC and PEI are IA32 only. This patch is to update SecPei library instance= for X64 arch. Reviewed-by: Liming Gao Thanks Liming > -----Original Message----- > From: Laszlo Ersek > Sent: Friday, May 8, 2020 7:29 PM > To: Justen, Jordan L ; Gao, Liming ; Dong, Eric ; Ni, Ray > > Cc: Tom Lendacky ; devel@edk2.groups.io; Ard Bie= sheuvel ; Anthony > Perard ; Julien Grall ; Brijes= h Singh ; Andrew Fish > ; Chiu, Chasel ; Steele, Kelly ; Kinney, Michael D > ; Desimone, Nathaniel L ; Qian, Yi ; Sun, Zailiang > > Subject: Re: [PATCH v3 0/3] XCODE5 toolchain binary patching fix >=20 > Eric, Ray, Liming -- do you have comments please? >=20 > I'm ready to push the series (it has two UefiCpuPkg patches and one > OvmfPkg patch). >=20 > Please consider specifically whether we should push the last patch at > once. The last patch would prevent the following "edk2-platforms" DSC > files from building with XCODE5: >=20 > Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc > Platform/Intel/QuarkPlatformPkg/Quark.dsc > Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc > Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc >=20 > That could be prevented if Tom sent patches for them like the middle > (OvmfPkg) patch in this series. But we don't know if those platforms > above are ever built with XCODE5. >=20 > Adding their maintainers to the CC list as well. >=20 > Thanks, > Laszlo >=20 > On 05/07/20 15:06, Tom Lendacky wrote: > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2340 > > > > Commit 2db0ccc2d7fe ("UefiCpuPkg: Update CpuExceptionHandlerLib pass > > XCODE5 tool chain") introduced binary patching in the > > ExceptionHandlerAsm.nasm in order to support the XCODE5 toolchain. > > However, the CpuExceptionHandlerLib can be used during SEC phase which > > would result in binary patching of flash. > > > > This series creates a new CpuExceptionHandlerLib file to support > > the required binary patching for the XCODE5 toolchain, while reverting > > the changes from commit 2db0ccc2d7fe in the standard file. As the Pei, > > Dxe and SMM versions of the library operate in memory (as opposed to > > flash), only the SEC/PEI version is of the library is updated to use th= e > > version of the ExceptionHandlerAsm.nasm that does not perform binary > > patching. > > > > This is accomplished in phases: > > - Create a new XCODE5 specific version of the ExceptionHandlerAsm.nas= m > > file and update all CpuExceptionHandler INF files to use it while a= lso > > creating a new SEC/PEI CpuExceptionHandler INF file specifically fo= r > > the XCODE5 toolchain. > > - Update all package DSC files that use the SecPeiCpuExceptionHandler= Lib > > version of the library to use the XCODE5 version of the library, > > Xcode5SecPeiCpuExceptionHandlerLib, when the XCODE5 toolchain is us= ed. > > - Revert the changes made by commit 2db0ccc2d7fe in the standard file > > and update the SecPeiCpuExceptionHandlerLib.inf file to use the > > standard file. > > > > I don't have access to an XCODE5 toolchain setup, so I have not tested > > this with XCODE5. I would like to request that someone who does please > > test this. > > > > --- > > > > These patches are based on commit: > > faef5a367c83 ("ShellPkg: acpiview: Check if SBBR mandatory ACPI tables = are installed") > > > > Cc: Andrew Fish > > Cc: Anthony Perard > > Cc: Ard Biesheuvel > > Cc: Brijesh Singh > > Cc: Eric Dong > > Cc: Jordan Justen > > Cc: Julien Grall > > Cc: Laszlo Ersek > > Cc: Liming Gao > > Cc: Ray Ni > > > > Changes since v2: > > - Updated [Components] section of UefiCpuPkg.dsc to conditionally exclu= de > > SecPeiCpuExceptionHandlerLib.inf for the XCODE5 toolchain. > > - Added some missed Reviewed-by: and Acked-by: tags from previous > > versions. > > > > Changes since v1: > > - Only apply the revert to the Sec/Pei CpuExceptionHandler library and > > leave the Pei, Dxe and Smm versions using the binary patching version= . > > - Generate a unique file GUID for the new library INF file and create > > a corresponding UNI file. > > - Remove any references to SEV-ES (original patches accidentally submit= ted > > from wrong tree). > > > > Tom Lendacky (3): > > UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specifi= c > > OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib > > UefiCpuPkg/CpuExceptionHandler: Revert CpuExceptionHandler binary > > patching > > > > OvmfPkg/OvmfPkgIa32.dsc | 4 +++ > > OvmfPkg/OvmfPkgIa32X64.dsc | 4 +++ > > OvmfPkg/OvmfPkgX64.dsc | 4 +++ > > OvmfPkg/OvmfXen.dsc | 4 +++ > > UefiCpuPkg/UefiCpuPkg.dsc | 7 ++++++ > > .../DxeCpuExceptionHandlerLib.inf | 2 +- > > .../PeiCpuExceptionHandlerLib.inf | 2 +- > > .../SmmCpuExceptionHandlerLib.inf | 2 +- > > ...=3D> Xcode5SecPeiCpuExceptionHandlerLib.inf} | 13 +++++++--- > > .../X64/ExceptionHandlerAsm.nasm | 25 +++++-------------- > > ...sm.nasm =3D> Xcode5ExceptionHandlerAsm.nasm} | 0 > > .../Xcode5SecPeiCpuExceptionHandlerLib.uni | 18 +++++++++++++ > > 12 files changed, 59 insertions(+), 26 deletions(-) > > copy UefiCpuPkg/Library/CpuExceptionHandlerLib/{SecPeiCpuExceptionHand= lerLib.inf =3D> Xcode5SecPeiCpuExceptionHandlerLib.inf} > (64%) > > copy UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{ExceptionHandlerAs= m.nasm =3D> Xcode5ExceptionHandlerAsm.nasm} (100%) > > create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5Sec= PeiCpuExceptionHandlerLib.uni > >