Loading...
--- xnu/xnu-517.7.21/iokit/Kernel/IOStartIOKit.cpp
+++ xnu/xnu-792.10.96/iokit/Kernel/IOStartIOKit.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
@@ -27,6 +27,7 @@
*/
#include <libkern/c++/OSUnserialize.h>
+#include <libkern/version.h>
#include <IOKit/IORegistryEntry.h>
#include <IOKit/IODeviceTreeSupport.h>
#include <IOKit/IOCatalogue.h>
@@ -39,10 +40,12 @@
#include <IOKit/assert.h>
+#include "IOKitKernelInternal.h"
+
extern "C" {
extern void OSlibkernInit (void);
-extern void IOLibInit(void);
+extern void ml_hpet_cfg(uint32_t, uint32_t);
#include <kern/clock.h>
@@ -57,6 +60,7 @@
#ifndef i386
IOService::waitForService(
IOService::resourceMatching("IONVRAM"), &t );
+
#endif
clock_initialize_calendar();
@@ -76,8 +80,6 @@
OSDictionary * fakeKmods; // must release
OSCollectionIterator * kmodIter; // must release
OSString * kmodName; // don't release
-
- IOLog( iokit_version );
if( PE_parse_boot_arg( "io", &debugFlags ))
gIOKitDebug = debugFlags;
@@ -126,8 +128,13 @@
"an invalid version.\n",
kmodName->getCStringNoCopy());
}
- if (KERN_SUCCESS != kmod_create_fake(kmodName->getCStringNoCopy(),
- kmodVersion->getCStringNoCopy())) {
+
+ // empty version strings get replaced with current kernel version
+ const char *vers = (strlen(kmodVersion->getCStringNoCopy())
+ ? kmodVersion->getCStringNoCopy()
+ : osrelease);
+
+ if (KERN_SUCCESS != kmod_create_fake(kmodName->getCStringNoCopy(), vers)) {
panic("Failure declaring in-kernel kmod \"%s\".\n",
kmodName->getCStringNoCopy());
}
@@ -145,7 +152,7 @@
IOUserClient::initialize();
IOMemoryDescriptor::initialize();
- obj = OSString::withCString( iokit_version );
+ obj = OSString::withCString( version );
assert( obj );
if( obj ) {
root->setProperty( kIOKitBuildVersionKey, obj );