The AllocateBuffer method allocates a common buffer that can be accessed by the port driver and DMA hardware.
NTSTATUS AllocateBuffer( ULONG BufferSize, PPHYSICAL_ADDRESS PhysicalAddressConstraint );
Specifies the size in bytes of the buffer to be allocated.
Specifies an optional constraint to place on the physical address of the buffer. If this parameter is non-NULL, only the bits that are set in the constraint address will vary from the beginning to the end of the buffer. For example, to request a buffer that does not cross a 64-kilobyte boundary, specify the physical address constraint 0x000000000000FFFF.
This method returns NTSTATUS. AllocateBuffer returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
This method must be called only once following the creation of the DMA-channel object unless the previously allocated buffer is first freed by calling FreeBuffer.