3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Library functions that can be called in both PEI and DXE phase
22 #ifndef _EFI_COMBINATION_LIB_H_
23 #define _EFI_COMBINATION_LIB_H_
26 EfiInitializeCommonDriverLib (
27 IN EFI_HANDLE ImageHandle
,
34 Initialize lib function calling phase: PEI or DXE
38 ImageHandle - The firmware allocated handle for the EFI image.
40 SystemTable - A pointer to the EFI System Table.
44 EFI_STATUS always returns EFI_SUCCESS
64 Width - Width of read operation
65 Address - Start IO address to read
67 Buffer - Buffer to store result
91 Width - Width of write operation
92 Address - Start IO address to write
94 Buffer - Buffer to write to the address
118 Width - Width of PCI read
119 Address - PCI address to read
121 Buffer - Output buffer for the read
145 Width - Width of PCI write
146 Address - PCI address to write
148 Buffer - Buffer to write to the address
159 IN UINTN Microseconds
165 Induces a fine-grained stall.
169 Microseconds - The number of microseconds to stall execution.
180 IN VOID
*Destination
,
188 Copy Length bytes from Source to Destination.
192 Destination - Target of copy
194 Source - Place to copy from
196 Length - Number of bytes to copy
206 EfiCommonAllocatePages (
207 IN EFI_ALLOCATE_TYPE Type
,
208 IN EFI_MEMORY_TYPE MemoryType
,
210 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
216 Allocates memory pages from the system.
220 Type - The type of allocation to perform.
221 MemoryType - The type of memory to allocate.
222 Pages - The number of contiguous pages to allocate.
223 Memory - Pointer to a physical address.
227 EFI_OUT_OF_RESOURCES - The pages could not be allocated.
229 EFI_INVALID_PARAMETER - Invalid parameter
231 EFI_NOT_FOUND - The requested pages could not be found.
233 EFI_SUCCESS - The requested pages were allocated.
239 EfiCommonLocateInterface (
247 Returns the first protocol instance that matches the given protocol.
251 Guid - Provides the protocol to search for.
252 Interface - On return, a pointer to the first interface that matches Protocol
262 EfiCommonReportStatusCode (
263 IN EFI_STATUS_CODE_TYPE CodeType
,
264 IN EFI_STATUS_CODE_VALUE Value
,
266 IN EFI_GUID
* CallerId
,
267 IN EFI_STATUS_CODE_DATA
* Data OPTIONAL
277 CodeType - Type of Status Code.
279 Value - Value to output for Status Code.
281 Instance - Instance Number of this status code.
283 CallerId - ID of the caller of this status code.
285 Data - Optional data associated with this status code.