]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOMemoryCursor.cpp
xnu-4903.221.2.tar.gz
[apple/xnu.git] / iokit / Kernel / IOMemoryCursor.cpp
index 99999991d92eef222d389b71e963a97670150158..3314a68a1587a0100794adf86658424501746b57 100644 (file)
@@ -244,8 +244,13 @@ IOBigMemoryCursor::outputSegment(PhysicalSegment inSegment,
     IOPhysicalAddress * segment;
 
     segment = &((PhysicalSegment *) inSegments)[inSegmentIndex].location;
+#if IOPhysSize == 64
+    OSWriteBigInt64(segment, 0, inSegment.location);
+    OSWriteBigInt64(segment, sizeof(IOPhysicalAddress), inSegment.length);
+#else
     OSWriteBigInt(segment, 0, inSegment.location);
     OSWriteBigInt(segment, sizeof(IOPhysicalAddress), inSegment.length);
+#endif
 }
 
 IOBigMemoryCursor *
@@ -291,8 +296,13 @@ IOLittleMemoryCursor::outputSegment(PhysicalSegment inSegment,
     IOPhysicalAddress * segment;
 
     segment = &((PhysicalSegment *) inSegments)[inSegmentIndex].location;
+#if IOPhysSize == 64
+    OSWriteLittleInt64(segment, 0, inSegment.location);
+    OSWriteLittleInt64(segment, sizeof(IOPhysicalAddress), inSegment.length);
+#else
     OSWriteLittleInt(segment, 0, inSegment.location);
     OSWriteLittleInt(segment, sizeof(IOPhysicalAddress), inSegment.length);
+#endif
 }
 
 IOLittleMemoryCursor *