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