]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Module entry point library for PEI core.\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 | |
12 | /**\r | |
71871514 | 13 | The entry point of PE/COFF Image for the PEI Core.\r |
14 | \r | |
15 | This function is the entry point for the PEI Foundation, which allows the SEC phase\r | |
16 | to pass information about the stack, temporary RAM and the Boot Firmware Volume.\r | |
17 | In addition, it also allows the SEC phase to pass services and data forward for use\r | |
18 | during the PEI phase in the form of one or more PPIs.\r | |
19 | There is no limit to the number of additional PPIs that can be passed from SEC into\r | |
20 | the PEI Foundation. As part of its initialization phase, the PEI Foundation will add\r | |
21 | these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any\r | |
22 | modules can leverage the associated service calls and/or code in these early PPIs.\r | |
23 | This function is required to call ProcessModuleEntryPointList() with the Context\r | |
24 | parameter set to NULL. ProcessModuleEntryPoint() is never expected to return.\r | |
25 | The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as\r | |
26 | the PEI Services Table and the file handle for the PEI Core itself have been established.\r | |
27 | If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.\r | |
28 | \r | |
29 | @param SecCoreData Points to a data structure containing information about the PEI\r | |
30 | core's operating environment, such as the size and location of\r | |
9095d37b | 31 | temporary RAM, the stack location and the BFV location.\r |
71871514 | 32 | \r |
33 | @param PpiList Points to a list of one or more PPI descriptors to be installed\r | |
34 | initially by the PEI core. An empty PPI list consists of a single\r | |
35 | descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r | |
36 | As part of its initialization phase, the PEI Foundation will add\r | |
37 | these SEC-hosted PPIs to its PPI database such that both the PEI\r | |
38 | Foundation and any modules can leverage the associated service calls\r | |
39 | and/or code in these early PPIs.\r | |
fb3df220 | 40 | \r |
41 | **/\r | |
c7d265a9 | 42 | VOID\r |
9095d37b | 43 | EFIAPI\r |
c7d265a9 | 44 | _ModuleEntryPoint(\r |
fb3df220 | 45 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r |
46 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
2278f5f3 | 47 | );\r |
fb3df220 | 48 | \r |
49 | /**\r | |
6d728ea8 | 50 | Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r |
51 | \r | |
52 | This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.\r | |
fb3df220 | 53 | \r |
71871514 | 54 | @param SecCoreData Points to a data structure containing information about the PEI core's\r |
55 | operating environment, such as the size and location of temporary RAM,\r | |
9095d37b | 56 | the stack location and the BFV location.\r |
71871514 | 57 | \r |
58 | @param PpiList Points to a list of one or more PPI descriptors to be installed\r | |
59 | initially by the PEI core. An empty PPI list consists of a single\r | |
60 | descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r | |
61 | As part of its initialization phase, the PEI Foundation will add these\r | |
62 | SEC-hosted PPIs to its PPI database such that both the PEI Foundation\r | |
63 | and any modules can leverage the associated service calls and/or code\r | |
64 | in these early PPIs.\r | |
fb3df220 | 65 | \r |
66 | **/\r | |
c7d265a9 | 67 | VOID\r |
fb3df220 | 68 | EFIAPI\r |
69 | EfiMain (\r | |
70 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r | |
71 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
72 | );\r | |
73 | \r | |
74 | /**\r | |
6d728ea8 | 75 | Autogenerated function that calls the library constructors for all of the module's\r |
76 | dependent libraries.\r | |
77 | \r | |
71871514 | 78 | This function must be called by the PEI Core once an initial PEI Services Table has been established.\r |
79 | This function calls the set of library constructors for the set of library instances that a\r | |
80 | module depends on. This include library instances that a module depends on directly and library\r | |
9095d37b | 81 | instances that a module depends on indirectly through other libraries.\r |
71871514 | 82 | This function is autogenerated by build tools and those build tools are responsible for collecting\r |
1a2f870c | 83 | the set of library instances, determining which ones have constructors, and calling the library\r |
84 | constructors in the proper order based upon the dependencies of each of the library instances.\r | |
71871514 | 85 | The PEI Core must call this function with a NULL FileHandle value as soon as the initial PEI\r |
86 | Services Table has been established.\r | |
fb3df220 | 87 | \r |
f6d2bcc6 | 88 | @param FileHandle Handle of the file being invoked.\r |
71871514 | 89 | @param PeiServices Describes the list of possible PEI Services.\r |
fb3df220 | 90 | \r |
91 | **/\r | |
92 | VOID\r | |
93 | EFIAPI\r | |
94 | ProcessLibraryConstructorList (\r | |
0308e20d | 95 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
96 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
fb3df220 | 97 | );\r |
98 | \r | |
99 | \r | |
100 | /**\r | |
6d728ea8 | 101 | Autogenerated function that calls a set of module entry points.\r |
102 | \r | |
103 | This function must be called by _ModuleEntryPoint().\r | |
9095d37b | 104 | This function calls the set of module entry points.\r |
71871514 | 105 | This function is autogenerated by build tools and those build tools are responsible\r |
106 | for collecting the module entry points and calling them in a specified order.\r | |
107 | \r | |
108 | @param SecCoreData Points to a data structure containing information about the PEI\r | |
109 | core's operating environment, such as the size and location of\r | |
9095d37b | 110 | temporary RAM, the stack location and the BFV location.\r |
71871514 | 111 | \r |
112 | @param PpiList Points to a list of one or more PPI descriptors to be installed\r | |
113 | initially by the PEI core. An empty PPI list consists of a single\r | |
114 | descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r | |
115 | As part of its initialization phase, the PEI Foundation will add\r | |
116 | these SEC-hosted PPIs to its PPI database such that both the PEI\r | |
117 | Foundation and any modules can leverage the associated service calls\r | |
9095d37b | 118 | and/or code in these early PPIs.\r |
34860f7a | 119 | @param Context A pointer to a private context structure defined by the PEI Core\r |
120 | implementation. The implementation of _ModuleEntryPoint() must set\r | |
121 | this parameter is NULL to indicate that this is the first PEI phase.\r | |
fb3df220 | 122 | \r |
fb3df220 | 123 | **/\r |
c7d265a9 | 124 | VOID\r |
fb3df220 | 125 | EFIAPI\r |
126 | ProcessModuleEntryPointList (\r | |
127 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r | |
128 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r | |
34860f7a | 129 | IN VOID *Context\r |
fb3df220 | 130 | );\r |
131 | \r | |
132 | #endif\r |