-// Used for dedicated communications for IODMACommand
-enum {
- kIOMDWalkSegments = 0x00000001,
- kIOMDFirstSegment = 0x00000002 | kIOMDWalkSegments,
- kIOMDGetCharacteristics = 0x00000004,
- kIOMDSetDMAActive = 0x00000005,
- kIOMDSetDMAInactive = 0x00000006,
- kIOMDLastDMACommandOperation
-};
-struct IOMDDMACharacteristics {
- UInt64 fLength;
- UInt32 fSGCount;
- UInt32 fPages;
- UInt32 fPageAlign;
- ppnum_t fHighestPage;
- IODirection fDirection;
- UInt8 fIsMapped, fIsPrepared;
-};
-struct IOMDDMAWalkSegmentArgs {
- UInt64 fOffset; // Input/Output offset
- UInt64 fIOVMAddr, fLength; // Output variables
- UInt8 fMapped; // Input Variable, Require mapped IOVMA
-};
-typedef UInt8 IOMDDMAWalkSegmentState[128];
+#define __IODEQUALIFY(type, expr) \
+ ({ typeof(expr) expr_ = (type)(uintptr_t)(expr); \
+ (type)(uintptr_t)(expr_); })
+