From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web10.101.1631803005038426728 for ; Thu, 16 Sep 2021 07:36:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=oi7ga3wq; spf=pass (domain: posteo.de, ip: 185.67.36.66, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 9D40D240103 for ; Thu, 16 Sep 2021 16:36:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1631803001; bh=z9aTNurKL4ykZ7h9W/B5uQlIjGrCJocBge7E0gq6N14=; h=Subject:To:Cc:From:Date:From; b=oi7ga3wqWPKuu0pPfcLStZ/erxQXSmeke2lp7DPboSL4WrGre5Ivl9Uf8k4Bzv0+s ZKlTeePIqbD6u2U/NWyL7VSW4fipRIssBMmSNGbuuiQhYzXs+LocrSI/1pE9W9ogj9 MWwqmSHuPTwJNXQptLDnxeTBFXNsDpYbRDIA+i9lulCBYdPUzbXUHzV9C98UY72jZ+ TwB7Og9tFl8H6Rytxom5EaiWNI8whbc5yaupSbtcx0h70rD/9c1Sco5SgjAuyxe8zM L7n29rJWd4fhefV9DicMS80jnxn/GE3G+MZL/LDh/yRD2xL4rcTs3UFSzxKBuh3nMY Dlp1s5ADAGzuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H9KQv4VXwz6tmF; Thu, 16 Sep 2021 16:36:39 +0200 (CEST) Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector To: devel@edk2.groups.io, ashraf.ali.s@intel.com Cc: Ray Ni , Rahul Kumar , Debkumar De , Harry Han , Catharine West , Digant H Solanki , Sangeetha V References: From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= Message-ID: Date: Thu, 16 Sep 2021 14:36:39 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB This will also help with PE file alignment in FD, as SecCore no longer needs to be pinned to the very top. Thank you! Best regards, Marvin On 16/09/2021 16:26, Ashraf Ali S wrote: > 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 {