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.web08.837.1631896373016646331 for ; Fri, 17 Sep 2021 09:32:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=F8k915Yc; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10110"; a="209920946" X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="209920946" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2021 09:32:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,301,1624345200"; d="scan'208";a="546484954" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by FMSMGA003.fm.intel.com with ESMTP; 17 Sep 2021 09:32:51 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 17 Sep 2021 09:32:51 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 17 Sep 2021 09:32:50 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 17 Sep 2021 09:32:50 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) 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.2242.12; Fri, 17 Sep 2021 09:32:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R158dbMc4FjmA1zUXEjxuYacV2E4CE89G9fI0Wy7z/ejmXvl0uKYxug/+RfVNJvifQ+lOOabtjDHfKqO4OvEWhbuR2VRHr5I45iXG34M2wMvuY6Zo+53iDWQd6Y8ELBghgr77xHrNoNBoC0O0Lo4/6Cnr+Mu7cB1xqW2CgekErSsyc777ZEA6WE4SB2fXSiOKnSesxwv2zG/SUgBCG3yG4VXe/lEaNsCPRbBMdsCAW73SE6KcEb2qlcfelEjmSAAG2ar/7lLIgjiCh0O7F5dm0Vi6SR6cDCowvl2kU4ZTgJwDs2o8UWCL0332hEFaxJA4MOxcbrnfp1omk3dziN4rw== 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; bh=5mJpEbP2xNrndo0gFeBOSKI6sCaW7uz4fLbFNXRKh7s=; b=bhKvA4X+2LAQ8yTy+5dUZlgs6u0a8RxlkhfzLwLSSF1rtDVGoXhsws6Prd8bk/P3JCpezR5ZR+GHvwQetuwlxqavC3R+tampYeBx/Mldbyau3Qt/HpQCUPrPYB0NabRefErHp666A79ibIDo5FYdUCJPE/O+eG2xXMKi3beji71x8WI8z+ME9FhbK1FPkdo5avQ+sqQE78tC//QQMj15csbTxVoyTqxCEnToPMvF4bo8RXxg4iJGxAuvTYpwNmD9zUIvjM8Tr3Py0nOd98CSEIsr1noBeg4peFBqVa2rHzRoYgQK3/e4IfG2ORk40mHNVEsh+5OLsiBWlUxzAqyjhQ== 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=5mJpEbP2xNrndo0gFeBOSKI6sCaW7uz4fLbFNXRKh7s=; b=F8k915Ycdrfab2ZFQz5JjmJFGDX+ZRjQP3kAyyf5dDmFmVxHmlpMVvtrLxAl7fFf+RQ0knMGo9GQe9IU3UZEMXGThtpTMnZEmguQ7upmEnh3DSD6CVL9wZTKG3GJ4nABTtM3prylCIGT4osFg1Nvj1hKC4AoquY228s7wr+BPA0= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MW3PR11MB4633.namprd11.prod.outlook.com (2603:10b6:303:5b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 16:32:49 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::50ce:c9a3:ab37:9fac]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::50ce:c9a3:ab37:9fac%9]) with mapi id 15.20.4500.019; Fri, 17 Sep 2021 16:32:49 +0000 From: "Ni, Ray" To: "S, Ashraf Ali" , "devel@edk2.groups.io" CC: "Kumar, Rahul1" , "De, Debkumar" , "Han, Harry" , "West, Catharine" , "Solanki, Digant H" , "V, Sangeetha" Subject: Re: [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector Thread-Topic: [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector Thread-Index: AQHXqwbpdJ+rqZNYX0GwaJhmTWHHpKuobTSw Date: Fri, 17 Sep 2021 16:32:49 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 140b65dd-1365-4908-6e4f-08d979f8c9f9 x-ms-traffictypediagnostic: MW3PR11MB4633: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bymJn1Wc000ui0Jzbr50qW8aVfdkQJPMn2f5/I67YKvfdBZ9KeM2KIc5RrZpqB4ZxC0IubQ46e7oUWCaxzyC3T5KvpNwHfe/pGNzFaTRvniJPPSGaPTa8H3RHc73dcAiIOgUdqpU4mKKXzrNXAfrCpGGVJAfBbvFoqt1n38MYtDSZ6txBdIiC2zxXnqqN40dswxHGfAfALlOfYRW8/2P5wFmhXE+Q4pkPfMSB76Ua68JpLEeKszRsZ9P0syYRVrnApS3pQWEDINuwZJOOCcUmMn6v13G7czqUO7w1ORd8cNN/5K8nSPUPE7RSAUcfAH9BrJraTMXCJatAMmMYqfz3daMEhdJdwgaQStY/w/JVtBLYGzOYTWheSAuVBTI6a9STXlo8i1FCcLoJWnLo/VgE7LaWUSEW4lT1GfgRFGoQdVgtjxVYzLMrF8YhpIFox6PS4iASwTvV92e6T82FHshFKUREK8Kg2pnx0SPlaGlqw9yyrsInQ3OMwzvRxrJq80fWOWD0cZQgGACwTKe7Te60sg8Ycd6j8WvCXcyOXN39E190YfE4MueKzBTOEze+y5+523VWa6PNTtEonV912oB08iwAtrmFLtkQWovadGv3lXAQSAgcqmUa8WHLSP7blj5QEBTUAo4LTISDVQCq0cfaGEcgW4XNEsbY4lWITynDnVwInU9a1yB+L9c0MrDtriWuaTO0cgE3nX4a62o9JiE7da0YeixqkAQfMQSPeOo626o7CE/gTCL8jnhSW620mlR3exXHQvYfbQZsS+4VT4d4bfkTUGI2OZ6HonOLBJztIk= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(4326008)(107886003)(9686003)(38100700002)(2906002)(508600001)(186003)(52536014)(38070700005)(33656002)(26005)(83380400001)(55016002)(5660300002)(110136005)(76116006)(66476007)(54906003)(53546011)(64756008)(66946007)(66556008)(66446008)(19627235002)(71200400001)(8676002)(6506007)(122000001)(316002)(86362001)(8936002)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MQxl3biDNJVIvBiOTdg8ua4QR5iq6EOrIKw8XyxnlMRvsDtYUgNaw6hbBKKC?= =?us-ascii?Q?MXJlYzY8GLRP28kqefE00s1PkLUvqYaRpKWfvSz+f++u1Ude9ETJAoaChtpu?= =?us-ascii?Q?gRjSwufrabx+BfuMrF36TQngEpKg9PhVbznmclvxxxxGfCyvzly6Tem8ypir?= =?us-ascii?Q?4fYiEb4Y0t5suUoSPB44qE/hKg9j9UZv1JY821oInscGS/YbSrFXxPn+4YbP?= =?us-ascii?Q?cB/DkMWz2+jk/JQhiyBhbyQf0JlFt/OKnJB8ysXDIyu14C6raUXu3fJCiSGD?= =?us-ascii?Q?kewN8xot1P19eechOcK9DBz3ZaVuXG2VSXVJ8PoZ3rOGBQgLhW3QC6ueBUCh?= =?us-ascii?Q?m1h6Lvlh4buvs1ai3GDlb+ate9o6rl8v7jO4/+uWrZCmEhdeBBT+FuThjbGB?= =?us-ascii?Q?vAhSlrSa+ysnHpaa12OrH9mutReZTFSgiMSOpHmx5eHOx89ymQ8htl8gGdjO?= =?us-ascii?Q?nHLOCM65DV91Y2JStGY3RAS8F3GNM8cx7QCwZv9kDuuTlEvrrUXMagKbY3Tg?= =?us-ascii?Q?ZfGo2Bh6iDLkW3ssLqyClxFYrtnubRS5ITUZpBWaE4V1SYH+mvP0sn5AqtcT?= =?us-ascii?Q?L7Jh2hr3R3ykbTXcG0MoUV+lz7okIXzeyR3wSiXSszxq7R+nK8qhrl6THrDM?= =?us-ascii?Q?YWPvWI14jXaoWCTXO8IxWyCS7OeGsQhXws5YWoiUpT6QZQnkjAyHlAYKFJSe?= =?us-ascii?Q?xpQyPWrbBw3sSuTBcBRiRgeczQtinAlnOm8JApmKZ2efP2mw8gK6UggBLz+y?= =?us-ascii?Q?y2beYTnEqfkmj3CblX0u9oePDKrtBHJgM6dhmj2N1f7T5P2upBq+muYmqld+?= =?us-ascii?Q?VJ1kmbD/4sE2NIjk0IjH49e3TxwvOpMsTFtJZQSCPgQHbR0I6UnuXnrlFfKC?= =?us-ascii?Q?2CAgapv3ogHKwjCpxqfV/5xa6FXuiXRBK3sh8DiQMEz9qyVfuSQA6n2Q3zjk?= =?us-ascii?Q?Q4yJTQUAYreNW0a6rXT62kEkUJXUs+0FzUNXY3+p1qI/5aqLzycPI1ah7Gjt?= =?us-ascii?Q?DZYQwMZbx60SiQ21CNSAeeQ7Fu4E9L7jtvYu0PgsX+z0EfDgRhM9Ebh68Aws?= =?us-ascii?Q?0EmjCpSmAbzWuHVskOdBa0lHPHwOlTYKoIfNST0mkkDZ95s4o6Voqj7zf2EY?= =?us-ascii?Q?fkskPflx3YRPhJGrBa6v2yE9Pg9MMGAactlJc0ZUP1BwmQJZc8bPe5xrwcno?= =?us-ascii?Q?/VETgYbGE5AbRz3j7S3FAyYYHJIUtPfsEOIC7gJr2aquMoQeUSGb7kcapPdH?= =?us-ascii?Q?VUOGLY5wWje42hqDCMSkJ4TkAhe4yIwgxktXISyKXsvhCufInGauRV6se+fz?= =?us-ascii?Q?XBO1aPNOnrn2UraG4NyEigx+?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 140b65dd-1365-4908-6e4f-08d979f8c9f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2021 16:32:49.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: nZn7RhgcdtPJpoHY+7n/yir7LvCu2UORRe0BaN9TcKmNr/EmvXlBCFu6JCtdaANWNehNk5+G9I7eKvpvFhKE8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4633 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: S, Ashraf Ali > Sent: Thursday, September 16, 2021 10:27 PM > To: devel@edk2.groups.io > Cc: S, Ashraf Ali ; Ni, Ray ; K= umar, Rahul1 ; De, > Debkumar ; Han, Harry ; West,= Catharine ; > Solanki, Digant H ; V, Sangeetha > Subject: [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3492 >=20 > Currently SecCore.inf having the resetvector code under IA32. if the > user wants to use both SecCore and UefiCpuPkg ResetVector it's not > possible, since SecCore and ResetVector(VTF0.INF/ResetVector.inf) > are sharing the same GUID which is BFV. to overcome this issue we can > create the Duplicate version of the SecCore.inf as SecCoreNative.inf > which contains pure SecCore Native functionality without resetvector. > SecCoreNative.inf should have the Unique GUID so that it can be used > along with UefiCpuPkg ResetVector in there implementation. >=20 > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Debkumar De > Cc: Harry Han > Cc: Catharine West > Cc: Digant H Solanki > Cc: Sangeetha V >=20 > Signed-off-by: Ashraf Ali S > --- > UefiCpuPkg/SecCore/SecCoreNative.inf | 80 ++++++++++++++++++++++++++++ > UefiCpuPkg/UefiCpuPkg.dsc | 1 + > 2 files changed, 81 insertions(+) > create mode 100644 UefiCpuPkg/SecCore/SecCoreNative.inf >=20 > diff --git a/UefiCpuPkg/SecCore/SecCoreNative.inf b/UefiCpuPkg/SecCore/Se= cCoreNative.inf > new file mode 100644 > index 0000000000..b528c59879 > --- /dev/null > +++ b/UefiCpuPkg/SecCore/SecCoreNative.inf > @@ -0,0 +1,80 @@ > +## @file > +# SecCoreNative module that implements the SEC phase. > +# > +# This is the first module taking control after the reset vector. > +# The entry point function is _ModuleEntryPoint in PlatformSecLib. > +# The entry point function starts in 32bit protected mode or 64bit > +# mode depending on how resetvector is implemented, enables > +# temporary memory and calls into SecStartup(). > +# > +# Copyright (c) 2021, Intel Corporation. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D SecCoreNative > + MODULE_UNI_FILE =3D SecCore.uni > + FILE_GUID =3D 43CA74CA-7D29-49A0-B3B9-20F84015B27= D > + MODULE_TYPE =3D SEC > + VERSION_STRING =3D 1.0 > + > + > +# > +# The following information is for reference only and not required by th= e build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 EBC > +# > + > +[Sources] > + SecMain.c > + SecMain.h > + FindPeiCore.c > + SecBist.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + UefiCpuPkg/UefiCpuPkg.dec > + > +[LibraryClasses] > + BaseMemoryLib > + DebugLib > + PlatformSecLib > + PcdLib > + DebugAgentLib > + UefiCpuLib > + PeCoffGetEntryPointLib > + PeCoffExtraActionLib > + CpuExceptionHandlerLib > + ReportStatusCodeLib > + PeiServicesLib > + PeiServicesTablePointerLib > + HobLib > + > +[Ppis] > + ## SOMETIMES_CONSUMES > + ## PRODUCES > + gEfiSecPlatformInformationPpiGuid > + ## SOMETIMES_CONSUMES > + ## SOMETIMES_PRODUCES > + gEfiSecPlatformInformation2PpiGuid > + gEfiTemporaryRamDonePpiGuid ## PRODUCES > + ## NOTIFY > + ## SOMETIMES_CONSUMES > + gPeiSecPerformancePpiGuid > + gEfiPeiCoreFvLocationPpiGuid > + ## CONSUMES > + gRepublishSecPpiPpiGuid > + > +[Guids] > + ## SOMETIMES_PRODUCES ## HOB > + gEfiFirmwarePerformanceGuid > + > +[Pcd] > + gUefiCpuPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize ## CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdMigrateTemporaryRamFirmwareVolumes = ## CONSUMES > + > +[UserExtensions.TianoCore."ExtraFiles"] > + SecCoreExtra.uni > diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc > index 699c91626b..870b452840 100644 > --- a/UefiCpuPkg/UefiCpuPkg.dsc > +++ b/UefiCpuPkg/UefiCpuPkg.dsc > @@ -161,6 +161,7 @@ > UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf > UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf > UefiCpuPkg/SecCore/SecCore.inf > + UefiCpuPkg/SecCore/SecCoreNative.inf > UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf { > -- > 2.30.2.windows.1