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