From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ashraf.ali.s@intel.com) 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" 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" 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: [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector Date: Thu, 16 Sep 2021 19:56:37 +0530 Message-Id: X-Mailer: git-send-email 2.30.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3492 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 --- 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/SecCoreNative.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 = 0x00010005 + BASE_NAME = SecCoreNative + MODULE_UNI_FILE = SecCore.uni + FILE_GUID = 43CA74CA-7D29-49A0-B3B9-20F84015B27D + MODULE_TYPE = SEC + VERSION_STRING = 1.0 + + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = 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