X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/fe8ab488e9161c46dd9885d58fc52996dc0249ff..a39ff7e25e19b3a8c3020042a3872ca9ec9659f1:/iokit/Kernel/IOStartIOKit.cpp?ds=inline diff --git a/iokit/Kernel/IOStartIOKit.cpp b/iokit/Kernel/IOStartIOKit.cpp index 787a69bf2..6eb48b713 100644 --- a/iokit/Kernel/IOStartIOKit.cpp +++ b/iokit/Kernel/IOStartIOKit.cpp @@ -43,8 +43,8 @@ #include #include #include - #include +#include #include "IOKitKernelInternal.h" @@ -53,6 +53,10 @@ 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); void iokit_post_constructor_init(void); @@ -73,21 +77,7 @@ void IOKitInitializeTime( void ) IOService::resourceMatching("IONVRAM"), &t ); #endif - clock_initialize_calendar(); -} - -void IOKitResetTime( void ) -{ - clock_sec_t secs; - clock_usec_t microsecs; - - clock_initialize_calendar(); - - clock_get_calendar_microtime(&secs, µsecs); - gIOLastWakeTime.tv_sec = secs; - gIOLastWakeTime.tv_usec = microsecs; - - IOService::updateConsoleUsers(NULL, kIOMessageSystemHasPoweredOn); + clock_initialize_calendar(); } void iokit_post_constructor_init(void) @@ -95,6 +85,7 @@ void iokit_post_constructor_init(void) IORegistryEntry * root; OSObject * obj; + IOCPUInitialize(); root = IORegistryEntry::initialize(); assert( root ); IOService::initialize(); @@ -121,9 +112,6 @@ void iokit_post_constructor_init(void) } } -// From -extern int debug_mode; - /***** * Pointer into bootstrap KLD segment for functions never used past startup. */ @@ -135,18 +123,19 @@ void StartIOKit( void * p1, void * p2, void * p3, void * p4 ) int debugFlags; if( PE_parse_boot_argn( "io", &debugFlags, sizeof (debugFlags) )) - gIOKitDebug = debugFlags; + gIOKitDebug = debugFlags; +#if DEVELOPMENT || DEBUG + else gIOKitDebug |= kIOWaitQuietPanics; +#endif /* DEVELOPMENT || DEBUG */ if( PE_parse_boot_argn( "iotrace", &debugFlags, sizeof (debugFlags) )) - gIOKitTrace = debugFlags; + gIOKitTrace = debugFlags; - // Compat for boot-args - gIOKitTrace |= (gIOKitDebug & kIOTraceCompatBootArgs); + // 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; // // Have to start IOKit environment before we attempt to start // the C++ runtime environment. At some stage we have to clean up @@ -156,6 +145,7 @@ void StartIOKit( void * p1, void * p2, void * p3, void * p4 ) // IOLibInit(); OSlibkernInit(); + devsw_init(); gIOProgressBackbufferKey = OSSymbol::withCStringNoCopy(kIOProgressBackbufferKey); gIORemoveOnReadProperties = OSSet::withObjects((const OSObject **) &gIOProgressBackbufferKey, 1);