Import Library Class from original MDE package. Also I added the EFI_PEI_CORE_ENTRY_P...
[mirror_edk2.git] / MdePkg / Include / Library / UefiDriverEntryPoint.h
1 /** @file
2 Entry point to a DXE Boot Services Driver
3
4 Copyright (c) 2006, 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 __MODULE_ENTRY_POINT_H__
16 #define __MODULE_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 // Declare the number of entry points in the image.
25 //
26 extern const UINT8 _gDriverEntryPointCount;
27
28 //
29 // Declare the number of unload handler in the image.
30 //
31 extern const UINT8 _gDriverUnloadImageCount;
32
33 //
34 // Declare the arrary of Boot Sevice Exit Event callbacks .
35 //
36 extern const EFI_EVENT_NOTIFY _gDriverExitBootServicesEvent[];
37
38 //
39 // Declare the arrary of Virtual Address Change Event callbacks .
40 //
41 extern const EFI_EVENT_NOTIFY _gDriverSetVirtualAddressMapEvent[];
42
43 /**
44 Enrty point to DXE SMM Driver.
45
46 @param ImageHandle ImageHandle of the loaded driver.
47 @param SystemTable Pointer to the EFI System Table.
48
49 @retval EFI_SUCCESS One or more of the drivers returned a success code.
50 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
51
52 **/
53 EFI_STATUS
54 EFIAPI
55 _ModuleEntryPoint (
56 IN EFI_HANDLE ImageHandle,
57 IN EFI_SYSTEM_TABLE *SystemTable
58 );
59
60
61 /**
62 Enrty point wrapper of DXE Driver.
63
64 @param ImageHandle ImageHandle of the loaded driver.
65 @param SystemTable Pointer to the EFI System Table.
66
67 @retval EFI_SUCCESS One or more of the drivers returned a success code.
68 @retval !EFI_SUCESS The return status from the last driver entry point in the list.
69
70 **/
71 EFI_STATUS
72 EFIAPI
73 EfiMain (
74 IN EFI_HANDLE ImageHandle,
75 IN EFI_SYSTEM_TABLE *SystemTable
76 );
77
78
79 /**
80 Computes the cummulative return status for the driver entry point and perform
81 a long jump back into DriverEntryPoint().
82
83 @param Status Status returned by the driver that is exiting.
84
85 **/
86 VOID
87 EFIAPI
88 ExitDriver (
89 IN EFI_STATUS Status
90 );
91
92
93 /**
94 Call constructs for all libraries. Automatics Generated by tool.
95
96 @param ImageHandle ImageHandle of the loaded driver.
97 @param SystemTable Pointer to the EFI System Table.
98
99 **/
100 VOID
101 EFIAPI
102 ProcessLibraryConstructorList (
103 IN EFI_HANDLE ImageHandle,
104 IN EFI_SYSTEM_TABLE *SystemTable
105 );
106
107
108 /**
109 Call destructors for all libraries. Automatics Generated by tool.
110
111 @param ImageHandle ImageHandle of the loaded driver.
112 @param SystemTable Pointer to the EFI System Table.
113
114 **/
115 VOID
116 EFIAPI
117 ProcessLibraryDestructorList (
118 IN EFI_HANDLE ImageHandle,
119 IN EFI_SYSTEM_TABLE *SystemTable
120 );
121
122 /**
123 Call the list of driver entry points. Automatics Generated by tool.
124
125 @param ImageHandle ImageHandle of the loaded driver.
126 @param SystemTable Pointer to the EFI System Table.
127
128 @return Status returned by entry points of drivers.
129
130 **/
131
132 EFI_STATUS
133 EFIAPI
134 ProcessModuleEntryPointList (
135 IN EFI_HANDLE ImageHandle,
136 IN EFI_SYSTEM_TABLE *SystemTable
137 );
138
139
140 /**
141 Call the unload handlers for all the modules. Automatics Generated by tool.
142
143 @param ImageHandle ImageHandle of the loaded driver.
144
145 @return Status returned by unload handlers of drivers.
146
147 **/
148 EFI_STATUS
149 EFIAPI
150 ProcessModuleUnloadList (
151 IN EFI_HANDLE ImageHandle
152 );
153
154 #endif