Loading...
iokit/Kernel/IODeviceTreeSupport.cpp xnu-517.9.4 xnu-344.2
--- xnu/xnu-517.9.4/iokit/Kernel/IODeviceTreeSupport.cpp
+++ xnu/xnu-344.2/iokit/Kernel/IODeviceTreeSupport.cpp
@@ -37,8 +37,7 @@
 #include <IOKit/IOLib.h>
 #include <IOKit/IOKitKeys.h>
 
-#include <pexpert/device_tree.h>
-
+#include <DeviceTree.h>
 extern "C" {
     #include <machine/machine_routines.h>
     void DTInit( void * data );
@@ -97,6 +96,8 @@
     bool				intMap;
     bool				freeDT;
 
+    IOLog("IODeviceTreeSupport ");
+
     gIODTPlane = IORegistryEntry::makePlane( kIODeviceTreePlane );
 
     gIODTNameKey 		= OSSymbol::withCStringNoCopy( "name" );
@@ -147,7 +148,7 @@
 
     parent = MakeReferenceTable( (DTEntry)dtTop, freeDT );
 
-    stack = OSArray::withObjects( (const OSObject **) &parent, 1, 10 );
+    stack = OSArray::withObjects( & (const OSObject *) parent, 1, 10 );
     DTCreateEntryIterator( (DTEntry)dtTop, &iter );
 
     do {
@@ -192,7 +193,7 @@
         // free original device tree
         DTInit(0);
         IODTFreeLoaderInfo( "DeviceTree",
-			(void *)dtMap[0], round_page_32(dtMap[1]) );
+			(void *)dtMap[0], round_page(dtMap[1]) );
     }
 
     // adjust tree
@@ -230,6 +231,8 @@
         // set a key in the root to indicate we found NW interrupt mapping
         parent->setProperty( gIODTNWInterruptMappingKey,
                 (OSObject *) gIODTNWInterruptMappingKey );
+
+    IOLog("done\n");
 
     return( parent);
 }