4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include <Library/PeimEntryPoint.h>
14 #include <Library/DebugLib.h>
17 The entry point of PE/COFF Image for a PEIM.
19 This function is the entry point for a PEIM. This function must call ProcessLibraryConstructorList()
20 and ProcessModuleEntryPointList(). The return value from ProcessModuleEntryPointList() is returned.
21 If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().
23 @param FileHandle Handle of the file being invoked.
24 @param PeiServices Describes the list of possible PEI Services.
26 @retval EFI_SUCCESS The PEIM executed normally.
27 @retval !EFI_SUCCESS The PEIM failed to execute normally.
32 IN EFI_PEI_FILE_HANDLE FileHandle
,
33 IN CONST EFI_PEI_SERVICES
**PeiServices
36 if (_gPeimRevision
!= 0) {
38 // Make sure that the PEI spec revision of the platform is >= PEI spec revision of the driver
40 ASSERT ((*PeiServices
)->Hdr
.Revision
>= _gPeimRevision
);
44 // Call constructor for all libraries
46 ProcessLibraryConstructorList (FileHandle
, PeiServices
);
49 // Call the driver entry point
51 return ProcessModuleEntryPointList (FileHandle
, PeiServices
);
56 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
58 This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.
60 @param FileHandle Handle of the file being invoked.
61 @param PeiServices Describes the list of possible PEI Services.
63 @retval EFI_SUCCESS The PEIM executed normally.
64 @retval !EFI_SUCCESS The PEIM failed to execute normally.
70 IN EFI_PEI_FILE_HANDLE FileHandle
,
71 IN CONST EFI_PEI_SERVICES
**PeiServices
74 return _ModuleEntryPoint (FileHandle
, PeiServices
);