]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/PeimEntryPoint.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Library / PeimEntryPoint.h
1 /** @file
2 Module entry point library for PEIM.
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __MODULE_ENTRY_POINT_H__
10 #define __MODULE_ENTRY_POINT_H__
11
12 ///
13 /// Declare the EFI/UEFI Specification Revision to which this driver is implemented
14 ///
15 extern CONST UINT32 _gPeimRevision;
16
17
18 /**
19 The entry point of PE/COFF Image for a PEIM.
20
21 This function is the entry point for a PEIM. This function must call ProcessLibraryConstructorList()
22 and ProcessModuleEntryPointList(). The return value from ProcessModuleEntryPointList() is returned.
23 If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().
24
25 @param FileHandle Handle of the file being invoked.
26 @param PeiServices Describes the list of possible PEI Services.
27
28 @retval EFI_SUCCESS The PEIM executed normally.
29 @retval !EFI_SUCCESS The PEIM failed to execute normally.
30 **/
31 EFI_STATUS
32 EFIAPI
33 _ModuleEntryPoint (
34 IN EFI_PEI_FILE_HANDLE FileHandle,
35 IN CONST EFI_PEI_SERVICES **PeiServices
36 );
37
38
39 /**
40 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
41
42 This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.
43
44 @param FileHandle Handle of the file being invoked.
45 @param PeiServices Describes the list of possible PEI Services.
46
47 @retval EFI_SUCCESS The PEIM executed normally.
48 @retval !EFI_SUCCESS The PEIM failed to execute normally.
49
50 **/
51 EFI_STATUS
52 EFIAPI
53 EfiMain (
54 IN EFI_PEI_FILE_HANDLE FileHandle,
55 IN CONST EFI_PEI_SERVICES **PeiServices
56 );
57
58 /**
59 Autogenerated function that calls the library constructors for all of the module's
60 dependent libraries.
61
62 This function must be called by _ModuleEntryPoint().
63 This function calls the set of library constructors for the set of library instances that a
64 module depends on. This includes library instances that a module depends on directly and library
65 instances that a module depends on indirectly through other libraries.
66 This function is autogenerated by build tools and those build tools are responsible for collecting
67 the set of library instances, determine which ones have constructors, and calling the library
68 constructors in the proper order based upon each of the library instances own dependencies.
69
70 @param FileHandle Handle of the file being invoked.
71 @param PeiServices Describes the list of possible PEI Services.
72
73 **/
74 VOID
75 EFIAPI
76 ProcessLibraryConstructorList (
77 IN EFI_PEI_FILE_HANDLE FileHandle,
78 IN CONST EFI_PEI_SERVICES **PeiServices
79 );
80
81 /**
82 Autogenerated function that calls a set of module entry points.
83
84 This function must be called by _ModuleEntryPoint().
85 This function calls the set of module entry points.
86 This function is autogenerated by build tools and those build tools are responsible
87 for collecting the module entry points and calling them in a specified order.
88
89 @param FileHandle Handle of the file being invoked.
90 @param PeiServices Describes the list of possible PEI Services.
91
92 @retval EFI_SUCCESS The PEIM executed normally.
93 @retval !EFI_SUCCESS The PEIM failed to execute normally.
94
95 **/
96 EFI_STATUS
97 EFIAPI
98 ProcessModuleEntryPointList (
99 IN EFI_PEI_FILE_HANDLE FileHandle,
100 IN CONST EFI_PEI_SERVICES **PeiServices
101 );
102
103 #endif