public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marvin Häuser" <mhaeuser@posteo.de>
To: devel@edk2.groups.io, ashraf.ali.s@intel.com
Cc: Ray Ni <ray.ni@intel.com>, Rahul Kumar <rahul1.kumar@intel.com>,
	Debkumar De <debkumar.de@intel.com>,
	Harry Han <harry.han@intel.com>,
	Catharine West <catharine.west@intel.com>,
	Digant H Solanki <digant.h.solanki@intel.com>,
	Sangeetha V <sangeetha.v@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector
Date: Thu, 16 Sep 2021 14:36:39 +0000	[thread overview]
Message-ID: <bd35d04b-c805-aaac-4ef8-7a0f45ef2002@posteo.de> (raw)
In-Reply-To: <b6d6af3d420ff5787787c2cac491bd0e8471cf50.1631801517.git.ashraf.ali.s@intel.com>

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 <ray.ni@intel.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Debkumar De <debkumar.de@intel.com>
> Cc: Harry Han <harry.han@intel.com>
> Cc: Catharine West <catharine.west@intel.com>
> Cc: Digant H Solanki <digant.h.solanki@intel.com>
> Cc: Sangeetha V <sangeetha.v@intel.com>
>
> Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
> ---
>   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.<BR>
> +#  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 {


  reply	other threads:[~2021-09-16 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 14:26 [PATCH v2] UefiCpuPkg: SecCoreNative without ResetVector Ashraf Ali S
2021-09-16 14:36 ` Marvin Häuser [this message]
2021-09-17 16:32 ` Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd35d04b-c805-aaac-4ef8-7a0f45ef2002@posteo.de \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox