]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/UefiApplicationEntryPoint.h
Code Scrub of MdePkg/Inlcude/Library
[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 **/
66 VOID
67 EFIAPI
68 Exit (
69 IN EFI_STATUS Status
70 );
71
72
73 /**
74 Call constructors for all libraries. Autogen tool inserts the implementation
75 of this function into Autogen.c.
76
77 @param ImageHandle ImageHandle of the loaded driver.
78 @param SystemTable Pointer to the EFI System Table.
79
80 **/
81 VOID
82 EFIAPI
83 ProcessLibraryConstructorList (
84 IN EFI_HANDLE ImageHandle,
85 IN EFI_SYSTEM_TABLE *SystemTable
86 );
87
88
89 /**
90 Call destructors for all libraries. Autogen tool inserts the implementation
91 of this function into Autogen.c.
92
93 @param ImageHandle ImageHandle of the loaded driver.
94 @param SystemTable Pointer to the EFI System Table.
95
96 **/
97 VOID
98 EFIAPI
99 ProcessLibraryDestructorList (
100 IN EFI_HANDLE ImageHandle,
101 IN EFI_SYSTEM_TABLE *SystemTable
102 );
103
104 /**
105 Call driver entry point. For UEFI application, user
106 can only specify one entry point. Tool will automatically insert
107 this to Autogen.c.
108
109 @param ImageHandle ImageHandle of the loaded driver.
110 @param SystemTable Pointer to the EFI System Table.
111
112 @return Status returned by entry points specified by
113 the user.
114
115 **/
116
117 EFI_STATUS
118 EFIAPI
119 ProcessModuleEntryPointList (
120 IN EFI_HANDLE ImageHandle,
121 IN EFI_SYSTEM_TABLE *SystemTable
122 );
123
124 #endif