2.5  Associating the Hardware with the Driver

Operating systems differ in the ways they associate a device with a specific driver.

In Windows, the hardware–driver association is performed via an INF file, which registers the device to work with the driver. This association is performed before the DriverEntry() routine is called. The operating system recognizes the device, checks its database to identify which INF file is associated with the device, and according to the INF file, calls the driver's entry point.

In Mac OS X, the hardware–driver association is performed via an Info.plist file, which resides in the driver's kernel extension folder (*.kext) and contains the required information regarding which hardware to associate with the driver.
As in Windows, this association is performed before the DriverEntry() routine is called. The operating system recognizes the device, identifies the Info.plist file associated with this device, and proceeds to call the relevant driver entry point.

In Linux, the hardware–driver association is defined in the driver's init_module() routine. This routine includes a callback that indicates which hardware the driver is designated to handle. The operating system calls the driver's entry point, based on the definition in the code.