]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
MdeModulePkg PeiCore: Correct the comments of PeiResetSystem2
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index 9656f07186670cc50e5604411cc354fa6209e555..8b58916e65b37dd76d6b276fcb3461c2ebeff2a4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definition of Pei Core Structures and Services\r
   \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, 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
@@ -20,6 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Ppi/MemoryDiscovered.h>\r
 #include <Ppi/StatusCode.h>\r
 #include <Ppi/Reset.h>\r
+#include <Ppi/Reset2.h>\r
 #include <Ppi/FirmwareVolume.h>\r
 #include <Ppi/FirmwareVolumeInfo.h>\r
 #include <Ppi/FirmwareVolumeInfo2.h>\r
@@ -89,9 +90,9 @@ typedef struct {
   /// \r
   INTN                    LastDispatchedNotify;\r
   ///\r
-  /// Ppi database.\r
+  /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries.\r
   ///\r
-  PEI_PPI_LIST_POINTERS   PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];\r
+  PEI_PPI_LIST_POINTERS   *PpiListPtrs;\r
 } PEI_PPI_DATABASE;\r
 \r
 \r
@@ -109,8 +110,14 @@ typedef struct {
   EFI_FIRMWARE_VOLUME_HEADER          *FvHeader;\r
   EFI_PEI_FIRMWARE_VOLUME_PPI         *FvPpi;\r
   EFI_PEI_FV_HANDLE                   FvHandle;\r
-  UINT8                               PeimState[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
-  EFI_PEI_FILE_HANDLE                 FvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
+  //\r
+  // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries.\r
+  //\r
+  UINT8                               *PeimState;\r
+  //\r
+  // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries.\r
+  //\r
+  EFI_PEI_FILE_HANDLE                 *FvFileHandles;\r
   BOOLEAN                             ScanFv;\r
   UINT32                              AuthenticationStatus;\r
 } PEI_CORE_FV_HANDLE;\r
@@ -188,13 +195,22 @@ struct _PEI_CORE_INSTANCE {
   UINTN                              FvCount;\r
   \r
   ///\r
-  /// The instance arrary for FVs which contains FFS and could be dispatched by PeiCore.\r
+  /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.\r
+  /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore.\r
+  ///\r
+  PEI_CORE_FV_HANDLE                 *Fv;\r
+\r
+  ///\r
+  /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.\r
+  /// Each entry is for one FV which could not be dispatched by PeiCore.\r
   ///\r
-  PEI_CORE_FV_HANDLE                 Fv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
-  PEI_CORE_UNKNOW_FORMAT_FV_INFO     UnknownFvInfo[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
+  PEI_CORE_UNKNOW_FORMAT_FV_INFO     *UnknownFvInfo;\r
   UINTN                              UnknownFvInfoCount;\r
   \r
-  EFI_PEI_FILE_HANDLE                CurrentFvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
+  ///\r
+  /// Pointer to the buffer with the PcdPeiCoreMaxPeimPerFv number of entries.\r
+  ///\r
+  EFI_PEI_FILE_HANDLE                *CurrentFvFileHandles;\r
   UINTN                              AprioriCount;\r
   UINTN                              CurrentPeimFvCount;\r
   UINTN                              CurrentPeimCount;\r
@@ -234,6 +250,16 @@ struct _PEI_CORE_INSTANCE {
   // This field points to the shadowed image read function\r
   //\r
   PE_COFF_LOADER_READ_FILE          ShadowedImageRead;\r
+\r
+  //\r
+  // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv + 1 number of entries.\r
+  //\r
+  EFI_PEI_FILE_HANDLE               *FileHandles;\r
+  //\r
+  // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv number of entries.\r
+  //\r
+  EFI_GUID                          *FileGuid;\r
+\r
   //\r
   // Temp Memory Range is not covered by PeiTempMem and Stack.\r
   // Those Memory Range will be migrated into phisical memory. \r
@@ -938,6 +964,30 @@ PeiResetSystem (
   IN CONST EFI_PEI_SERVICES   **PeiServices\r
   );\r
 \r
+/**\r
+  Resets the entire platform.\r
+\r
+  @param[in] ResetType      The type of reset to perform.\r
+  @param[in] ResetStatus    The status code for the reset.\r
+  @param[in] DataSize       The size, in bytes, of ResetData.\r
+  @param[in] ResetData      For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
+                            the data buffer starts with a Null-terminated string, optionally\r
+                            followed by additional binary data. The string is a description\r
+                            that the caller may use to further indicate the reason for the\r
+                            system reset. ResetData is only valid if ResetStatus is something\r
+                            other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific\r
+                            where a minimum amount of ResetData is always required.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiResetSystem2 (\r
+  IN EFI_RESET_TYPE     ResetType,\r
+  IN EFI_STATUS         ResetStatus,\r
+  IN UINTN              DataSize,\r
+  IN VOID               *ResetData OPTIONAL\r
+  );\r
+\r
 /**\r
 \r
   Initialize PeiCore Fv List.\r
@@ -1069,7 +1119,7 @@ PeiRegisterForShadow (
   @param OldCoreData     Pointer to Old PeiCore's private data.\r
                          If NULL, PeiCore is entered at first time, stack/heap in temporary memory.\r
                          If not NULL, PeiCore is entered at second time, stack/heap has been moved\r
-                         to permenent memory.\r
+                         to permanent memory.\r
 \r
 **/\r
 VOID\r
@@ -1682,7 +1732,7 @@ extern EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi;
 /**\r
   After PeiCore image is shadowed into permanent memory, all build-in FvPpi should\r
   be re-installed with the instance in permanent memory and all cached FvPpi pointers in \r
-  PrivateData->Fv[] array should be fixed up to be pointed to the one in permenant\r
+  PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent\r
   memory.\r
   \r
   @param PrivateData   Pointer to PEI_CORE_INSTANCE.\r