]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOStartIOKit.cpp
xnu-1699.24.23.tar.gz
[apple/xnu.git] / iokit / Kernel / IOStartIOKit.cpp
index 7b70541d6486089b04e756e859add89749f4cc52..49397d4cb0ad0f300c2417926b7e9abe8e0cba4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2011 Apple Inc. All rights reserved.
+ * Copyright (c) 1998-2010 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
 #include <IOKit/IOLib.h>
 #include <IOKit/IOKitKeys.h>
 #include <IOKit/IOKitDebug.h>
+#include <IOKit/pwr_mgt/RootDomain.h>
 #include <IOKit/pwr_mgt/IOPMinformeeList.h>
+#include <IOKit/IOStatisticsPrivate.h>
+#include <IOKit/IOKitKeysPrivate.h>
 
 #include <IOKit/assert.h>
 
@@ -61,7 +64,7 @@ void IOKitInitializeTime( void )
        t.tv_nsec = 0;
        IOService::waitForService(
                IOService::resourceMatching("IORTC"), &t );
-#ifdef ppc
+#if defined(__i386__) || defined(__x86_64__)
        IOService::waitForService(
                IOService::resourceMatching("IONVRAM"), &t );
 #endif
@@ -79,6 +82,8 @@ void IOKitResetTime( void )
     clock_get_calendar_microtime(&secs, &microsecs);
     gIOLastWakeTime.tv_sec  = secs;
     gIOLastWakeTime.tv_usec = microsecs;
+
+    IOService::updateConsoleUsers(NULL, kIOMessageSystemHasPoweredOn);
 }
 
 void iokit_post_constructor_init(void)
@@ -90,8 +95,11 @@ void iokit_post_constructor_init(void)
     assert( root );
     IOService::initialize();
     IOCatalogue::initialize();
+    IOStatistics::initialize();
+    OSKext::initialize();
     IOUserClient::initialize();
     IOMemoryDescriptor::initialize();
+    IORootParent::initialize();
 
     // Initializes IOPMinformeeList class-wide shared lock
     IOPMinformeeList::getSharedRecursiveLock();
@@ -107,7 +115,6 @@ void iokit_post_constructor_init(void)
         root->setProperty( kIOKitDiagnosticsKey, obj );
        obj->release();
     }
-
 }
 
 // From <osfmk/kern/debug.c>
@@ -122,24 +129,20 @@ void StartIOKit( void * p1, void * p2, void * p3, void * p4 )
 {
     IOPlatformExpertDevice *   rootNub;
     int                                debugFlags;
-       uint32_t                intThreshold;
 
     if( PE_parse_boot_argn( "io", &debugFlags, sizeof (debugFlags) ))
-       gIOKitDebug = debugFlags;
-
+               gIOKitDebug = debugFlags;
+       
     if( PE_parse_boot_argn( "iotrace", &debugFlags, sizeof (debugFlags) ))
                gIOKitTrace = debugFlags;
        
        // Compat for boot-args
        gIOKitTrace |= (gIOKitDebug & kIOTraceCompatBootArgs);
-
-    if( PE_parse_boot_argn( "iointthreshold", &intThreshold, sizeof (intThreshold) ))
-               gIOInterruptThresholdNS = intThreshold * 1000;
        
     // Check for the log synchronous bit set in io
     if (gIOKitDebug & kIOLogSynchronous)
         debug_mode = true;
-       
+
     //
     // Have to start IOKit environment before we attempt to start
     // the C++ runtime environment.  At some stage we have to clean up