Bewerken

Delen via


Raw and Translated Resources

When a driver's EvtDeviceRemoveAddedResources or EvtDevicePrepareHardware callback function receives a resource list, it receives two versions of the list. One version represents the device's raw resources, and the other represents the device's translated resources. Both versions represent the same set of hardware resources, in the same order.

  • Raw resources are resources that are identified by addresses that are relative to the bus to which the device is connected. Typically, the driver that programs the device provides these addresses to the device.

  • Translated resources are resources that are identified by system physical addresses that drivers use to access the resources.

A driver for a PCI bus device receives resources that are listed in the order in which they appear in the device’s Base Address Registers (BARs). However, additional resource descriptors may be interleaved in the list, such that the resource at index X in the BAR might not match the resource at the same index position in the resource list.

For more information about raw and translated resources, see the member descriptions for the CM_PARTIAL_RESOURCE_DESCRIPTOR structure.

If a device's translated resource list contains a resource with the Type member of the CM_PARTIAL_RESOURCE_DESCRIPTOR structure set to CmResourceTypeMemory, every driver that accesses that resource must do the following:

For more information about mapping bus-relative addresses, see Mapping Bus-Relative Addresses to Virtual Addresses.