Loading...
--- xnu/xnu-2050.9.2/iokit/Kernel/IOBufferMemoryDescriptor.cpp
+++ xnu/xnu-1504.15.3/iokit/Kernel/IOBufferMemoryDescriptor.cpp
@@ -99,11 +99,19 @@
return (false);
_ranges.v64->address = 0;
_ranges.v64->length = 0;
- // make sure super::free doesn't dealloc _ranges before super::init
- _flags = kIOMemoryAsReference;
// Grab IOMD bits from the Buffer MD options
iomdOptions |= (options & kIOBufferDescriptorMemoryFlags);
+
+#if 0
+ // workarounds-
+ if ((options & kIOMemoryPhysicallyContiguous) || ((capacity == 0x1000) && (inTask == kernel_task))
+ && !physicalMask)
+ {
+ highestMask = physicalMask = 0xFFFFF000;
+ }
+ //-
+#endif
if (physicalMask && (alignment <= 1))
{
@@ -148,10 +156,6 @@
case kIOMapCopybackCache:
SET_MAP_MEM(MAP_MEM_COPYBACK, memEntryCacheMode);
- break;
-
- case kIOMapCopybackInnerCache:
- SET_MAP_MEM(MAP_MEM_INNERWBACK, memEntryCacheMode);
break;
case kIOMapDefaultCache: