Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matching for a shim driver



Godfrey van der Linden writes:

Wow!  Thank you for the detailed response.  Here is my first round of
questions.  Please bear with me.  I'm a clueless moron when it comes
to IOKit..

 > Here you probably would just have a single property to compare that is 
 > some sort of type of the nub, I suggest a property like { 
 > edu_duke_cs_NubType = Ethernet; }.  Your implementation of 
 > matchPropertyTable would then come down to (This is all of the matching 
 > you need for a single key match, pretty cool huh!)


This {edu_duke_cs_NubType = Ethernet; } somehow ends up in xml
in the edu_duke_cs_MPIEthernet.kext/Info.plist file, right?


 > 
 > bool edu_duke_cs_MPINub::
 > matchPropertyTable(OSDictionary *table)
 > {
 >      if (!super::matchPropertyTable(table))
 > 	return false;
 >      else
 > 	return compareProperty(table, gMPINubTypeKey);
 > }


This gets called by the matching system automatically, right?
All I need to do is override this function to have it called?
And gMPINubTypeKey is just a string, yes?


 >      // Get the master nub creation table from our properties
 >      // BTW there is no need to do a copyProperty as we can rely on our 
 > properties
 >      // being valid until we return from start, after that all bets are 
 > basically off though
 >      // you have been warned.
 >      OSArray *nubList = OSDynamicCast(OSArray, 
 > getProperties(gMPIMasterNubListKey));

This (magically) comes from some xml in the
edu_duke_cs_MPIMaster.kext/Info.plist, right?


 > 4> Kext On Disk Structure
 >      edu_duke_cs_MPIFamily.kext
 > 	Contents
 > 		edu_duke_cs_MPIMaster.kext
 > 		    Contents
 > 			Info.plist	# Contains the Master's matching property and the Nub list
 > 			MacOS
 > 			    edu_duke_cs_MPIMaster
 > 		edu_duke_cs_MPIEthernet.kext
 > 		    Contents
 > 			Info.plist	# Contains the Nub's matching property OSBundleRequired 


It would help me tremendously if you could give examples of what the
matching properties and the nub lists should look like in xml.  This is
something that I've never been able to figure out (I pass parameters
to my current driver via nvram.. PE_parse_boot_arg())

Thanks,

Drew
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden

References: 
 >matching for a shim driver (From: Andrew Gallatin <email@hidden>)
 >Re: matching for a shim driver (From: Godfrey van der Linden <email@hidden>)
 >Re: matching for a shim driver (From: Andrew Gallatin <email@hidden>)
 >Re: matching for a shim driver (From: Godfrey van der Linden <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.