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