The CM_PARTIAL_RESOURCE_DESCRIPTOR structure specifies one or more system hardware resources, of a single type, assigned to a device. This structure is used to create an array within a CM_PARTIAL_RESOURCE_LIST structure.
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
UCHAR Type;
UCHAR ShareDisposition;
USHORT Flags;
union {
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Generic;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Port;
struct {
ULONG Level;
ULONG Vector;
KAFFINITY Affinity;
} Interrupt;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Memory;
struct {
ULONG Channel;
ULONG Port;
ULONG Reserved1;
} Dma;
struct {
ULONG Data[3];
} DevicePrivate;
struct {
ULONG Start;
ULONG Length;
ULONG Reserved;
} BusNumber;
struct {
ULONG DataSize;
ULONG Reserved1;
ULONG Reserved2;
} DeviceSpecificData;
} u;
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
| Type Value | u Member Substructure |
|---|---|
| CmResourceTypePort | u.Port |
| CmResourceTypeInterrupt | u.Interrupt |
| CmResourceTypeMemory | u.Memory |
| CmResourceTypeDma | u.Dma |
| CmResourceTypeDevicePrivate | u.DevicePrivate |
| CmResourceTypeBusNumber | u.BusNumber |
| CmResourceTypeDeviceSpecific | u.DeviceSpecificData (Not used within IO_RESOURCE_DESCRIPTOR.) |
| CmResourceTypePcCardConfig | u.DevicePrivate |
| CmResourceTypeMfCardConfig | u.DevicePrivate |
| CmResourceTypeConfigData | Reserved for system use. |
| CmResourceTypeNonArbitrated | Not used. |
| Value | Definition |
|---|---|
| CmResourceShareDeviceExclusive | The device requires exclusive use of the resource. |
| CmResourceShareDriverExclusive | The driver requires exclusive use of the resource. (Not supported for WDM drivers.) |
| CmResourceShareShared | The resource can be shared without restriction. |
| Resource Type |
Flag |
Definition |
|---|---|---|
| CmResourceTypePort | ||
| CM_RESOURCE_PORT_MEMORY | The device is accessed in memory address space. | |
| CM_RESOURCE_PORT_IO | The device is accessed in I/O address space. | |
| CM_RESOURCE_PORT_10_BIT_DECODE | The device decodes 10 bits of the port address. | |
| CM_RESOURCE_PORT_12_BIT_DECODE | The device decodes 12 bits of the port address. | |
| CM_RESOURCE_PORT_16_BIT_DECODE | The device decodes 16 bits of the port address. | |
| CM_RESOURCE_PORT_POSITIVE_DECODE | The device uses "positive decode" instead of "subtractive decode". (In general, PCI devices use positive decode and ISA buses use subtractive decode.) | |
| CM_RESOURCE_PORT_PASSIVE_DECODE | The device decodes the port but the driver does not use it. | |
| CM_RESOURCE_PORT_WINDOW_DECODE | Reserved for system use. | |
| CmResourceTypeInterrupt | ||
| CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE | The IRQ line is level-triggered. (These IRQs are usually shareable.) | |
| CM_RESOURCE_INTERRUPT_LATCHED | The IRQ line is edge-triggered. | |
| CmResourceTypeMemory | ||
| CM_RESOURCE_MEMORY_READ_WRITE | The memory range is readable and writable. | |
| CM_RESOURCE_MEMORY_READ_ONLY | The memory range is read-only. | |
| CM_RESOURCE_MEMORY_WRITE_ONLY | The memory range is write-only. | |
| CM_RESOURCE_MEMORY_PREFETCHABLE | The memory range is prefetchable. | |
| CM_RESOURCE_MEMORY_COMBINEDWRITE | Combined-write caching is allowed. | |
| CM_RESOURCE_MEMORY_24 | The device uses 24-bit addressing. | |
| CM_RESOURCE_MEMORY_CACHEABLE | The memory range is cacheable. | |
| CmResourceTypeDma | ||
| CM_RESOURCE_DMA_8 | 8-bit DMA channel | |
| CM_RESOURCE_DMA_16 | 16-bit DMA channel | |
| CM_RESOURCE_DMA_32 | 32-bit DMA channel | |
| CM_RESOURCE_DMA_8_AND_16 | 8-bit and 16-bit DMA channel | |
| CM_RESOURCE_DMA_BUS_MASTER | The device supports bus master DMA transfers. | |
| CM_RESOURCE_DMA_TYPE_A | Type A DMA | |
| CM_RESOURCE_DMA_TYPE_B | Type B DMA | |
| CM_RESOURCE_DMA_TYPE_F | Type F DMA | |
For translated resources: System physical address of the lowest of a range of contiguous I/O port addresses allocated to the device.
For translated resources: The DIRQL assigned to the device.
For translated resources: The global system vector assigned to the device.
For translated resources: System physical address of the lowest of a range of contiguous memory addresses allocated to the device.
Examples of device-specific structures include:
CM_FLOPPY_DEVICE_DATA,
CM_KEYBOARD_DEVICE_DATA,
CM_SCSI_DEVICE_DATA,
CM_SERIAL_DEVICE_DATA
Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
A CM_PARTIAL_RESOURCE_DESCRIPTOR structure can describe either a raw (bus-relative) resource or a translated (system physical) resource, depending on the routine or IRP with which it is being used (see See Also).
CM_RESOURCE_LIST,
CM_FULL_RESOURCE_DESCRIPTOR,
CM_PARTIAL_RESOURCE_LIST,
CM_FLOPPY_DEVICE_DATA,
CM_KEYBOARD_DEVICE_DATA,
CM_SCSI_DEVICE_DATA,
CM_SERIAL_DEVICE_DATA,
IoConnectInterrupt,
IoGetDeviceProperty,
IoReportResourceForDetection,
IO_RESOURCE_DESCRIPTOR,
IRP_MN_START_DEVICE