Loading...
iokit/Kernel/IODeviceTreeSupport.cpp xnu-12377.121.6 xnu-8792.81.2
--- xnu/xnu-12377.121.6/iokit/Kernel/IODeviceTreeSupport.cpp
+++ xnu/xnu-8792.81.2/iokit/Kernel/IODeviceTreeSupport.cpp
@@ -95,8 +95,6 @@
 const OSSymbol *        gIODTInterruptParentKey;
 const OSSymbol *        gIODTNWInterruptMappingKey;
 
-const OSData *          gIODTAssociatedServiceKey;
-
 OSDictionary   *        gIODTSharedInterrupts;
 
 static IORegistryEntry * MakeReferenceTable( DTEntry dtEntry, bool copy );
@@ -126,8 +124,6 @@
 	bool                        intMap;
 	bool                        foundDTNode;
 	bool                        freeDT;
-	char                        exBootArg[64];
-	const char *                found;
 
 	gIODTPlane = IORegistryEntry::makePlane( kIODeviceTreePlane );
 
@@ -142,8 +138,6 @@
 	gIODTAddressCellKey = OSSymbol::withCStringNoCopy( "#address-cells" );
 	gIODTRangeKey               = OSSymbol::withCStringNoCopy( "ranges" );
 	gIODTPersistKey             = OSSymbol::withCStringNoCopy( "IODTPersist" );
-	gIODTAssociatedServiceKey   = OSData::withBytesNoCopy((void *) kIODTAssociatedServiceKey, sizeof(kIODTAssociatedServiceKey));
-
 
 	assert(    gIODTPlane && gIODTCompatibleKey
 	    && gIODTTypeKey && gIODTModelKey
@@ -171,10 +165,6 @@
 	gIODTResolvers->alloc     = 2;
 	gIODTResolvers->resolvers = IONewZero(IODTPersistent, gIODTResolvers->alloc);
 	gIODTResolvers->lock      = IOLockAlloc();
-
-	if (!PE_parse_boot_argn("exp", exBootArg, sizeof(exBootArg))) {
-		exBootArg[0] = '\0';
-	}
 
 	gIODTInterruptCellKey
 	        = OSSymbol::withCStringNoCopy("#interrupt-cells");
@@ -208,23 +198,6 @@
 			child->attachToParent( parent, gIODTPlane);
 
 			AddPHandle( child );
-			// E.g. exp=sgx:3 or exp=sgx:3,5
-			if ((found = strnstr(exBootArg, child->getName(), sizeof(exBootArg)))) {
-				child->setProperty(gIOExclaveAssignedKey, kOSBooleanTrue);
-				uint32_t ep = 0;
-				uint32_t edk_ep = 0;
-				found += strlen(child->getName());
-				if (':' == *found) {
-					char *end;
-					ep = (uint32_t) strtol(found + 1, &end, 0);
-					// Check for optional edk endpoint
-					if (',' == *end) {
-						edk_ep = (uint32_t) strtol(end + 1, &end, 0);
-						child->setProperty("exclave-edk-endpoint", &edk_ep, sizeof(edk_ep));
-					}
-				}
-				child->setProperty("exclave-endpoint", &ep, sizeof(ep));
-			}
 
 			if (kSuccess == SecureDTEnterEntry( &iter, dtChild)) {
 				stack->setObject( parent);
@@ -462,13 +435,9 @@
 			}
 			assert( nameKey && data );
 
-#if DEVELOPMENT || DEBUG
-#pragma unused(kernelOnly)
-#else
 			if (kernelOnly) {
 				data->setSerializable(false);
 			}
-#endif
 
 			propTable->setObject( nameKey, data);
 			data->release();
@@ -1023,7 +992,7 @@
 	return result;
 }
 
-LIBKERN_RETURNS_RETAINED OSCollectionIterator *
+OSCollectionIterator *
 IODTFindMatchingEntries( IORegistryEntry * from,
     IOOptionBits options, const char * keys )
 {
@@ -1050,12 +1019,10 @@
 			iter->reset();
 			while ((next = iter->getNextObject())) {
 				// Look for existence of a debug property to skip
-				if (next->propertyExists("AAPL,ignore")) {
+				if (next->getProperty("AAPL,ignore")) {
 					continue;
 				}
-				if (next->propertyHasValue(gIODTTypeKey, gIODTAssociatedServiceKey)) {
-					continue;
-				}
+
 				if (keys) {
 					cmp = IODTMatchNubWithKeys( next, keys );
 					if ((minus && (false == cmp))