ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IOCatalogue |
Inherits from: | |
Declared In: |
In-kernel database for IOKit driver personalities.
The IOCatalogue is a database which contains all IOKit driver personalities. IOService uses this resource when matching devices to their associated drivers.
Adds an array of driver personalities to the database.
Records an archive of extensions, as from device ROM.
This function is currently for internal use. Kernel extensions should never call it.
This is the primary entry point for IOService.
A more general purpose interface which allows one to retreive driver personalities based the intersection of the 'matching' dictionary and the personality's own property list.
Cleans up the database and deallocates memory allocated at initialization. This is never called in normal operation of the system.
Get the current generation count of the database.
Initializes the database object.
Creates and initializes the database object and poputates it with in-kernel driver personalities.
Reports if a kernel module has been loaded for a particular personality.
Reports if a kernel module has been loaded.
Reports if a kernel module has been loaded.
Callback function called after a IOKit dependent kernel module is loaded.
Callback function called after a IOKit dependent kernel module is loaded.
Records extensions made available by the primary booter.
This function is for internal use by the kernel startup linker. Kernel extensions should never call it.
Remove driver personalities from the database based on matching information provided.
Removes from memory all code and data related to boot-time loading of kernel extensions. kextd triggers this when it first starts in order to pass responsibility for loading extensions from the kernel itself to kextd.
Return the Catalogue to its initial state.
Serializes the catalog for transport to the user.
Starts an IOService matching thread where matching keys and values are provided by the matching dictionary.
Terminates all instances of a driver which match the contents of the matching dictionary. Does not unload module.
Terminates all instances of a driver which depends on a particular module and unloads the module.
Terminates all instances of a driver which depends on a particular module and unloads the module.
Unloads the reqested module if no driver instances are currently depending on it.
addDrivers |
Adds an array of driver personalities to the database.
public
bool addDrivers( OSArray *array, bool doNubMatching = true );
array
Array of driver personalities to be added to the database.
doNubMatchng
Start matching process after personalities have been added.
Returns true if driver personality was added to the database successfully. Failure is due to a memory allocation failure.
addExtensionsFromArchive |
Records an archive of extensions, as from device ROM.
This function is currently for internal use. Kernel extensions should never call it.
public
virtual bool addExtensionsFromArchive( OSData *mkext);
mkext
An OSData object containing a multikext archive.
Returns true if mkext was properly unserialized and its contents recorded, false if not.
findDrivers(IOService *, SInt32 *) |
This is the primary entry point for IOService.
public
OSOrderedSet * findDrivers( IOService *service, SInt32 *generationCount );
service
generationCount
Returns a reference to the generation count of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated.
Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver.
findDrivers(OSDictionary *, SInt32 *) |
A more general purpose interface which allows one to retreive driver personalities based the intersection of the 'matching' dictionary and the personality's own property list.
public
OSOrderedSet * findDrivers( OSDictionary *matching, SInt32 *generationCount );
matching
A dictionary containing only keys and values which are to be used for matching. For example, a matching dictionary containing 'IOProviderClass'='IOPCIDevice' will return all personalities with an IOProviderClass key and a value of IOPCIDevice.
generationCount
Returns a reference to the current generation of the database. The generation count increases only when personalities are added to the database *and* IOService matching has been initiated.
Returns an ordered set of driver personalities ranked on probe-scores. The ordered set must be released by the receiver.
free |
Cleans up the database and deallocates memory allocated at initialization. This is never called in normal operation of the system.
public
void free( void );
getGenerationCount |
Get the current generation count of the database.
public
SInt32 getGenerationCount( void ) const;
init |
Initializes the database object.
public
bool init( OSArray *initArray );
initArray
The initial array of driver personalities to populate the database.
initialize |
Creates and initializes the database object and poputates it with in-kernel driver personalities.
public
static void initialize( void );
isModuleLoaded |
Reports if a kernel module has been loaded for a particular personality.
public
bool isModuleLoaded( OSDictionary *driver ) const;
driver
A driver personality's property list.
Returns true if the associated kernel module has been loaded into the kernel for a particular driver personality on which it depends.
isModuleLoaded(const char *) |
Reports if a kernel module has been loaded.
public
bool isModuleLoaded( const char * moduleName ) const;
moduleName
Name of the module.
Returns true if the associated kernel module has been loaded into the kernel.
isModuleLoaded(OSString *) |
Reports if a kernel module has been loaded.
public
bool isModuleLoaded( OSString *moduleName ) const;
moduleName
Name of the module.
Returns true if the associated kernel module has been loaded into the kernel.
moduleHasLoaded(const char *) |
Callback function called after a IOKit dependent kernel module is loaded.
public
void moduleHasLoaded( const char * name );
name
Name of the kernel module.
moduleHasLoaded(OSString *) |
Callback function called after a IOKit dependent kernel module is loaded.
public
void moduleHasLoaded( OSString *name );
name
Name of the kernel module.
recordStartupExtensions |
Records extensions made available by the primary booter.
This function is for internal use by the kernel startup linker. Kernel extensions should never call it.
public
virtual bool recordStartupExtensions( void);
Returns true if startup extensions were successfully recorded, false if not.
removeDrivers |
Remove driver personalities from the database based on matching information provided.
public
bool removeDrivers( OSDictionary *matching, bool doNubMatching = true );
matching
A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will remove all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'.
doNubMatchng
Start matching process after personalities have been removed. Matching criteria is based on IOProviderClass of those personalities which were removed. This is to allow drivers which haven't been matched to match against NUB's which were blocked by the previous personalities.
Returns true if personality was removed successfully. Failure is due to a memory allocation failure.
removeKernelLinker |
Removes from memory all code and data related to boot-time loading of kernel extensions. kextd triggers this when it first starts in order to pass responsibility for loading extensions from the kernel itself to kextd.
public
virtual kern_return_t removeKernelLinker( void);
Returns KERN_SUCCESS if the kernel linker is successfully removed or wasn't present, KERN_FAILURE otherwise.
reset |
Return the Catalogue to its initial state.
public
void reset( void);
serialize |
Serializes the catalog for transport to the user.
public
virtual bool serialize( OSSerialize *s) const;
s
The serializer object.
Returns false if unable to serialize database, most likely due to memory shortage.
startMatching |
Starts an IOService matching thread where matching keys and values are provided by the matching dictionary.
public
bool startMatching( OSDictionary *matching );
matching
A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will start matching for all personalities which have the key 'IOProviderClass' equal to 'IOPCIDevice'.
terminateDrivers |
Terminates all instances of a driver which match the contents of the matching dictionary. Does not unload module.
public
IOReturn terminateDrivers( OSDictionary *matching );
matching
A dictionary whose keys and values are used for matching personalities in the database. For example, a matching dictionary containing a 'IOProviderClass' key with the value 'IOPCIDevice' will cause termination for all instances whose personalities have the key 'IOProviderClass' equal to 'IOPCIDevice'.
terminateDriversForModule(const char *, bool) |
Terminates all instances of a driver which depends on a particular module and unloads the module.
public
IOReturn terminateDriversForModule( const char * moduleName, bool unload = true);
moduleName
Name of the module which is used to determine which driver instances to terminate and unload.
unload
Flag to cause the actual unloading of the module.
terminateDriversForModule(OSString *, bool) |
Terminates all instances of a driver which depends on a particular module and unloads the module.
public
IOReturn terminateDriversForModule( OSString *moduleName, bool unload = true);
moduleName
Name of the module which is used to determine which driver instances to terminate and unload.
unload
Flag to cause the actual unloading of the module.
unloadModule |
Unloads the reqested module if no driver instances are currently depending on it.
private
IOReturn unloadModule( OSString *moduleName ) const;
moduleName
An OSString containing the name of the module to unload.
|
Last Updated: 2008-12-19