]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/UefiDriverEntryPoint.h
Synchronization of MDE Library Spec., Mde.dec, and corresponding head files in MdePkg...
[mirror_edk2.git] / MdePkg / Include / Library / UefiDriverEntryPoint.h
1 /** @file
2 Module entry point library for UEFI drivers, DXE Drivers, DXE Runtime Drivers,
3 and DXE SMM Drivers.
4
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __MODULE_ENTRY_POINT_H__
17 #define __MODULE_ENTRY_POINT_H__
18
19 ///
20 /// Declare the EFI/UEFI Specification Revision to which this driver is implemented
21 ///
22 extern CONST UINT32 _gUefiDriverRevision;
23
24 ///
25 /// Declare the number of unload handler in the image.
26 ///
27 extern CONST UINT8 _gDriverUnloadImageCount;
28
29
30 /**
31 Enrty point to DXE Driver.
32
33 @param ImageHandle ImageHandle of the loaded driver.
34 @param SystemTable Pointer to the EFI System Table.
35
36 @retval EFI_SUCCESS One or more of the drivers returned a success code.
37 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
38
39 **/
40 EFI_STATUS
41 EFIAPI
42 _ModuleEntryPoint (
43 IN EFI_HANDLE ImageHandle,
44 IN EFI_SYSTEM_TABLE *SystemTable
45 );
46
47
48 /**
49 Enrty point wrapper of DXE Driver.
50
51 @param ImageHandle ImageHandle of the loaded driver.
52 @param SystemTable Pointer to the EFI System Table.
53
54 @retval EFI_SUCCESS One or more of the drivers returned a success code.
55 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
56
57 **/
58 EFI_STATUS
59 EFIAPI
60 EfiMain (
61 IN EFI_HANDLE ImageHandle,
62 IN EFI_SYSTEM_TABLE *SystemTable
63 );
64
65
66 /**
67 Computes the cummulative return status for the driver entry point and perform
68 a long jump back into DriverEntryPoint().
69
70 @param Status Status returned by the driver that is exiting.
71
72 **/
73 VOID
74 EFIAPI
75 ExitDriver (
76 IN EFI_STATUS Status
77 );
78
79
80 /**
81 Call constructs for all libraries. Automatics Generated by tool.
82
83 @param ImageHandle ImageHandle of the loaded driver.
84 @param SystemTable Pointer to the EFI System Table.
85
86 **/
87 VOID
88 EFIAPI
89 ProcessLibraryConstructorList (
90 IN EFI_HANDLE ImageHandle,
91 IN EFI_SYSTEM_TABLE *SystemTable
92 );
93
94
95 /**
96 Call destructors for all libraries. Automatics Generated by tool.
97
98 @param ImageHandle ImageHandle of the loaded driver.
99 @param SystemTable Pointer to the EFI System Table.
100
101 **/
102 VOID
103 EFIAPI
104 ProcessLibraryDestructorList (
105 IN EFI_HANDLE ImageHandle,
106 IN EFI_SYSTEM_TABLE *SystemTable
107 );
108
109 /**
110 Call the list of driver entry points. Automatics Generated by tool.
111
112 @param ImageHandle ImageHandle of the loaded driver.
113 @param SystemTable Pointer to the EFI System Table.
114
115 @return Status returned by entry points of drivers.
116
117 **/
118
119 /**
120 Call the list of driver entry points. Automatics Generated by tool.
121
122 @param ImageHandle ImageHandle of the loaded driver.
123 @param SystemTable Pointer to the EFI System Table.
124
125 @return Status returned by entry points of drivers.
126
127 **/
128 EFI_STATUS
129 EFIAPI
130 ProcessModuleEntryPointList (
131 IN EFI_HANDLE ImageHandle,
132 IN EFI_SYSTEM_TABLE *SystemTable
133 );
134
135
136 /**
137 Call the unload handlers for all the modules. Automatics Generated by tool.
138
139 @param ImageHandle ImageHandle of the loaded driver.
140
141 @return Status returned by unload handlers of drivers.
142
143 **/
144 EFI_STATUS
145 EFIAPI
146 ProcessModuleUnloadList (
147 IN EFI_HANDLE ImageHandle
148 );
149
150 #endif