ACCESS_RANGE structure

An ACCESS_RANGE describes a memory or I/O port range used by an HBA.

Note  The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.


typedef struct _ACCESS_RANGE {
  ULONG                 RangeLength;
  BOOLEAN               RangeInMemory;



Contains an address of type SCSI_PHYSICAL_ADDRESS that specifies the bus-relative base address of the range. This is an address that can be passed into ScsiPortGetDeviceBase.


Specifies the size, in bytes, or number of ports in the range. A miniport driver must ensure that this value matches the range actually decoded by the adapter. For example, if the HBA uses seven registers but responds to eight, this member should be set to 8.


Indicates the range is in memory when TRUE, rather than in I/O space. When FALSE, the range is in I/O space.


Each ACCESS_RANGE is an AccessRanges array element within the PORT_CONFIGURATION_INFORMATION structure that is passed to a miniport driver's HwScsiFindAdapter routine.

If possible, the OS-specific port driver sets up each access range element with a bus-relative HBA range for the miniport driver before calling the miniport driver's HwScsiFindAdapter routine. Otherwise, the port driver zeros range elements for which it cannot supply configuration information.

If the port driver does supply a range, the miniport driver's HwScsiFindAdapter routine should use only the supplied addresses and should never attempt to find other HBAs on the same bus using addresses of its own devising. Attempting to access other bus-relative port or memory ranges when the port driver has supplied range information, particularly in x86-only systems in which some devices are initialized in x86 real mode, can cause other devices on the bus to fail initialization or even cause the system to fail the boot process.

Each miniport driver should have a set of bus-relative default ranges to try if the OS-specific port driver cannot supply the information. A miniport driver must call ScsiPortValidateRange to check the safety of any miniport driver-supplied access range before it attempts to map such a range with ScsiPortGetDeviceBase and use the returned logical addresses to access an adapter, particularly if one of its HBAs has a BIOS.

Any access range that a miniport driver fills in for the OS-specific port driver in the PORT_CONFIGURATION_INFORMATION must have the RangeStart member set to a bus-relative address, such as a value returned by ScsiPortGetBusData.

The corresponding base logical address returned by ScsiPortGetDeviceBase should be stored, usually in the miniport driver's device extension, as the RangeStart address for a mapped range of I/O ports or memory addresses used to call the ScsiPortReadXxx and ScsiPortWriteXxx routines.



Srb.h (include Srb.h)

See also




Send comments about this topic to Microsoft