]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Module entry point library for PEIM.\r |
fb3df220 | 3 | \r |
9095d37b | 4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
fb3df220 | 6 | \r |
7 | **/\r | |
8 | \r | |
9 | #ifndef __MODULE_ENTRY_POINT_H__\r | |
10 | #define __MODULE_ENTRY_POINT_H__\r | |
11 | \r | |
fc30687f | 12 | ///\r |
9095d37b | 13 | /// Declare the EFI/UEFI Specification Revision to which this driver is implemented\r |
fc30687f | 14 | ///\r |
0308e20d | 15 | extern CONST UINT32 _gPeimRevision;\r |
16 | \r | |
fb3df220 | 17 | \r |
18 | /**\r | |
f6d2bcc6 LG |
19 | The entry point of PE/COFF Image for a PEIM.\r |
20 | \r | |
9095d37b | 21 | This function is the entry point for a PEIM. This function must call ProcessLibraryConstructorList()\r |
f6d2bcc6 LG |
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 | |
fb3df220 | 24 | \r |
9095d37b | 25 | @param FileHandle Handle of the file being invoked.\r |
63766b6d | 26 | @param PeiServices Describes the list of possible PEI Services.\r |
fb3df220 | 27 | \r |
6a0e332d | 28 | @retval EFI_SUCCESS The PEIM executed normally.\r |
29 | @retval !EFI_SUCCESS The PEIM failed to execute normally.\r | |
fb3df220 | 30 | **/\r |
31 | EFI_STATUS\r | |
32 | EFIAPI\r | |
33 | _ModuleEntryPoint (\r | |
0308e20d | 34 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
35 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
fb3df220 | 36 | );\r |
37 | \r | |
38 | \r | |
39 | /**\r | |
6a0e332d | 40 | Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r |
9095d37b | 41 | \r |
f6d2bcc6 | 42 | This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.\r |
fb3df220 | 43 | \r |
9095d37b | 44 | @param FileHandle Handle of the file being invoked.\r |
63766b6d | 45 | @param PeiServices Describes the list of possible PEI Services.\r |
fb3df220 | 46 | \r |
6a0e332d | 47 | @retval EFI_SUCCESS The PEIM executed normally.\r |
48 | @retval !EFI_SUCCESS The PEIM failed to execute normally.\r | |
fb3df220 | 49 | \r |
50 | **/\r | |
51 | EFI_STATUS\r | |
52 | EFIAPI\r | |
53 | EfiMain (\r | |
0308e20d | 54 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
55 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
fb3df220 | 56 | );\r |
57 | \r | |
fb3df220 | 58 | /**\r |
f6d2bcc6 LG |
59 | Autogenerated function that calls the library constructors for all of the module's\r |
60 | dependent libraries.\r | |
fb3df220 | 61 | \r |
34860f7a | 62 | This function must be called by _ModuleEntryPoint().\r |
f6d2bcc6 | 63 | This function calls the set of library constructors for the set of library instances that a\r |
34860f7a | 64 | module depends on. This includes library instances that a module depends on directly and library\r |
9095d37b | 65 | instances that a module depends on indirectly through other libraries.\r |
f6d2bcc6 LG |
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 | |
fb3df220 | 72 | \r |
73 | **/\r | |
74 | VOID\r | |
75 | EFIAPI\r | |
76 | ProcessLibraryConstructorList (\r | |
0308e20d | 77 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
78 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
fb3df220 | 79 | );\r |
80 | \r | |
fb3df220 | 81 | /**\r |
f6d2bcc6 | 82 | Autogenerated function that calls a set of module entry points.\r |
fb3df220 | 83 | \r |
f6d2bcc6 | 84 | This function must be called by _ModuleEntryPoint().\r |
9095d37b | 85 | This function calls the set of module entry points.\r |
f6d2bcc6 LG |
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 | |
fb3df220 | 88 | \r |
9095d37b | 89 | @param FileHandle Handle of the file being invoked.\r |
63766b6d | 90 | @param PeiServices Describes the list of possible PEI Services.\r |
fb3df220 | 91 | \r |
6a0e332d | 92 | @retval EFI_SUCCESS The PEIM executed normally.\r |
93 | @retval !EFI_SUCCESS The PEIM failed to execute normally.\r | |
9095d37b | 94 | \r |
fb3df220 | 95 | **/\r |
96 | EFI_STATUS\r | |
97 | EFIAPI\r | |
98 | ProcessModuleEntryPointList (\r | |
0308e20d | 99 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
100 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
fb3df220 | 101 | );\r |
102 | \r | |
103 | #endif\r |