Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Protocols PCI Bus Support
Version 1.10 12/01/02 12-81
EFI_PCI_IO_PROTOCOL.AllocateBuffer()
Summary
Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer
mapping.
Prototype
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
);
Parameters
This A pointer to the EFI_PCI_IO_PROTOCOL instance. Type
EFI_PCI_IO_PROTOCOL is defined in Section 12.4.
Type This parameter is not used and must be ignored.
MemoryType The type of memory to allocate, EfiBootServicesData or
EfiRuntimeServicesData. Type EFI_MEMORY_TYPE
is
defined in Chapter 5.
Pages The number of pages to allocate.
HostAddress A pointer to store the base system memory address of the
allocated range.
Attributes The requested bit mask of attributes for the allocated range. Only
the attributes
EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE, and
EFI_PCI_ATTRIBUTE_MEMORY_CACHED may be used with
this function. If any other bits are set, then EFI_UNSUPPORTED
is returned. This function may choose to ignore this bit mask. The
EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE, and
EFI_PCI_ATTRIBUTE_MEMORY_CACHED attributes provide a
hint to the implementation that may improve the performance of
the calling driver. The implementation may choose any default for
the memory attributes including write combining, cached, both, or
neither as long as the allocated buffer can be seen equally by both
the processor and the PCI bus master.