]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/FspSecCore/SecMain.c
IntelFspPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFspPkg / FspSecCore / SecMain.c
index 971a3a1b82ac12f0945deb205b91f6fcfe473cba..2a27638f530c706854305a53c16c048238f9b1e0 100644 (file)
@@ -1,13 +1,7 @@
 /** @file\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -39,9 +33,11 @@ UINT64  mIdtEntryTemplate = 0xffff8e000008ffe4ULL;
 \r
 \r
   @param[in] SizeOfRam          Size of the temporary memory available for use.\r
-  @param[in] TempRamBase        Base address of tempory ram\r
+  @param[in] TempRamBase        Base address of temporary ram\r
   @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume.\r
-  @param[in] PeiCoreEntry       Pei Core entrypoint.\r
+  @param[in] PeiCore            PeiCore entry point.\r
+  @param[in] BootLoaderStack    BootLoader stack.\r
+  @param[in] ApiIdx             the index of API.\r
 \r
   @return This function never returns.\r
 \r
@@ -52,7 +48,9 @@ SecStartup (
   IN UINT32                   SizeOfRam,\r
   IN UINT32                   TempRamBase,\r
   IN VOID                    *BootFirmwareVolume,\r
-  IN UINTN                    PeiCoreEntry\r
+  IN PEI_CORE_ENTRY           PeiCore,\r
+  IN UINT32                   BootLoaderStack,\r
+  IN UINT32                   ApiIdx\r
   )\r
 {\r
   EFI_SEC_PEI_HAND_OFF        SecCoreData;\r
@@ -60,7 +58,6 @@ SecStartup (
   SEC_IDT_TABLE               IdtTableInStack;\r
   UINT32                      Index;\r
   FSP_GLOBAL_DATA             PeiFspData;\r
-  PEI_CORE_ENTRY              PeiCore;\r
   UINT64                      ExceptionHandler;\r
 \r
   //\r
@@ -101,9 +98,9 @@ SecStartup (
   AsmWriteIdtr (&IdtDescriptor);\r
 \r
   //\r
-  // Iniitalize the global FSP data region\r
+  // Initialize the global FSP data region\r
   //\r
-  FspGlobalDataInit (&PeiFspData, &BootFirmwareVolume);\r
+  FspGlobalDataInit (&PeiFspData, BootLoaderStack, (UINT8)ApiIdx);\r
 \r
   //\r
   // Update the base address and length of Pei temporary memory\r
@@ -120,8 +117,7 @@ SecStartup (
 \r
   //\r
   // Call PeiCore Entry\r
-  //\r
-  PeiCore = (PEI_CORE_ENTRY)(PeiCoreEntry);\r
+  //  \r
   PeiCore (&SecCoreData, mPeiSecPlatformInformationPpi);\r
 \r
   //\r
@@ -198,8 +194,8 @@ SecTemporaryRamSupport (
 \r
   //\r
   // SecSwitchStack function must be invoked after the memory migration\r
-  // immediatly, also we need fixup the stack change caused by new call into\r
-  // permenent memory.\r
+  // immediately, also we need fixup the stack change caused by new call into\r
+  // permanent memory.\r
   //\r
   SecSwitchStack (\r
     (UINT32) (UINTN) OldStack,\r