]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Library/UefiApplicationEntryPoint.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Library / UefiApplicationEntryPoint.h
... / ...
CommitLineData
1/** @file\r
2 Module entry point library for UEFI Applications.\r
3\r
4Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#ifndef __UEFI_APPLICATION_ENTRY_POINT_H__\r
10#define __UEFI_APPLICATION_ENTRY_POINT_H__\r
11\r
12///\r
13/// Declare the EFI/UEFI Specification Revision to which this driver is implemented\r
14///\r
15extern CONST UINT32 _gUefiDriverRevision;\r
16\r
17\r
18/**\r
19 Entry point to UEFI Application.\r
20\r
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
26\r
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
33\r
34**/\r
35EFI_STATUS\r
36EFIAPI\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
44 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
45\r
46 @param ImageHandle The image handle of the UEFI Application.\r
47 @param SystemTable A pointer to the EFI System Table.\r
48\r
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
52\r
53**/\r
54EFI_STATUS\r
55EFIAPI\r
56EfiMain (\r
57 IN EFI_HANDLE ImageHandle,\r
58 IN EFI_SYSTEM_TABLE *SystemTable\r
59 );\r
60\r
61\r
62/**\r
63 Invokes the library destructors for all dependent libraries and terminates\r
64 the UEFI Application.\r
65\r
66 This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
67 with a status specified by Status.\r
68\r
69 @param Status Status returned by the application that is exiting.\r
70\r
71**/\r
72VOID\r
73EFIAPI\r
74Exit (\r
75 IN EFI_STATUS Status\r
76 );\r
77\r
78\r
79/**\r
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
86 directly and library instances that a module depends on indirectly through other libraries.\r
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
94\r
95**/\r
96VOID\r
97EFIAPI\r
98ProcessLibraryConstructorList (\r
99 IN EFI_HANDLE ImageHandle,\r
100 IN EFI_SYSTEM_TABLE *SystemTable\r
101 );\r
102\r
103\r
104/**\r
105 Autogenerated function that calls the library descructors for all of the module's\r
106 dependent libraries.\r
107\r
108 This function may be called by _ModuleEntryPoint()or Exit().\r
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
111 directly and library instances that a module depends on indirectly through other libraries.\r
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
119\r
120**/\r
121VOID\r
122EFIAPI\r
123ProcessLibraryDestructorList (\r
124 IN EFI_HANDLE ImageHandle,\r
125 IN EFI_SYSTEM_TABLE *SystemTable\r
126 );\r
127\r
128/**\r
129 This function calls the set of module entry points. It must be called by _ModuleEntryPoint().\r
130\r
131 This function is autogenerated by build tools and those build tools are\r
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
136\r
137 @retval EFI_SUCCESS The UEFI Application executed normally.\r
138 @retval !EFI_SUCCESS The UEFI Application failed to execute normally.\r
139\r
140**/\r
141EFI_STATUS\r
142EFIAPI\r
143ProcessModuleEntryPointList (\r
144 IN EFI_HANDLE ImageHandle,\r
145 IN EFI_SYSTEM_TABLE *SystemTable\r
146 );\r
147\r
148#endif\r