]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PeiCoreEntryPoint.h
Code have been checked with spec
[mirror_edk2.git] / MdePkg / Include / Library / PeiCoreEntryPoint.h
index 9c0acd01095edc2c35362f54c4568cb3c56d95aa..1eb974c9d34f75df0db93b9606934e5670e314d6 100644 (file)
@@ -16,27 +16,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define __MODULE_ENTRY_POINT_H__\r
 \r
 /**\r
-\r
-  Enrty point to PEI core.\r
-\r
-  @param SecCoreData    Points to a data structure containing\r
-                        information about the PEI core's\r
-                        operating environment, such as the size\r
-                        and location of temporary RAM, the stack\r
-                        location and the BFV location. The type\r
-                        EFI_SEC_PEI_HAND_OFF is\r
-\r
-  @param PpiList        Points to a list of one or more PPI\r
-                        descriptors to be installed initially by\r
-                        the PEI core. An empty PPI list consists\r
-                        of a single descriptor with the end-tag\r
-                        EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
-                        As part of its initialization phase, the\r
-                        PEI Foundation will add these SEC-hosted\r
-                        PPIs to its PPI database such that both\r
-                        the PEI Foundation and any modules can\r
-                        leverage the associated service calls\r
-                        and/or code in these early PPIs.\r
+  The entry point of PE/COFF Image for the PEI Core.\r
+\r
+  This function is the entry point for the PEI Foundation, which allows the SEC phase\r
+  to pass information about the stack, temporary RAM and the Boot Firmware Volume.\r
+  In addition, it also allows the SEC phase to pass services and data forward for use\r
+  during the PEI phase in the form of one or more PPIs.\r
+  There is no limit to the number of additional PPIs that can be passed from SEC into\r
+  the PEI Foundation. As part of its initialization phase, the PEI Foundation will add\r
+  these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any\r
+  modules can leverage the associated service calls and/or code in these early PPIs.\r
+  This function is required to call ProcessModuleEntryPointList() with the Context\r
+  parameter set to NULL.  ProcessModuleEntryPoint() is never expected to return.\r
+  The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as\r
+  the PEI Services Table and the file handle for the PEI Core itself have been established.\r
+  If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.\r
+\r
+  @param SecCoreData  Points to a data structure containing information about the PEI\r
+                      core's operating environment, such as the size and location of\r
+                      temporary RAM, the stack location and the BFV location. \r
+\r
+  @param PpiList      Points to a list of one or more PPI descriptors to be installed\r
+                      initially by the PEI core. An empty PPI list consists of a single\r
+                      descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
+                      As part of its initialization phase, the PEI Foundation will add\r
+                      these SEC-hosted PPIs to its PPI database such that both the PEI\r
+                      Foundation and any modules can leverage the associated service calls\r
+                      and/or code in these early PPIs.\r
 \r
 **/\r
 VOID\r
@@ -47,28 +53,21 @@ _ModuleEntryPoint(
   );\r
 \r
 /**\r
-  Wrapper of enrty point to PEI core.\r
-\r
-  @param SecCoreData    Points to a data structure containing\r
-                        information about the PEI core's\r
-                        operating environment, such as the size\r
-                        and location of temporary RAM, the stack\r
-                        location and the BFV location. The type\r
-                        EFI_SEC_PEI_HAND_OFF is\r
-\r
-  @param PpiList        Points to a list of one or more PPI\r
-                        descriptors to be installed initially by\r
-                        the PEI core. An empty PPI list consists\r
-                        of a single descriptor with the end-tag\r
-                        EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
-                        As part of its initialization phase, the\r
-                        PEI Foundation will add these SEC-hosted\r
-                        PPIs to its PPI database such that both\r
-                        the PEI Foundation and any modules can\r
-                        leverage the associated service calls\r
-                        and/or code in these early PPIs.\r
\r
-  @return Status returned by entry points of core and drivers. \r
+  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
+\r
+  This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.\r
+\r
+  @param SecCoreData  Points to a data structure containing information about the PEI core's\r
+                      operating environment, such as the size and location of temporary RAM,\r
+                      the stack location and the BFV location. \r
+\r
+  @param PpiList      Points to a list of one or more PPI descriptors to be installed\r
+                      initially by the PEI core.  An empty PPI list consists of a single\r
+                      descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
+                      As part of its initialization phase, the PEI Foundation will add these\r
+                      SEC-hosted PPIs to its PPI database such that both the PEI Foundation\r
+                      and any modules can leverage the associated service calls and/or code\r
+                      in these early PPIs.\r
 \r
 **/\r
 VOID\r
