HwProbe description syntax


Purpose

The HwProbe is a generalized agent to handle access to the libhd hardware autoprobe library.

Implementation

The HwProbe probes the hardware when needed. There is no (more) probing at initialization time. It's the sole responsibility of the underlying libhd library to give a consistent view of the hardware.

The libhd data closely resembles the PCI view of hardware, namely classes and subclasses. The class data is extended to included ISAPnP and other non-PCI hardware. However, this implementation detail is transparently mapped.

Hardware probing repository paths

The hardware probing repository is accessed with the path prefix .probe followed by sub-paths.

A list of possible sub-paths can be retrieved with Dir (.probe) which currently results in:

(["has_pcmcia", "architecture", "boot_arch", "version", "boot_disk",
"cdb_isdn", "has_smp", "bios_video", "framebuffer", "status", "cdrom",
"floppy", "disk", "netif", "display", "mouse", "keyboard", "sound", "isdn",
"modem", "storage", "netcard", "monitor", "printer", "tv", "scanner",
"system", "camera", "chipcard", "usbctrl", "hub", "scsi", "ide", "memory",
"fbdev", "usb", "pci", "isapnp", "cpu", "braille", "joystick", "bios"])

There exists a useful ycp script source/tools/probeall.ycp which probes and displays everything.

Explanation of .probe paths

pathtyperesultcomment
.probe.cdrom YCPList list of hd-entries only returns component data for cd-rom like devices (cd-r, cd-rw, dvd)
.probe.disk YCPList list of hd-entries only returns component data for disk like devices (harddisk, *not* floppy !)
.probe.net YCPList list of hd-entries only returns component data for network like devices (ethernet, loopback (!), dummy (!))
.probe.has_pcmcia YCPBoolean true if the system has a pcmcia controller, false else used to decide if pcmcia software is to be installed and how
.probe.has_eide YCPBoolean true if the system has a special EIDE controller, false else used to decide if a special kernel (with compiled-in driver) is to be installed
.probe.architecture YCPString reports the system architecture, i.e. "intel" or "alpha"
.probe.boot_arch YCPString
.probe.system YCPString reports the system type if given, else "" (i.e. "MacRISC", "PReP", or "CHRP" on PPC)
.probe.modem YCPList list of modems
.probe.isdn YCPList list of isdn cards
.probe.dsl YCPList list of DSL cards
.probe.netcard YCPList list of network cards

General layout of a hd-entry

As stated above, most Read(.probe) calls return a list of entries matching a specific feature. All these entries have a common layout (i.e. vendor-id) and some device specific data (i.e. geometry for harddisks, hsync/vsync values for video monitors, etc.)
This chapter explains the general layout.

Each entry is a YCPMap with the following key/value pairs

Important: Always check for the existence of a key/value pair !!!

keytypevaluecomment
brokenBooleantruehardware seems broken
cardtypeStringAGPpci card in agp slot
cardtypeStringPnPPnP device
busString(see below)name of bus
baseclassString(see below)name of baseclass
subclassString(see below)name of subclass
class_idInteger(see libhd)baseclass id
sub_class_idInteger(see libhd)subclass id
deviceStringname of deviceuser readable format
vendorStringname of vendoruser readable format
sub_deviceStringname of subdeviceuser readable format
sub_vendorStringname of subvendoruser readable format
device_idIntegervalue of deviceinternal format
vendor_idIntegervalue of vendorinternal format
sub_device_idIntegervalue of subdeviceinternal format
sub_vendor_idIntegervalue of subvendorinternal format
unique_keyStringunique key for every hardware itemconsists of two parts: a position/slot dependent part and one that is independent of the location of the card/device. They are separated by a '.' (dot)
revStringrevision coderevision code is an integer
compat_deviceStringname of compatible deviceonly used for ISA-PnP
compat_vendorStringname of compatible vendoronly used for ISA-PnP
attached_toMaprecursivecomplete data of device
dev_nameString/dev/xxxassociated device file
driver infoMap(see below)device specific driver information
resourceMap(see below)Map of resources used/needed by device

Possible driver info

As driver info the following keys are defined

module
keytypevaluecomment
nameStringmodulename of driver/module
activeBooleantrueif module is already loaded
modprobeBooleantrue/falseif modprobe or insmod is to be used for loading
argsStringmodule argumentsarguments used for loading module
confStringconf.modules entrydata for conf.modules

mouse

keytypevaluecomment
xf86StringXF86Config entry
gpmStringgpm parameter

x11

keytypevaluecomment
serverStringX11 servermight not be present in map (voodoo 1/2 special add ons don't need a server)
versionStringX11 server version"3" ("server" is XFree 3.3.x Server) or "4" ("server" is XFree 4.x module)
has_3dBoolean3d accel hardware present
c8Booleantrue/false8 bpp support
c15Booleantrue/false15 bpp support
c16Booleantrue/false16 bpp support
c24Booleantrue/false24 bpp support
c32Booleantrue/false32 bpp support
dacspeedInteger(value in MHz)
packagesList (of Strings)additional packages to installif applicable
extensionsList (of Strings)additional X extensions to loadusually goes to 'Module' section, i.e. "glx.so"
optionsList (of Strings)special server optionsusually goes to 'Device' section, i.e. "no_accel"
rawStringextra info to add to XF86Configto be inserted into 'Device' section

display

keytypevaluecomment
widthInteger
heightInteger
min_vsyncInteger
max_vsyncInteger
min_hsyncInteger
max_hsyncInteger
bandwidthInteger

dsl

keytypevaluecomment
nameStringdriver name
modeStringcapiadsl, pppoe