Loading...
iokit/Kernel/IOStartIOKit.cpp xnu-4570.71.2 xnu-3248.30.4
--- xnu/xnu-4570.71.2/iokit/Kernel/IOStartIOKit.cpp
+++ xnu/xnu-3248.30.4/iokit/Kernel/IOStartIOKit.cpp
@@ -43,8 +43,8 @@
 #include <IOKit/IOStatisticsPrivate.h>
 #include <IOKit/IOKitKeysPrivate.h>
 #include <IOKit/IOInterruptAccountingPrivate.h>
+
 #include <IOKit/assert.h>
-#include <sys/conf.h>
 
 #include "IOKitKernelInternal.h"
 
@@ -52,10 +52,6 @@
 OSSet *          gIORemoveOnReadProperties;
 
 extern "C" {
-
-void StartIOKit( void * p1, void * p2, void * p3, void * p4 );
-void IORegistrySetOSBuildVersion(char * build_version);
-void IORecordProgressBackbuffer(void * buffer, size_t size, uint32_t theme);
 
 extern void OSlibkernInit (void);
 
@@ -77,7 +73,7 @@
 		IOService::resourceMatching("IONVRAM"), &t );
 #endif
 
-	clock_initialize_calendar();
+    clock_initialize_calendar();
 }
 
 void iokit_post_constructor_init(void)
@@ -111,6 +107,9 @@
 	obj->release();
     }
 }
+
+// From <osfmk/kern/debug.c>
+extern int debug_mode;
 
 /*****
  * Pointer into bootstrap KLD segment for functions never used past startup.
@@ -134,6 +133,10 @@
     // Compat for boot-args
     gIOKitTrace |= (gIOKitDebug & kIOTraceCompatBootArgs);
 	
+    // Check for the log synchronous bit set in io
+    if (gIOKitDebug & kIOLogSynchronous)
+        debug_mode = true;
+
     if( PE_parse_boot_argn( "pmtimeout", &debugFlags, sizeof (debugFlags) ))
         gCanSleepTimeout = debugFlags;
     //
@@ -145,7 +148,6 @@
     //
     IOLibInit(); 
     OSlibkernInit();
-    devsw_init();
 
     gIOProgressBackbufferKey  = OSSymbol::withCStringNoCopy(kIOProgressBackbufferKey);
     gIORemoveOnReadProperties = OSSet::withObjects((const OSObject **) &gIOProgressBackbufferKey, 1);