]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/UefiDriverEntryPoint.h
retried GetGraphicsBitMapFromFV()and GetGraphicsBitMapFromFVEx(), instead using GetSe...
[mirror_edk2.git] / MdePkg / Include / Library / UefiDriverEntryPoint.h
CommitLineData
fb3df220 1/** @file\r
50a64e5b 2 Module entry point library for UEFI drivers, DXE Drivers, DXE Runtime Drivers,\r
3 and DXE SMM Drivers.\r
fb3df220 4\r
50a64e5b 5Copyright (c) 2006 - 2008, Intel Corporation\r
fb3df220 6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __MODULE_ENTRY_POINT_H__\r
17#define __MODULE_ENTRY_POINT_H__\r
18\r
fc30687f 19///\r
20/// Declare the EFI/UEFI Specification Revision to which this driver is implemented \r
21///\r
0308e20d 22extern CONST UINT32 _gUefiDriverRevision;\r
fb3df220 23\r
fc30687f 24///\r
25/// Declare the number of unload handler in the image. \r
26///\r
0308e20d 27extern CONST UINT8 _gDriverUnloadImageCount;\r
fb3df220 28\r
fb3df220 29\r
30/**\r
822ce226 31 Enrty point to DXE Driver.\r
fb3df220 32\r
86c4360b 33 This function is the entry point for a DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
34 or UEFI Driver. This function must call ProcessLibraryConstructorList() and\r
35 ProcessModuleEntryPointList(). If the return status from ProcessModuleEntryPointList()\r
36 is an error status, then ProcessLibraryDestructorList() must be called. The return\r
37 value from ProcessModuleEntryPointList() is returned. If _gDriverUnloadImageCount is\r
38 greater than zero, then an unload handler must be registered for this image and the\r
39 unload handler must invoke ProcessModuleUnloadList(). If _gUefiDriverRevision is not\r
40 zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison, then return\r
41 EFI_INCOMPATIBLE_VERSION.\r
42\r
43 @param ImageHandle ImageHandle of the loaded driver.\r
44 @param SystemTable Pointer to the EFI System Table.\r
45\r
46 @retval EFI_SUCCESS One or more of the drivers returned a success code.\r
47 @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
48 @retval Other Return value from ProcessModuleEntryPointList().\r
fb3df220 49\r
50**/\r
51EFI_STATUS\r
52EFIAPI\r
53_ModuleEntryPoint (\r
54 IN EFI_HANDLE ImageHandle,\r
55 IN EFI_SYSTEM_TABLE *SystemTable\r
56 );\r
57\r
58\r
59/**\r
86c4360b 60 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
61\r
62 This function is required to call _ModuleEntryPoint() passing in ImageHandle, and SystemTable.\r
fb3df220 63\r
64 @param ImageHandle ImageHandle of the loaded driver.\r
65 @param SystemTable Pointer to the EFI System Table.\r
66\r
86c4360b 67 @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
68 or UEFI Driver exited normally.\r
69 @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r
70 @retval Other Return value from ProcessModuleEntryPointList().\r
fb3df220 71**/\r
72EFI_STATUS\r
73EFIAPI\r
74EfiMain (\r
75 IN EFI_HANDLE ImageHandle,\r
76 IN EFI_SYSTEM_TABLE *SystemTable\r
77 );\r
78\r
79\r
80/**\r
86c4360b 81 Invokes the library destructors fror all dependent libraries and terminates the\r
82 DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. \r
83\r
84 This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
85 with a status specified by Status.\r
fb3df220 86\r
87 @param Status Status returned by the driver that is exiting.\r
88\r
89**/\r
90VOID\r
91EFIAPI\r
92ExitDriver (\r
93 IN EFI_STATUS Status\r
94 );\r
95\r
96\r
97/**\r
86c4360b 98 Autogenerated function that calls the library constructors for all of the module's\r
99 dependent libraries.\r
100\r
101 This function must be called by _ModuleEntryPoint().\r
102 This function calls the set of library constructors for the set of library instances\r
103 that a module depends on. This includes library instances that a module depends on\r
104 directly and library instances that a module depends on indirectly through other libraries. \r
105 This function is autogenerated by build tools and those build tools are responsible\r
106 for collecting the set of library instances, determine which ones have constructors,\r
107 and calling the library constructors in the proper order based upon each of the library\r
108 instances own dependencies.\r
fb3df220 109\r
110 @param ImageHandle ImageHandle of the loaded driver.\r
111 @param SystemTable Pointer to the EFI System Table.\r
112\r
113**/\r
114VOID\r
115EFIAPI\r
116ProcessLibraryConstructorList (\r
117 IN EFI_HANDLE ImageHandle,\r
118 IN EFI_SYSTEM_TABLE *SystemTable\r
119 );\r
120\r
121\r
122/**\r
86c4360b 123 Autogenerated function that calls the library descructors for all of the module's dependent libraries.\r
124\r
125 This function may be called by _ModuleEntryPoint() or ExitDriver().\r
126 This function calls the set of library destructors for the set of library instances\r
127 that a module depends on. This includes library instances that a module depends on\r
128 directly and library instances that a module depends on indirectly through other libraries. \r
129 This function is autogenerated by build tools and those build tools are responsible for\r
130 collecting the set of library instances, determine which ones have destructors, and calling\r
131 the library destructors in the proper order based upon each of the library instances own dependencies.\r
fb3df220 132\r
133 @param ImageHandle ImageHandle of the loaded driver.\r
134 @param SystemTable Pointer to the EFI System Table.\r
135\r
136**/\r
137VOID\r
138EFIAPI\r
139ProcessLibraryDestructorList (\r
140 IN EFI_HANDLE ImageHandle,\r
141 IN EFI_SYSTEM_TABLE *SystemTable\r
142 );\r
143\r
fb3df220 144\r
42eedea9 145/**\r
86c4360b 146 Autogenerated function that calls a set of module entry points.\r
147\r
148 This function must be called by _ModuleEntryPoint().\r
149 This function calls the set of module entry points. \r
150 This function is autogenerated by build tools and those build tools are responsible\r
151 for collecting the module entry points and calling them in a specified order.\r
42eedea9 152\r
153 @param ImageHandle ImageHandle of the loaded driver.\r
154 @param SystemTable Pointer to the EFI System Table.\r
155\r
86c4360b 156 @retval EFI_SUCCESS The UEFI Application executed normally.\r
157 @retval !EFI_SUCCESS The UEFI Application failed to execute normally.\r
42eedea9 158**/\r
fb3df220 159EFI_STATUS\r
160EFIAPI\r
161ProcessModuleEntryPointList (\r
162 IN EFI_HANDLE ImageHandle,\r
163 IN EFI_SYSTEM_TABLE *SystemTable\r
164 );\r
165\r
166\r
167/**\r
86c4360b 168 Autogenerated function that calls a set of module unload handlers.\r
169\r
170 This function must be called from the unload handler registered by _ModuleEntryPoint().\r
171 This function calls the set of module unload handlers. \r
172 This function is autogenerated by build tools and those build tools are responsible\r
173 for collecting the module unload handlers and calling them in a specified order.\r
fb3df220 174\r
175 @param ImageHandle ImageHandle of the loaded driver.\r
86c4360b 176\r
177 @retval EFI_SUCCESS The unoad handlers executed normally.\r
178 @retval !EFI_SUCCESS The unload handlers failed to execute normally.\r
fb3df220 179\r
180**/\r
181EFI_STATUS\r
182EFIAPI\r
183ProcessModuleUnloadList (\r
184 IN EFI_HANDLE ImageHandle\r
185 );\r
186\r
187#endif\r