- virtual bool serialize(OSSerialize *s) const;
-};
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-class IOSubMemoryDescriptor : public IOMemoryDescriptor
-{
- friend class IOMemoryDescriptor;
-
- OSDeclareDefaultStructors(IOSubMemoryDescriptor);
-
-protected:
- IOMemoryDescriptor * _parent;
- IOByteCount _start;
-
- virtual void free();
-
- virtual bool initWithAddress(void * address,
- IOByteCount withLength,
- IODirection withDirection);
-
- virtual bool initWithAddress(vm_address_t address,
- IOByteCount withLength,
- IODirection withDirection,
- task_t withTask);
-
- virtual bool initWithPhysicalAddress(
- IOPhysicalAddress address,
- IOByteCount withLength,
- IODirection withDirection );
-
- virtual bool initWithRanges( IOVirtualRange * ranges,
- UInt32 withCount,
- IODirection withDirection,
- task_t withTask,
- bool asReference = false);
-
- virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges,
- UInt32 withCount,
- IODirection withDirection,
- bool asReference = false);
-
- IOMemoryDescriptor::withAddress;
- IOMemoryDescriptor::withPhysicalAddress;
- IOMemoryDescriptor::withPhysicalRanges;
- IOMemoryDescriptor::withRanges;
- IOMemoryDescriptor::withSubRange;
-
-public:
- /*
- * Initialize or reinitialize an IOSubMemoryDescriptor to describe
- * a subrange of an existing descriptor.
- *
- * An IOSubMemoryDescriptor can be re-used by calling initSubRange
- * again on an existing instance -- note that this behavior is not
- * commonly supported in other IOKit classes, although it is here.
- */
- virtual bool initSubRange( IOMemoryDescriptor * parent,
- IOByteCount offset, IOByteCount length,
- IODirection withDirection );
-
- /*
- * IOMemoryDescriptor required methods
- */
-
- virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset,
- IOByteCount * length);
-
- virtual IOPhysicalAddress getSourceSegment(IOByteCount offset,
- IOByteCount * length);
-
- virtual IOByteCount readBytes(IOByteCount offset,
- void * bytes, IOByteCount withLength);
-
- virtual IOByteCount writeBytes(IOByteCount offset,
- const void * bytes, IOByteCount withLength);
-
- virtual void * getVirtualSegment(IOByteCount offset,
- IOByteCount * length);
-
- virtual IOReturn prepare(IODirection forDirection = kIODirectionNone);
-
- virtual IOReturn complete(IODirection forDirection = kIODirectionNone);
-
- // make virtual
- IOReturn redirect( task_t safeTask, bool redirect );