4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include <Library/PeimEntryPoint.h>
20 #include <Library/DebugLib.h>
23 The entry point of PE/COFF Image for a PEIM.
25 This function is the entry point for a PEIM. This function must call ProcessLibraryConstructorList()
26 and ProcessModuleEntryPointList(). The return value from ProcessModuleEntryPointList() is returned.
27 If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().
29 @param FileHandle Handle of the file being invoked.
30 @param PeiServices Describes the list of possible PEI Services.
32 @retval EFI_SUCCESS The PEIM executed normally.
33 @retval !EFI_SUCCESS The PEIM failed to execute normally.
38 IN EFI_PEI_FILE_HANDLE FileHandle
,
39 IN CONST EFI_PEI_SERVICES
**PeiServices
42 if (_gPeimRevision
!= 0) {
44 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
46 ASSERT ((*PeiServices
)->Hdr
.Revision
>= _gPeimRevision
);
50 // Call constructor for all libraries
52 ProcessLibraryConstructorList (FileHandle
, PeiServices
);
55 // Call the driver entry point
57 return ProcessModuleEntryPointList (FileHandle
, PeiServices
);
62 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
64 This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.
66 @param FileHandle Handle of the file being invoked.
67 @param PeiServices Describes the list of possible PEI Services.
69 @retval EFI_SUCCESS The PEIM executed normally.
70 @retval !EFI_SUCCESS The PEIM failed to execute normally.
76 IN EFI_PEI_FILE_HANDLE FileHandle
,
77 IN CONST EFI_PEI_SERVICES
**PeiServices
80 return _ModuleEntryPoint (FileHandle
, PeiServices
);