PVOID
ScsiPortGetUncachedExtension(
IN PVOID HwDeviceExtension,
IN PPORT_CONFIGURATION_INFORMATION ConfigInfo,
IN ULONG NumberOfBytes
);
ScsiPortGetUncachedExtension allocates memory that can be used by both the CPU and a busmaster HBA for DMA or for shared data.
Parameters
HwDeviceExtension
Points to the miniport driver's per-HBA storage area.
ConfigInfo
Specifies information about the HBA's DMA capabilities. The following members must be filled in: DmaChannel or DmaPort, DmaWidth, DmaSpeed, MaximumLength, ScatterGather, Master set to TRUE, NumberOfPageBreaks, AdapterInterfaceType, Dma32BitAddresses, SystemIoBusNumber, and AutoRequestSense.
Members that are not pertinent to the HBA, such as DmaChannel for an EISA busmaster adapter, must be left as is.
NumberOfBytes
Indicates the size in bytes of the uncached extension to be allocated.
Return Value
ScsiPortGetUncachedExtension returns a virtual address pointer to the uncached extension. If it cannot allocate the requested memory, it returns NULL.
Comments
ScsiPortGetUncachedExtension can be called only from miniport driver's HwScsiFindAdapter routine and only for a busmaster HBA. Calls from other miniport driver routines will result in system failure or incorrect operation for the caller.
Because high-end machines have caches and large memories, any memory to be shared between an HBA and the CPU must be specially allocated. Mailboxes or I/O request queues in system memory are examples of this type of shared memory.
The HwScsiFindAdapter routine can call ScsiPortGetUncachedExtension only once for each busmaster HBA the miniport driver supports.
To obtain the physical address for the uncached extension that the HBA can use, call ScsiPortGetPhysicalAddress.
See Also
PORT_CONFIGURATION_INFORMATION, HwScsiFindAdapter, ScsiPortGetPhysicalAddress