Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
12-82 12/01/02 Version 1.10
Description
The AllocateBuffer() function allocates pages that are suitable for an
EfiPciIoOperationBusMasterCommonBuffer mapping. This means that the buffer
allocated by this function must support simultaneous access by both the processor and a PCI Bus
Master. The device address that the PCI Bus Master uses to access the buffer can be retrieved with
a call to Map()
.
If the current attributes of the PCI controller has the EFI_PCI_IO_ATTRIBUTE_DUAL_
ADDRESS_CYCLE bit set, then when the buffer allocated by this function is mapped with a call to
Map(), the device address that is returned by Map() must be within the 64-bit device address
space of the PCI Bus Master. The attributes for a PCI controller can be managed by calling
Attributes()
.
If the current attributes for the PCI controller has the EFI_PCI_IO_ATTRIBUTE_DUAL_
ADDRESS_CYCLE bit clear, then when the buffer allocated by this function is mapped with a call
to Map(), the device address that is returned by Map() must be within the 32-bit device address
space of the PCI Bus Master. The attributes for a PCI controller can be managed by calling
Attributes().
If the memory allocation specified by MemoryType and Pages cannot be satisfied, then
EFI_OUT_OF_RESOURCES is returned.
Status Codes Returned
EFI_SUCCESS The requested memory pages were allocated.
EFI_INVALID_PARAMETER
MemoryType is invalid.
EFI_INVALID_PARAMETER
HostAddress is NULL.
EFI_UNSUPPORTED
Attributes is unsupported. The only legal attribute bits are
MEMORY_WRITE_COMBINE and MEMORY_CACHED.
EFI_OUT_OF_RESOURCES The memory pages could not be allocated.