-/*! @function initWithAddress
- @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one virtual range of the kernel task.
- @discussion This method initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the kernel map. An IOMemoryDescriptor can be re-used by calling initWithAddress or initWithRanges again on an existing instance -- note this behavior is not commonly supported in other IOKit classes, although it is supported here.
- @param address The virtual address of the first byte in the memory.
- @param withLength The length of memory.
- @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- @result true on success, false on failure. */
-
- virtual bool initWithAddress(void * address,
- IOByteCount withLength,
- IODirection withDirection) = 0;
-
-/*! @function initWithAddress
- @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one virtual range of the specified map.
- @discussion This method initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the specified map. An IOMemoryDescriptor can be re-used by calling initWithAddress or initWithRanges again on an existing instance -- note this behavior is not commonly supported in other IOKit classes, although it is supported here.
- @param address The virtual address of the first byte in the memory.
- @param withLength The length of memory.
- @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- @param withTask The task the virtual ranges are mapped into.
- @result true on success, false on failure. */
-
- virtual bool initWithAddress(vm_address_t address,
- IOByteCount withLength,
- IODirection withDirection,
- task_t withTask) = 0;
-
-/*! @function initWithPhysicalAddress
- @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one physical range.
- @discussion This method initializes an IOMemoryDescriptor for memory consisting of a single physical memory range. An IOMemoryDescriptor can be re-used by calling initWithAddress or initWithRanges again on an existing instance -- note this behavior is not commonly supported in other IOKit classes, although it is supported here.
- @param address The physical address of the first byte in the memory.
- @param withLength The length of memory.
- @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- @result true on success, false on failure. */
-
- virtual bool initWithPhysicalAddress(
- IOPhysicalAddress address,
- IOByteCount withLength,
- IODirection withDirection ) = 0;
-
-/*! @function initWithRanges
- @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one or more virtual ranges.
- @discussion This method initializes an IOMemoryDescriptor for memory consisting of an array of virtual memory ranges each mapped into a specified source task. An IOMemoryDescriptor can be re-used by calling initWithAddress or initWithRanges again on an existing instance -- note this behavior is not commonly supported in other IOKit classes, although it is supported here.
- @param ranges An array of IOVirtualRange structures which specify the virtual ranges in the specified map which make up the memory to be described.
- @param withCount The member count of the ranges array.
- @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- @param withTask The task each of the virtual ranges are mapped into.
- @param asReference If false, the IOMemoryDescriptor object will make a copy of the ranges array, otherwise, the array will be used in situ, avoiding an extra allocation.
- @result true on success, false on failure. */
-
- virtual bool initWithRanges(IOVirtualRange * ranges,
- UInt32 withCount,
- IODirection withDirection,
- task_t withTask,
- bool asReference = false) = 0;
-
-/*! @function initWithPhysicalRanges
- @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one or more physical ranges.
- @discussion This method initializes an IOMemoryDescriptor for memory consisting of an array of physical memory ranges. An IOMemoryDescriptor can be re-used by calling initWithAddress or initWithRanges again on an existing instance -- note this behavior is not commonly supported in other IOKit classes, although it is supported here.
- @param ranges An array of IOPhysicalRange structures which specify the physical ranges which make up the memory to be described.
- @param withCount The member count of the ranges array.
- @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.
- @param asReference If false, the IOMemoryDescriptor object will make a copy of the ranges array, otherwise, the array will be used in situ, avoiding an extra allocation.
- @result true on success, false on failure. */
-
- virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges,
- UInt32 withCount,
- IODirection withDirection,
- bool asReference = false) = 0;
+#ifndef __LP64__
+// obsolete initializers
+// - initWithOptions is the designated initializer
+ virtual bool initWithAddress(void * address,
+ IOByteCount withLength,
+ IODirection withDirection) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */
+ virtual bool initWithAddress(IOVirtualAddress address,
+ IOByteCount withLength,
+ IODirection withDirection,
+ task_t withTask) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */
+ virtual bool initWithPhysicalAddress(
+ IOPhysicalAddress address,
+ IOByteCount withLength,
+ IODirection withDirection ) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */
+ virtual bool initWithRanges(IOVirtualRange * ranges,
+ UInt32 withCount,
+ IODirection withDirection,
+ task_t withTask,
+ bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */
+ virtual bool initWithPhysicalRanges(IOPhysicalRange * ranges,
+ UInt32 withCount,
+ IODirection withDirection,
+ bool asReference = false) APPLE_KEXT_DEPRECATED; /* use initWithOptions() instead */
+#endif /* __LP64__ */