]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: SecCoreNative without ResetVector
authorS, Ashraf Ali <ashraf.ali.s@intel.com>
Thu, 16 Sep 2021 14:26:37 +0000 (22:26 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 18 Sep 2021 08:22:52 +0000 (08:22 +0000)
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.

Reviewed-by: 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 [new file with mode: 0644]
UefiCpuPkg/UefiCpuPkg.dsc

diff --git a/UefiCpuPkg/SecCore/SecCoreNative.inf b/UefiCpuPkg/SecCore/SecCoreNative.inf
new file mode 100644 (file)
index 0000000..b528c59
--- /dev/null
@@ -0,0 +1,80 @@
+## @file\r
+#  SecCoreNative module that implements the SEC phase.\r
+#\r
+# This is the first module taking control after the reset vector.\r
+# The entry point function is _ModuleEntryPoint in PlatformSecLib.\r
+# The entry point function starts in 32bit protected mode or 64bit\r
+# mode depending on how resetvector is implemented, enables\r
+# temporary memory and calls into SecStartup().\r
+#\r
+#  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = SecCoreNative\r
+  MODULE_UNI_FILE                = SecCore.uni\r
+  FILE_GUID                      = 43CA74CA-7D29-49A0-B3B9-20F84015B27D\r
+  MODULE_TYPE                    = SEC\r
+  VERSION_STRING                 = 1.0\r
+\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 EBC\r
+#\r
+\r
+[Sources]\r
+  SecMain.c\r
+  SecMain.h\r
+  FindPeiCore.c\r
+  SecBist.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  UefiCpuPkg/UefiCpuPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseMemoryLib\r
+  DebugLib\r
+  PlatformSecLib\r
+  PcdLib\r
+  DebugAgentLib\r
+  UefiCpuLib\r
+  PeCoffGetEntryPointLib\r
+  PeCoffExtraActionLib\r
+  CpuExceptionHandlerLib\r
+  ReportStatusCodeLib\r
+  PeiServicesLib\r
+  PeiServicesTablePointerLib\r
+  HobLib\r
+\r
+[Ppis]\r
+  ## SOMETIMES_CONSUMES\r
+  ## PRODUCES\r
+  gEfiSecPlatformInformationPpiGuid\r
+  ## SOMETIMES_CONSUMES\r
+  ## SOMETIMES_PRODUCES\r
+  gEfiSecPlatformInformation2PpiGuid\r
+  gEfiTemporaryRamDonePpiGuid                          ## PRODUCES\r
+  ## NOTIFY\r
+  ## SOMETIMES_CONSUMES\r
+  gPeiSecPerformancePpiGuid\r
+  gEfiPeiCoreFvLocationPpiGuid\r
+  ## CONSUMES\r
+  gRepublishSecPpiPpiGuid\r
+\r
+[Guids]\r
+  ## SOMETIMES_PRODUCES   ## HOB\r
+  gEfiFirmwarePerformanceGuid\r
+\r
+[Pcd]\r
+  gUefiCpuPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize  ## CONSUMES\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMigrateTemporaryRamFirmwareVolumes  ## CONSUMES\r
+\r
+[UserExtensions.TianoCore."ExtraFiles"]\r
+  SecCoreExtra.uni\r
index 699c91626bd87594caff2ac35b605cedc758f64d..870b45284087864df09a27687a8724ad92487bc0 100644 (file)
   UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf\r
   UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf\r
   UefiCpuPkg/SecCore/SecCore.inf\r
+  UefiCpuPkg/SecCore/SecCoreNative.inf\r
   UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf\r
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf\r
   UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {\r