]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Module entry point library for UEFI Applications.\r |
fb3df220 | 3 | \r |
50a64e5b | 4 | Copyright (c) 2007 - 2008, Intel Corporation\r |
fb3df220 | 5 | All rights reserved. This program and the accompanying materials\r |
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 __UEFI_APPLICATION_ENTRY_POINT_H__\r | |
16 | #define __UEFI_APPLICATION_ENTRY_POINT_H__\r | |
17 | \r | |
fc30687f | 18 | ///\r |
19 | /// Declare the EFI/UEFI Specification Revision to which this driver is implemented \r | |
20 | ///\r | |
0308e20d | 21 | extern CONST UINT32 _gUefiDriverRevision;\r |
22 | \r | |
fb3df220 | 23 | \r |
24 | /**\r | |
28d3e14f | 25 | Entry point to UEFI Application.\r |
fb3df220 | 26 | \r |
71871514 | 27 | This function is the entry point for a UEFI Application. This function must call\r |
28 | ProcessLibraryConstructorList(), ProcessModuleEntryPointList(), and ProcessLibraryDestructorList().\r | |
29 | The return value from ProcessModuleEntryPointList() is returned.\r | |
30 | If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison,\r | |
31 | then return EFI_INCOMPATIBLE_VERSION.\r | |
fb3df220 | 32 | \r |
71871514 | 33 | @param ImageHandle The image handle of the UEFI Application.\r |
34 | @param SystemTable A pointer to the EFI System Table.\r | |
35 | \r | |
36 | @retval EFI_SUCCESS The UEFI Application exited normally.\r | |
37 | @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r | |
38 | @retval Other Return value from ProcessModuleEntryPointList().\r | |
fb3df220 | 39 | \r |
40 | **/\r | |
41 | EFI_STATUS\r | |
42 | EFIAPI\r | |
43 | _ModuleEntryPoint (\r | |
44 | IN EFI_HANDLE ImageHandle,\r | |
45 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
46 | );\r | |
47 | \r | |
48 | \r | |
49 | /**\r | |
71871514 | 50 | Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). \r |
fb3df220 | 51 | \r |
71871514 | 52 | @param ImageHandle The image handle of the UEFI Application.\r |
53 | @param SystemTable A pointer to the EFI System Table.\r | |
fb3df220 | 54 | \r |
71871514 | 55 | @retval EFI_SUCCESS The UEFI Application exited normally.\r |
56 | @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.\r | |
57 | @retval Other Return value from ProcessModuleEntryPointList().\r | |
fb3df220 | 58 | \r |
59 | **/\r | |
60 | EFI_STATUS\r | |
61 | EFIAPI\r | |
62 | EfiMain (\r | |
63 | IN EFI_HANDLE ImageHandle,\r | |
64 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
65 | );\r | |
66 | \r | |
67 | \r | |
68 | /**\r | |
f6d2bcc6 | 69 | Invokes the library destructors for all dependent libraries and terminates\r |
71871514 | 70 | the UEFI Application. \r |
71 | \r | |
72 | This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r | |
73 | with a status specified by Status.\r | |
fb3df220 | 74 | \r |
71871514 | 75 | @param Status Status returned by the application that is exiting.\r |
fb3df220 | 76 | \r |
fb3df220 | 77 | **/\r |
78 | VOID\r | |
79 | EFIAPI\r | |
80 | Exit (\r | |
81 | IN EFI_STATUS Status\r | |
82 | );\r | |
83 | \r | |
84 | \r | |
85 | /**\r | |
71871514 | 86 | Autogenerated function that calls the library constructors for all of the module's\r |
87 | dependent libraries.\r | |
88 | \r | |
89 | This function must be called by _ModuleEntryPoint().\r | |
90 | This function calls the set of library constructors for the set of library instances\r | |
91 | that a module depends on. This includes library instances that a module depends on\r | |
92 | directly and library instances that a module depends on indirectly through other libraries. \r | |
93 | This function is autogenerated by build tools and those build tools are responsible for\r | |
94 | collecting the set of library instances, determine which ones have constructors, and\r | |
95 | calling the library constructors in the proper order based upon each of the library\r | |
96 | instances own dependencies.\r | |
97 | \r | |
98 | @param ImageHandle The image handle of the UEFI Application.\r | |
99 | @param SystemTable A pointer to the EFI System Table.\r | |
fb3df220 | 100 | \r |
fb3df220 | 101 | **/\r |
102 | VOID\r | |
103 | EFIAPI\r | |
104 | ProcessLibraryConstructorList (\r | |
105 | IN EFI_HANDLE ImageHandle,\r | |
106 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
107 | );\r | |
108 | \r | |
109 | \r | |
110 | /**\r | |
71871514 | 111 | Autogenerated function that calls the library descructors for all of the module's\r |
112 | dependent libraries.\r | |
fb3df220 | 113 | \r |
34860f7a | 114 | This function may be called by _ModuleEntryPoint()or Exit().\r |
71871514 | 115 | This function calls the set of library destructors for the set of library instances\r |
116 | that a module depends on. This includes library instances that a module depends on\r | |
117 | directly and library instances that a module depends on indirectly through other libraries. \r | |
118 | This function is autogenerated by build tools and those build tools are responsible\r | |
119 | for collecting the set of library instances, determine which ones have destructors,\r | |
120 | and calling the library destructors in the proper order based upon each of the library\r | |
121 | instances own dependencies.\r | |
122 | \r | |
123 | @param ImageHandle The image handle of the UEFI Application.\r | |
124 | @param SystemTable A pointer to the EFI System Table.\r | |
fb3df220 | 125 | \r |
fb3df220 | 126 | **/\r |
127 | VOID\r | |
128 | EFIAPI\r | |
129 | ProcessLibraryDestructorList (\r | |
130 | IN EFI_HANDLE ImageHandle,\r | |
131 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
132 | );\r | |
133 | \r | |
134 | /**\r | |
f6d2bcc6 | 135 | This function calls the set of module entry points. It must be called by _ModuleEntryPoint().\r |
fb3df220 | 136 | \r |
f6d2bcc6 LG |
137 | This function is autogenerated by build tools and those build tools are \r |
138 | responsible for collecting the module entry points and calling them in a specified order.\r | |
139 | \r | |
140 | @param ImageHandle The image handle of the UEFI Application.\r | |
141 | @param SystemTable A pointer to the EFI System Table.\r | |
fb3df220 | 142 | \r |
71871514 | 143 | @retval EFI_SUCCESS The UEFI Application executed normally.\r |
144 | @retval !EFI_SUCCESS The UEFI Application failed to execute normally.\r | |
145 | \r | |
fb3df220 | 146 | **/\r |
fb3df220 | 147 | EFI_STATUS\r |
148 | EFIAPI\r | |
149 | ProcessModuleEntryPointList (\r | |
150 | IN EFI_HANDLE ImageHandle,\r | |
151 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
152 | );\r | |
153 | \r | |
154 | #endif\r |