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