+IOMapper * IOMapper::copyMapperForDevice(IOService * device)
+{
+ return copyMapperForDeviceWithIndex(device, 0);
+}
+
+IOMapper * IOMapper::copyMapperForDeviceWithIndex(IOService * device, unsigned int index)
+{
+ OSData *data;
+ OSObject * obj;
+ IOMapper * mapper = NULL;
+ OSDictionary * matching;
+
+ obj = device->copyProperty("iommu-parent");
+ if (!obj)
+ return (NULL);
+
+ if ((mapper = OSDynamicCast(IOMapper, obj)))
+ return (mapper);
+
+ if ((data = OSDynamicCast(OSData, obj)))
+ {
+ if (index >= data->getLength() / sizeof(UInt32))
+ goto done;
+
+ data = OSData::withBytesNoCopy((UInt32 *)data->getBytesNoCopy() + index, sizeof(UInt32));
+ if (!data)
+ goto done;
+
+ matching = IOService::propertyMatching(gIOMapperIDKey, data);
+ data->release();
+ }
+ else
+ matching = IOService::propertyMatching(gIOMapperIDKey, obj);
+
+ if (matching)
+ {
+ mapper = OSDynamicCast(IOMapper, IOService::waitForMatchingService(matching));
+ matching->release();
+ }
+
+done:
+ if (obj)
+ obj->release();
+ return (mapper);
+}
+
+ppnum_t IOMapper::iovmAllocDMACommand(IODMACommand * command, IOItemCount pageCount)
+{
+ return (0);
+}
+
+void IOMapper::iovmFreeDMACommand(IODMACommand * command,
+ ppnum_t addr, IOItemCount pageCount)
+{
+}
+
+ppnum_t IOMapper::iovmMapMemory(
+ OSObject * memory, // dma command or iomd
+ ppnum_t offsetPage,
+ ppnum_t pageCount,
+ uint32_t options,
+ upl_page_info_t * pageList,
+ const IODMAMapSpecification * mapSpecification)
+{
+ return (0);
+}
+