Loading...
--- xnu/xnu-3248.50.21/iokit/Kernel/IOStartIOKit.cpp
+++ xnu/xnu-1504.7.4/iokit/Kernel/IOStartIOKit.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2010 Apple Inc. All rights reserved.
+ * Copyright (c) 1998-2008 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
@@ -25,6 +25,12 @@
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
+/*
+ * Copyright (c) 1998,1999 Apple Inc. All rights reserved.
+ *
+ * HISTORY
+ *
+ */
#include <libkern/c++/OSUnserialize.h>
#include <libkern/c++/OSKext.h>
@@ -38,24 +44,17 @@
#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/IOInterruptAccountingPrivate.h>
#include <IOKit/assert.h>
#include "IOKitKernelInternal.h"
-const OSSymbol * gIOProgressBackbufferKey;
-OSSet * gIORemoveOnReadProperties;
-
extern "C" {
extern void OSlibkernInit (void);
-void iokit_post_constructor_init(void);
+void iokit_post_constructor_init(void) __attribute__((section("__TEXT, initcode")));
#include <kern/clock.h>
#include <sys/time.h>
@@ -68,7 +67,7 @@
t.tv_nsec = 0;
IOService::waitForService(
IOService::resourceMatching("IORTC"), &t );
-#if defined(__i386__) || defined(__x86_64__)
+#ifdef ppc
IOService::waitForService(
IOService::resourceMatching("IONVRAM"), &t );
#endif
@@ -76,21 +75,29 @@
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;
+}
+
void iokit_post_constructor_init(void)
{
IORegistryEntry * root;
OSObject * obj;
- IOCPUInitialize();
root = IORegistryEntry::initialize();
assert( root );
IOService::initialize();
IOCatalogue::initialize();
- IOStatistics::initialize();
- OSKext::initialize();
IOUserClient::initialize();
IOMemoryDescriptor::initialize();
- IORootParent::initialize();
// Initializes IOPMinformeeList class-wide shared lock
IOPMinformeeList::getSharedRecursiveLock();
@@ -106,6 +113,7 @@
root->setProperty( kIOKitDiagnosticsKey, obj );
obj->release();
}
+
}
// From <osfmk/kern/debug.c>
@@ -123,22 +131,11 @@
if( PE_parse_boot_argn( "io", &debugFlags, sizeof (debugFlags) ))
gIOKitDebug = debugFlags;
-#if DEVELOPMENT || DEBUG
- else gIOKitDebug |= kIOWaitQuietPanics;
-#endif /* DEVELOPMENT || DEBUG */
-
- if( PE_parse_boot_argn( "iotrace", &debugFlags, sizeof (debugFlags) ))
- gIOKitTrace = debugFlags;
-
- // 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
@@ -148,11 +145,6 @@
//
IOLibInit();
OSlibkernInit();
-
- gIOProgressBackbufferKey = OSSymbol::withCStringNoCopy(kIOProgressBackbufferKey);
- gIORemoveOnReadProperties = OSSet::withObjects((const OSObject **) &gIOProgressBackbufferKey, 1);
-
- interruptAccountingInit();
rootNub = new IOPlatformExpertDevice;
@@ -195,17 +187,4 @@
return;
}
-void
-IORecordProgressBackbuffer(void * buffer, size_t size, uint32_t theme)
-{
- IORegistryEntry * chosen;
- if ((chosen = IORegistryEntry::fromPath(kIODeviceTreePlane ":/chosen")))
- {
- chosen->setProperty(kIOProgressBackbufferKey, buffer, size);
- chosen->setProperty(kIOProgressColorThemeKey, theme, 32);
-
- chosen->release();
- }
-}
-
}; /* extern "C" */