]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/FspSecCore/SecMain.c
MdeModulePkg/PciSioSerial: Fix bad EOL
[mirror_edk2.git] / IntelFspPkg / FspSecCore / SecMain.c
index 22706c8a8bc5493b13237be2499fe7f8eb5126f0..e1d9cb2d226af7d272ae4eb9278d9768c7c97c9e 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2015, 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
@@ -39,8 +39,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] 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
@@ -50,7 +53,10 @@ EFIAPI
 SecStartup (\r
   IN UINT32                   SizeOfRam,\r
   IN UINT32                   TempRamBase,\r
-  IN VOID                    *BootFirmwareVolume\r
+  IN VOID                    *BootFirmwareVolume,\r
+  IN PEI_CORE_ENTRY           PeiCore,\r
+  IN UINT32                   BootLoaderStack,\r
+  IN UINT32                   ApiIdx\r
   )\r
 {\r
   EFI_SEC_PEI_HAND_OFF        SecCoreData;\r
@@ -58,7 +64,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
@@ -99,9 +104,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
@@ -118,8 +123,7 @@ SecStartup (
 \r
   //\r
   // Call PeiCore Entry\r
-  //\r
-  PeiCore = (PEI_CORE_ENTRY)(*(UINTN *)((&BootFirmwareVolume) + 1));\r
+  //  \r
   PeiCore (&SecCoreData, mPeiSecPlatformInformationPpi);\r
 \r
   //\r
@@ -196,8 +200,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