]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiCombinationLib.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / EfiCombinationLib.h
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 \r
14 EfiCombinationLib.h\r
15\r
16Abstract:\r
17\r
18 Library functions that can be called in both PEI and DXE phase\r
19\r
20--*/\r
21\r
22#ifndef _EFI_COMBINATION_LIB_H_\r
23#define _EFI_COMBINATION_LIB_H_\r
24\r
25EFI_STATUS\r
26EfiInitializeCommonDriverLib (\r
27 IN EFI_HANDLE ImageHandle,\r
28 IN VOID *SystemTable\r
29 )\r
30/*++\r
31\r
32Routine Description:\r
33\r
34 Initialize lib function calling phase: PEI or DXE\r
35 \r
36Arguments:\r
37\r
38 ImageHandle - The firmware allocated handle for the EFI image.\r
39 \r
40 SystemTable - A pointer to the EFI System Table.\r
41\r
42Returns: \r
43\r
44 EFI_STATUS always returns EFI_SUCCESS\r
45\r
46--*/\r
47;\r
48\r
49EFI_STATUS\r
50EfiCommonIoRead (\r
51 IN UINT8 Width,\r
52 IN UINTN Address,\r
53 IN UINTN Count,\r
54 IN OUT VOID *Buffer\r
55 )\r
56/*++\r
57\r
58Routine Description:\r
59\r
60 Io read operation.\r
61\r
62Arguments:\r
63\r
64 Width - Width of read operation\r
65 Address - Start IO address to read\r
66 Count - Read count\r
67 Buffer - Buffer to store result\r
68\r
69Returns:\r
70\r
71 Status code\r
72\r
73--*/\r
74;\r
75\r
76EFI_STATUS\r
77EfiCommonIoWrite (\r
78 IN UINT8 Width,\r
79 IN UINTN Address,\r
80 IN UINTN Count,\r
81 IN OUT VOID *Buffer\r
82 )\r
83/*++\r
84\r
85Routine Description:\r
86\r
87 Io write operation.\r
88\r
89Arguments:\r
90\r
91 Width - Width of write operation\r
92 Address - Start IO address to write\r
93 Count - Write count\r
94 Buffer - Buffer to write to the address\r
95\r
96Returns:\r
97\r
98 Status code\r
99\r
100--*/\r
101;\r
102\r
103EFI_STATUS\r
104EfiCommonPciRead (\r
105 IN UINT8 Width,\r
106 IN UINT64 Address,\r
107 IN UINTN Count,\r
108 IN OUT VOID *Buffer\r
109 )\r
110/*++\r
111\r
112Routine Description:\r
113\r
114 Pci read operation\r
115\r
116Arguments:\r
117\r
118 Width - Width of PCI read\r
119 Address - PCI address to read\r
120 Count - Read count\r
121 Buffer - Output buffer for the read\r
122\r
123Returns:\r
124\r
125 Status code\r
126\r
127--*/\r
128;\r
129\r
130EFI_STATUS\r
131EfiCommonPciWrite (\r
132 IN UINT8 Width,\r
133 IN UINT64 Address,\r
134 IN UINTN Count,\r
135 IN OUT VOID *Buffer\r
136 )\r
137/*++\r
138\r
139Routine Description:\r
140\r
141 Pci write operation\r
142\r
143Arguments:\r
144\r
145 Width - Width of PCI write\r
146 Address - PCI address to write\r
147 Count - Write count\r
148 Buffer - Buffer to write to the address\r
149\r
150Returns:\r
151\r
152 Status code\r
153\r
154--*/\r
155;\r
156\r
157EFI_STATUS\r
158EfiCommonStall (\r
159 IN UINTN Microseconds\r
160 )\r
161/*++\r
162\r
163Routine Description:\r
164\r
165 Induces a fine-grained stall.\r
166\r
167Arguments:\r
168\r
169 Microseconds - The number of microseconds to stall execution.\r
170\r
171Returns:\r
172\r
173 Status code\r
174\r
175--*/\r
176;\r
177\r
178EFI_STATUS\r
179EfiCommonCopyMem (\r
180 IN VOID *Destination,\r
181 IN VOID *Source,\r
182 IN UINTN Length\r
183 )\r
184/*++\r
185\r
186Routine Description:\r
187\r
188 Copy Length bytes from Source to Destination.\r
189\r
190Arguments:\r
191\r
192 Destination - Target of copy\r
193\r
194 Source - Place to copy from\r
195\r
196 Length - Number of bytes to copy\r
197\r
198Returns:\r
199\r
200 Status code\r
201\r
202--*/\r
203;\r
204\r
205EFI_STATUS\r
206EfiCommonAllocatePages (\r
207 IN EFI_ALLOCATE_TYPE Type,\r
208 IN EFI_MEMORY_TYPE MemoryType,\r
209 IN UINTN Pages,\r
210 IN OUT EFI_PHYSICAL_ADDRESS *Memory\r
211 )\r
212/*++\r
213\r
214Routine Description:\r
215\r
216 Allocates memory pages from the system.\r
217\r
218Arguments:\r
219\r
220 Type - The type of allocation to perform.\r
221 MemoryType - The type of memory to allocate.\r
222 Pages - The number of contiguous pages to allocate.\r
223 Memory - Pointer to a physical address.\r
224\r
225Returns:\r
226\r
227 EFI_OUT_OF_RESOURCES - The pages could not be allocated.\r
228 \r
229 EFI_INVALID_PARAMETER - Invalid parameter\r
230 \r
231 EFI_NOT_FOUND - The requested pages could not be found.\r
232 \r
233 EFI_SUCCESS - The requested pages were allocated.\r
234\r
235--*/\r
236;\r
237\r
238EFI_STATUS\r
239EfiCommonLocateInterface (\r
240 IN EFI_GUID *Guid,\r
241 OUT VOID **Interface\r
242 )\r
243/*++\r
244\r
245Routine Description:\r
246\r
247 Returns the first protocol instance that matches the given protocol.\r
248\r
249Arguments:\r
250\r
251 Guid - Provides the protocol to search for.\r
252 Interface - On return, a pointer to the first interface that matches Protocol\r
253\r
254Returns:\r
255\r
256 Status code\r
257\r
258--*/\r
259;\r
260\r
261EFI_STATUS\r
262EfiCommonReportStatusCode (\r
263 IN EFI_STATUS_CODE_TYPE CodeType,\r
264 IN EFI_STATUS_CODE_VALUE Value,\r
265 IN UINT32 Instance,\r
266 IN EFI_GUID * CallerId,\r
267 IN EFI_STATUS_CODE_DATA * Data OPTIONAL\r
268 )\r
269/*++\r
270\r
271Routine Description:\r
272\r
273 Status Code reporter\r
274\r
275Arguments:\r
276 \r
277 CodeType - Type of Status Code.\r
278 \r
279 Value - Value to output for Status Code.\r
280 \r
281 Instance - Instance Number of this status code.\r
282 \r
283 CallerId - ID of the caller of this status code.\r
284 \r
285 Data - Optional data associated with this status code.\r
286\r
287Returns:\r
288\r
289 Status code\r
290 \r
291--*/\r
292;\r
293\r
294#endif\r