@@ -79,11 +78,21 @@ EfiMain (
   );\r
 \r
 /**\r
-  Call constructs for all libraries. Automatics Generated by tool.\r
-\r
-  @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
-  @param  PeiServices Pointer to the PEI Services Table.\r
+  Autogenerated function that calls the library constructors for all of the module's\r
+  dependent libraries.\r
+\r
+  This function must be called by the PEI Core once an initial PEI Services Table has been established.\r
+  This function calls the set of library constructors for the set of library instances that a\r
+  module depends on.  This include library instances that a module depends on directly and library\r
+  instances that a module depends on indirectly through other libraries.  \r
+  This function is autogenerated by build tools and those build tools are responsible for collecting\r
+  the set of library instances, determine which ones have constructors, and calling the library\r
+  constructors in the proper order based upon each of the library instances own dependencies.\r
+  The PEI Core must call this function with a NULL FileHandle value as soon as the initial PEI\r
+  Services Table has been established.\r
+\r
+  @param  FileHandle   Handle of the file being invoked.\r
+  @param  PeiServices  Describes the list of possible PEI Services.\r
 \r
 **/\r
 VOID\r
@@ -95,27 +104,27 @@ ProcessLibraryConstructorList (
 \r
 \r
 /**\r
-  Call the list of driver entry points. Automatics Generated by tool.\r
-\r
-  @param SecCoreData    Points to a data structure containing\r
-                        information about the PEI core's\r
-                        operating environment, such as the size\r
-                        and location of temporary RAM, the stack\r
-                        location and the BFV location. The type\r
-                        EFI_SEC_PEI_HAND_OFF is\r
-\r
-  @param PpiList        Points to a list of one or more PPI\r
-                        descriptors to be installed initially by\r
-                        the PEI core. An empty PPI list consists\r
-                        of a single descriptor with the end-tag\r
-                        EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
-                        As part of its initialization phase, the\r
-                        PEI Foundation will add these SEC-hosted\r
-                        PPIs to its PPI database such that both\r
-                        the PEI Foundation and any modules can\r
-                        leverage the associated service calls\r
-                        and/or code in these early PPIs.\r
-  @param  OldCoreData   Pointer to Original startup information.\r
+  Autogenerated function that calls a set of module entry points.\r
+\r
+  This function must be called by _ModuleEntryPoint().\r
+  This function calls the set of module entry points.  \r
+  This function is autogenerated by build tools and those build tools are responsible\r
+  for collecting the module entry points and calling them in a specified order.\r
+\r
+  @param SecCoreData    Points to a data structure containing information about the PEI\r
+                        core's operating environment, such as the size and location of\r
+                        temporary RAM, the stack location and the BFV location. \r
+\r
+  @param PpiList        Points to a list of one or more PPI descriptors to be installed\r
+                        initially by the PEI core. An empty PPI list consists of a single\r
+                        descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
+                        As part of its initialization phase, the PEI Foundation will add\r
+                        these SEC-hosted PPIs to its PPI database such that both the PEI\r
+                        Foundation and any modules can leverage the associated service calls\r
+                        and/or code in these early PPIs. \r
+  @param  Context       A pointer to a private context structure defined by the PEI Core\r
+                        implementation. The implementation of _ModuleEntryPoint() must set\r
+                        this parameter is NULL to indicate that this is the first PEI phase.\r
 \r
 **/\r
 VOID\r
@@ -123,7 +132,7 @@ EFIAPI
 ProcessModuleEntryPointList (\r
   IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData,\r
   IN CONST  EFI_PEI_PPI_DESCRIPTOR  *PpiList,\r
-  IN VOID                           *OldCoreData\r
+  IN VOID                           *Context\r
   );\r
 \r
 #endif\r