]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/UefiApplicationEntryPoint.h
Add in UefiApplicationEntryPoint library class and library instance.
[mirror_edk2.git] / MdePkg / Include / Library / UefiApplicationEntryPoint.h
1 /** @file
2 Entry point to a UEFI Application.
3
4 Copyright (c) 2007, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __UEFI_APPLICATION_ENTRY_POINT_H__
16 #define __UEFI_APPLICATION_ENTRY_POINT_H__
17
18 //
19 // Declare the EFI/UEFI Specification Revision to which this driver is implemented
20 //
21 extern const UINT32 _gUefiDriverRevision;
22
23 /**
24 Enrty point to UEFI Application.
25
26 @param ImageHandle ImageHandle of the loaded driver.
27 @param SystemTable Pointer to the EFI System Table.
28
29 @retval EFI_SUCCESS One or more of the drivers returned a success code.
30 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 _ModuleEntryPoint (
36 IN EFI_HANDLE ImageHandle,
37 IN EFI_SYSTEM_TABLE *SystemTable
38 );
39
40
41 /**
42 Enrty point wrapper of UEFI Application.
43
44 @param ImageHandle ImageHandle of the loaded driver.
45 @param SystemTable Pointer to the EFI System Table.
46
47 @retval EFI_SUCCESS One or more of the drivers returned a success code.
48 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
49
50 **/
51 EFI_STATUS
52 EFIAPI
53 EfiMain (
54 IN EFI_HANDLE ImageHandle,
55 IN EFI_SYSTEM_TABLE *SystemTable
56 );
57
58
59 /**
60 Invoke the destuctors of all libraries and call gBS->Exit
61 to return control to firmware core.
62
63 @param Status Status returned by the application that is exiting.
64
65 @retval VOID
66
67 **/
68 VOID
69 EFIAPI
70 Exit (
71 IN EFI_STATUS Status
72 );
73
74
75 /**
76 Call constructors for all libraries. Autogen tool inserts the implementation
77 of this function into Autogen.c.
78
79 @param ImageHandle ImageHandle of the loaded driver.
80 @param SystemTable Pointer to the EFI System Table.
81
82 @retval VOID
83
84 **/
85 VOID
86 EFIAPI
87 ProcessLibraryConstructorList (
88 IN EFI_HANDLE ImageHandle,
89 IN EFI_SYSTEM_TABLE *SystemTable
90 );
91
92
93 /**
94 Call destructors for all libraries. Autogen tool inserts the implementation
95 of this function into Autogen.c.
96
97 @param ImageHandle ImageHandle of the loaded driver.
98 @param SystemTable Pointer to the EFI System Table.
99
100 @retval VOID
101 **/
102 VOID
103 EFIAPI
104 ProcessLibraryDestructorList (
105 IN EFI_HANDLE ImageHandle,
106 IN EFI_SYSTEM_TABLE *SystemTable
107 );
108
109 /**
110 Call driver entry point. For UEFI application, user
111 can only specify one entry point. Tool will automatically insert
112 this to Autogen.c.
113
114 @param ImageHandle ImageHandle of the loaded driver.
115 @param SystemTable Pointer to the EFI System Table.
116
117 @return Status returned by entry points specified by
118 the user.
119
120 **/
121
122 EFI_STATUS
123 EFIAPI
124 ProcessModuleEntryPointList (
125 IN EFI_HANDLE ImageHandle,
126 IN EFI_SYSTEM_TABLE *SystemTable
127 );
128
129 #endif