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