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 |
25 | Enrty point to UEFI Application.\r |
26 | \r |
27 | @param ImageHandle ImageHandle of the loaded driver.\r |
28 | @param SystemTable Pointer to the EFI System Table.\r |
29 | \r |
30 | @retval EFI_SUCCESS One or more of the drivers returned a success code.\r |
31 | @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r |
32 | \r |
33 | **/\r |
34 | EFI_STATUS\r |
35 | EFIAPI\r |
36 | _ModuleEntryPoint (\r |
37 | IN EFI_HANDLE ImageHandle,\r |
38 | IN EFI_SYSTEM_TABLE *SystemTable\r |
39 | );\r |
40 | \r |
41 | \r |
42 | /**\r |
43 | Enrty point wrapper of UEFI Application.\r |
44 | \r |
45 | @param ImageHandle ImageHandle of the loaded driver.\r |
46 | @param SystemTable Pointer to the EFI System Table.\r |
47 | \r |
48 | @retval EFI_SUCCESS One or more of the drivers returned a success code.\r |
49 | @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r |
50 | \r |
51 | **/\r |
52 | EFI_STATUS\r |
53 | EFIAPI\r |
54 | EfiMain (\r |
55 | IN EFI_HANDLE ImageHandle,\r |
56 | IN EFI_SYSTEM_TABLE *SystemTable\r |
57 | );\r |
58 | \r |
59 | \r |
60 | /**\r |
61 | Invoke the destuctors of all libraries and call gBS->Exit\r |
62 | to return control to firmware core.\r |
63 | \r |
64 | @param Status Status returned by the application that is exiting.\r |
65 | \r |
fb3df220 |
66 | **/\r |
67 | VOID\r |
68 | EFIAPI\r |
69 | Exit (\r |
70 | IN EFI_STATUS Status\r |
71 | );\r |
72 | \r |
73 | \r |
74 | /**\r |
75 | Call constructors for all libraries. Autogen tool inserts the implementation\r |
76 | of this function into Autogen.c.\r |
77 | \r |
78 | @param ImageHandle ImageHandle of the loaded driver.\r |
79 | @param SystemTable Pointer to the EFI System Table.\r |
80 | \r |
fb3df220 |
81 | **/\r |
82 | VOID\r |
83 | EFIAPI\r |
84 | ProcessLibraryConstructorList (\r |
85 | IN EFI_HANDLE ImageHandle,\r |
86 | IN EFI_SYSTEM_TABLE *SystemTable\r |
87 | );\r |
88 | \r |
89 | \r |
90 | /**\r |
91 | Call destructors for all libraries. Autogen tool inserts the implementation\r |
92 | of this function into Autogen.c.\r |
93 | \r |
94 | @param ImageHandle ImageHandle of the loaded driver.\r |
95 | @param SystemTable Pointer to the EFI System Table.\r |
96 | \r |
fb3df220 |
97 | **/\r |
98 | VOID\r |
99 | EFIAPI\r |
100 | ProcessLibraryDestructorList (\r |
101 | IN EFI_HANDLE ImageHandle,\r |
102 | IN EFI_SYSTEM_TABLE *SystemTable\r |
103 | );\r |
104 | \r |
105 | /**\r |
106 | Call driver entry point. For UEFI application, user\r |
107 | can only specify one entry point. Tool will automatically insert\r |
108 | this to Autogen.c.\r |
109 | \r |
110 | @param ImageHandle ImageHandle of the loaded driver.\r |
111 | @param SystemTable Pointer to the EFI System Table.\r |
112 | \r |
113 | @return Status returned by entry points specified by\r |
114 | the user. \r |
115 | \r |
116 | **/\r |
fb3df220 |
117 | EFI_STATUS\r |
118 | EFIAPI\r |
119 | ProcessModuleEntryPointList (\r |
120 | IN EFI_HANDLE ImageHandle,\r |
121 | IN EFI_SYSTEM_TABLE *SystemTable\r |
122 | );\r |
123 | \r |
124 | #endif\r |