From nobody Sun Apr 28 14:19:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+80810+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80810+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1631802415; cv=none; d=zohomail.com; s=zohoarc; b=AInSg/GRPKDr2TCjGj4MZsO/wjoRglGJuVZN01uFW4pSnMFXlZ2gcjRYh/UpDQdrzC2Czi8WxU4+42koI6iaaLZk6SlzxKfktlwKucGjgOe7d7xLmXykVDzHRIPRAXxnGYxhuBjirFd6IGVjYTRp/9Q5p4z4wfc6PGja8d9GkEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631802415; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=ME24Ipx+d5UvmtT9uRgtceCr+FI8Vi7BWSoJab4mcDE=; b=H3BDy2Es6wMNRX64V6qg6zryFwzFzTAoAe8x1JayZeT1OfRFCwuv8I2rr2FTVdXga6Hony5JCcWZMQAdIv5Scszu/JpSxUZbq5E308KmpEpZeYX+zFKw6Hgax8hL4Ta4VJfAssycp5yt2Vu7NMzJOkouXEuiZUGbm2Rejo/XagY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80810+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1631802415910652.839204756183; Thu, 16 Sep 2021 07:26:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MypBYY1788612xWEvGr89in0; Thu, 16 Sep 2021 07:26:55 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.2018.1631802413556569456 for ; Thu, 16 Sep 2021 07:26:53 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10109"; a="219387642" X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="219387642" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 07:26:52 -0700 X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="698881970" X-Received: from basfe004.gar.corp.intel.com ([10.66.129.57]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 07:26:48 -0700 From: "Ashraf Ali S" To: devel@edk2.groups.io Cc: Ashraf Ali S , Ray Ni , Rahul Kumar , Debkumar De , Harry Han , Catharine West , Digant H Solanki , Sangeetha V Subject: [edk2-devel] [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector Date: Thu, 16 Sep 2021 19:56:37 +0530 Message-Id: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashraf.ali.s@intel.com X-Gm-Message-State: xnnZAqXjZxvZwhawE8xo4zkEx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631802415; bh=3p8L9Xnszq5eonObgSov33hGpdWDu6OW0mrYnKGtd0c=; h=Cc:Date:From:Reply-To:Subject:To; b=FCO9RIQQcM2/dDogKuyXHDkEkgVS113ROw9WFD2x4lYZboc1XhZaKmAZJz/4NUf6+k+ bp9/lgHlZ+0z2bc1s9Ru1iMuJtfdEsdEeiJEW2XKl6HdHC2tau06jTN0WRNr+kPgwdti7 ztXRwplouPICTdpfYKEMw6CZe635igSN7E0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631802417367100002 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3492 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. Cc: Ray Ni Cc: Rahul Kumar Cc: Debkumar De Cc: Harry Han Cc: Catharine West Cc: Digant H Solanki Cc: Sangeetha V Signed-off-by: Ashraf Ali S Reviewed-by: Ray Ni --- UefiCpuPkg/SecCore/SecCoreNative.inf | 80 ++++++++++++++++++++++++++++ UefiCpuPkg/UefiCpuPkg.dsc | 1 + 2 files changed, 81 insertions(+) create mode 100644 UefiCpuPkg/SecCore/SecCoreNative.inf diff --git a/UefiCpuPkg/SecCore/SecCoreNative.inf b/UefiCpuPkg/SecCore/SecC= oreNative.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-20F84015B27D + MODULE_TYPE =3D SEC + VERSION_STRING =3D 1.0 + + +# +# The following information is for reference only and not required by the = 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 { --=20 2.30.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#80810): https://edk2.groups.io/g/devel/message/80810 Mute This Topic: https://groups.io/mt/85652749/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-