]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Module entry point library for UEFI Applications.\r | |
3 | \r | |
4 | Copyright (c) 2007 - 2008, Intel Corporation\r | |
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 | |
18 | ///\r | |
19 | /// Declare the EFI/UEFI Specification Revision to which this driver is implemented \r | |
20 | ///\r | |
21 | extern CONST UINT32 _gUefiDriverRevision;\r | |
22 | \r | |
23 | \r | |
24 | /**\r | |
25 | Entry point to UEFI Application.\r | |
26 | \r | |
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 | |
32 | \r | |
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 | |
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 | |
50 | Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). \r | |
51 | \r | |
52 | @param ImageHandle The image handle of the UEFI Application.\r | |
53 | @param SystemTable A pointer to the EFI System Table.\r | |
54 | \r | |
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 | |
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 | |
69 | Invokes the library destructors for all dependent libraries and terminates\r | |
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 | |
74 | \r | |
75 | @param Status Status returned by the application that is exiting.\r | |
76 | \r | |
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 | |
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 | |
100 | \r | |
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 | |
111 | Autogenerated function that calls the library descructors for all of the module's\r | |
112 | dependent libraries.\r | |
113 | \r | |
114 | This function may be called by _ModuleEntryPoint()or Exit().\r | |
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 | |
125 | \r | |
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 | |
135 | This function calls the set of module entry points. It must be called by _ModuleEntryPoint().\r | |
136 | \r | |
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 | |
142 | \r | |
143 | @retval EFI_SUCCESS The UEFI Application executed normally.\r | |
144 | @retval !EFI_SUCCESS The UEFI Application failed to execute normally.\r | |
145 | \r | |
146 | **/\r | |
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 |