typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { UCHAR Type; UCHAR ShareDisposition; USHORT Flags; union { // // Range of port numbers, inclusive. These are physical and // bus-relative values, which should be passed, unchanged, // to HalTranslateBusAddress to get the mapped logical port // range the driver uses to communicate with its device. // struct { PHYSICAL_ADDRESS Start; // 8-byte physical address ULONG Length; } Port; // // Bus-relative IRQL or vector and affinity, which are returned // by IoQueryDeviceDescription or HalGetBusData and passed, // unchanged, to HalGetInterruptVector and/or // IoReportResourceUsage. // struct { ULONG Level; ULONG Vector; ULONG Affinity; } Interrupt; // // Range of device memory, inclusive. These are physical and // bus-relative values, which should be passed, unchanged, // to HalTranslateBusAddress to get the mapped logical address. // This, in turn, can be passed to MmMapIoSpace to get the virtual // address range that the driver uses to communicate with its device. // struct { PHYSICAL_ADDRESS Start; // 8-byte physical addresses. ULONG Length; } Memory; // // The DMA channel number or MCA-type DMA port for the device. // struct { ULONG Channel; ULONG Port; ULONG Reserved1; } Dma; // // Device-specific information defined by the system or driver. // The DataSize field indicates the size of the data in bytes. The // data is located immediately after the Reserved2 member of // the structure. // struct { ULONG DataSize; ULONG Reserved1; ULONG Reserved2; } DeviceSpecificData; } u; } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
Each CM_PARTIAL_RESOURCE_DESCRIPTOR defines an element of an array within a CM_PARTIAL_RESOURCE_LIST. Each CM_PARTIAL_RESOURCE_DESCRIPTOR describes only one type of resource used by a driver or device controlled by that driver.
For some examples of DeviceSpecificData, see the CM_XXX_DEVICE_DATA structures also described in this chapter.
For partial resource descriptors with CmResourceTypeInterrupt information, either the Level or Vector member of u.Interrupt is set, depending on the platform and type of bus. The Affinity member should either be left as returned by IoQueryDeviceDescription or be set to -1 when claiming resources in the registry with IoReportResourceUsage.
CM_PARTIAL_RESOURCE_LIST, HalGetInterruptVector, HalTranslateBusAddress, IoAssignResources, IoQueryDeviceDescription, IoReportResourceUsage, MmMapIoSpace