]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / PeimEntryPoint / PeimEntryPoint.c
index f80d4c2c88cebad09df7d39ca196e28dbb5dd11c..57ae73c07b3998283d95ab8d99edf31ac58766ae 100644 (file)
@@ -1,9 +1,8 @@
-\r
 /** @file\r
   Entry point to a PEIM.\r
 \r
-Copyright (c) 2006, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2008, 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
@@ -13,25 +12,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+\r
+#include <PiPei.h>\r
+\r
+\r
+#include <Library/PeimEntryPoint.h>\r
+#include <Library/DebugLib.h>\r
 \r
 /**\r
-  Image entry point of Peim.\r
+  The entry point of PE/COFF Image for a PEIM.\r
 \r
-  @param  FfsHeader   Pointer to FFS header the loaded driver.\r
-  @param  PeiServices Pointer to the PEI services.\r
+  This function is the entry point for a PEIM.  This function must call ProcessLibraryConstructorList() \r
+  and ProcessModuleEntryPointList().  The return value from ProcessModuleEntryPointList() is returned.\r
+  If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().\r
 \r
-  @return  Status returned by entry points of Peims.\r
+  @param  FileHandle  Handle of the file being invoked. \r
+  @param  PeiServices Describes the list of possible PEI Services.\r
 \r
+  @retval  EFI_SUCCESS   The PEIM executed normally.\r
+  @retval  !EFI_SUCCESS  The PEIM failed to execute normally.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 _ModuleEntryPoint (\r
-  IN EFI_FFS_FILE_HEADER       *FfsHeader,\r
-  IN EFI_PEI_SERVICES          **PeiServices\r
+  IN EFI_PEI_FILE_HANDLE       FileHandle,\r
+  IN CONST EFI_PEI_SERVICES    **PeiServices\r
   )\r
 {\r
   if (_gPeimRevision != 0) {\r
@@ -44,30 +49,33 @@ _ModuleEntryPoint (
   //\r
   // Call constructor for all libraries\r
   //\r
-  ProcessLibraryConstructorList (FfsHeader, PeiServices);\r
+  ProcessLibraryConstructorList (FileHandle, PeiServices);\r
 \r
   //\r
   // Call the driver entry point\r
   //\r
-  return ProcessModuleEntryPointList (FfsHeader, PeiServices);\r
+  return ProcessModuleEntryPointList (FileHandle, PeiServices);\r
 }\r
 \r
 \r
 /**\r
-  Wrapper of Peim image entry point.\r
+  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
+  \r
+  This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.\r
 \r
-  @param  FfsHeader   Pointer to FFS header the loaded driver.\r
-  @param  PeiServices Pointer to the PEI services.\r
+  @param  FileHandle  Handle of the file being invoked. \r
+  @param  PeiServices Describes the list of possible PEI Services.\r
 \r
-  @return  Status returned by entry points of Peims.\r
+  @retval EFI_SUCCESS  The PEIM executed normally.\r
+  @retval !EFI_SUCCESS The PEIM failed to execute normally.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 EfiMain (\r
-  IN EFI_FFS_FILE_HEADER  *FfsHeader,\r
-  IN EFI_PEI_SERVICES     **PeiServices\r
+  IN EFI_PEI_FILE_HANDLE       FileHandle,\r
+  IN CONST EFI_PEI_SERVICES    **PeiServices\r
   )\r
 {\r
-  return _ModuleEntryPoint (FfsHeader, PeiServices);\r
+  return _ModuleEntryPoint (FileHandle, PeiServices);\r
 }\r