Driver configuration files pass information about device drivers and their configuration to the system. Most device drivers do not have to have configuration
files. Drivers for devices that are self-identifying, such as the SBus devices on many systems, can usually obtain all the information they need from the FCode PROM on the SBus card using the DDI property interfaces. See ddi_prop_get_int(9F) and ddi_prop_lookup(9F)
for details.
The system associates a driver with its configuration file by name. For example, a driver in /usr/kernel/drv called wombat has the driver configuration file wombat.conf, also stored in /usr/kernel/drv, associated with
it. On systems capable of support 64-bit drivers, the driver configuration file should be placed in the directory in which the 32-bit driver is (or would be) located, even if only a 64-bit version is provided. For example, a 64-bit driver stored in /usr/kernel/drv/sparcv9
stores its driver configuration file in /usr/kernel/drv.
The value of the name property (see the name field, below) needs to match the binding name of the device. The binding name is the name chosen by the system to bind a driver to a device and is either an alias associated with the driver or the hardware node name
of the device.
The syntax of a single entry in a driver configuration file takes one of three forms:
|
name="node name" parent="parent name" [property-name=value ...];
|
In this form, the parent name can be either a simple nexus driver name to match all instances of that parent/node, or the parent name can be a specific full pathname, beginning with a slash (/) character, identifying a specific instance of a parent bus.
Alternatively, the parent can be specified by the type of interface it presents to its children.
|
name="node name" class="class name" [property-name=value ...];
|
For example, the driver for the SCSI host adapter may have different names on different platforms, but the target drivers can use class scsi to insulate themselves from these differences.
Entries of either form above correspond to a device information (devinfo) node in the kernel device tree. Each node has a name which is usually the name of the driver, and a parent name which is the name of the parent devinfo node it will be connected to. Any number of name-value pairs may be specified to create properties on the prototype devinfo node. These properties can be retrieved using the DDI property interfaces (for example, ddi_prop_get_int(9F) and ddi_prop_lookup(9F)). The prototype devinfo node specification must be terminated with a semicolon (;).
The third form of an entry is simply a list of properties.
|
[property-name=value ...];
|
A property created in this way is treated as global to the driver. It can be overridden by a property with the same name on a particular devinfo node, either by creating one explicitly on the prototype node in the driver.conf file or by the driver.
Items are separated by any number of newlines, SPACE or TAB characters.
The configuration file may contain several entries to specify different device configurations and parent nodes. The system may call the driver for each possible prototype devinfo node, and it is generally the responsibility of the drivers probe(9E) routine to determine if the hardware described by the prototype devinfo node is really present.
Property names must not violate the naming conventions for Open Boot PROM properties or for IEEE 1275 names. In particular, property names should contain only printable characters, and should not contain at-sign (@), slash (/), backslash (\),
colon (:), or square brackets ([]). Property values can be decimal integers or strings delimited by double quotes ("). Hexadecimal integers can be constructed by prefixing the digits with 0x.
A comma separated list of integers can be used to construct properties whose value is an integer array. The value of such properties can be retrieved inside the driver using ddi_prop_lookup_int_array(9F).
Comments are specified by placing a # character at the beginning of the comment string, the comment string extends for the rest of the line.
|