DragonFly On-Line Manual Pages

Search: Section:  


PNP(4)		    DragonFly/i386 Kernel Interfaces Manual		PNP(4)

NAME

pnp -- support for PnP devices

SYNOPSIS

controller pnp0

DESCRIPTION

Support for PnP devices in DragonFly allows the user to override the con- figuration of PnP cards, and device drivers to fetch/modify parameters in the card's configuration space. The manual override mechanism requires the kernel to be compiled with options USERCONFIG. In this case, the kernel keeps a table of fixed size (20 entries as a default) where configuration data are held for PnP devices. Each PnP card can contain several independent devices (5 or 6 is not unusual). By booting the kernel with the ``-c'' flag, commands are available to modify the configuration of PnP cards. Commands start with the sequence: pnp CSN LDN where CSN and LDN are the Card Select Number and Logical Device Number associated to the device. Following this sequence any combination of the following commands can be used: irqN line Sets the irq line for interrupt 0 or 1 on the card. Line=0 means the line is unused. drqN n Sets the drq channel used for DMA 0 or 1 on the card. Chan- nel=4 means the channel is unused. portN address Sets the base address for the N-th port's range (N=0..7). address=0 means that the port is not used. memN address Sets the base address for the N-th memory's range (N=0..3). address=0 means that the memory range is not used. bios Makes the PnP device use the configuration set by the BIOS. This is the default, and is generally ok if your BIOS has PnP support. If BIOS is used, then other parameters are ignored except "flags". os Makes the PnP device to use the configuration specified in this entry. enable Enables the PnP device. disable Disables the PnP device. delete Frees the entry used for the device, so that it can be used for another device with a different CSN/LDN pair. flags Sets the value of a 32-bit flags entry which is passed to the device driver. This can be used to set special operation modes (e.g. SB vs. WSS emulation on some sound cards, etc.). The current content of the table can be printed using the ls command in userconfig. In addition to modifications done by the user, the table contains an entry for all logical devices accessed by a PnP device driver. Modifications to the table will be saved to the boot image on the filesystem by the kget(8) command. DEVICE DRIVER SUPPORT FOR PnP PnP devices are automatically recognized and configured by the kernel. A PnP device is identified by the following data structure: struct pnp_device { char *pd_name; char *(*pd_probe ) (u_long csn, u_long vendor_id); void (*pd_attach ) (u_long csn, u_long vend_id, char * name, struct isa_device *dev); u_long *pd_count; u_int *imask; struct isa_device dev; }; The probe routine must check that the vendor_id passed is a recognized one, that any necessary devices on the card are enabled, and returns a NULL value in case of failure or a non-NULL value (generally a pointer to the device name) upon success. In the probe routine, the function read_pnp_parms() can be used to check that the logical devices are enabled. The attach routine should do all the necessary initialization, enable the PnP card to ISA accesses, fetch the configuration, and call the ISA driver for the device.

SEE ALSO

pnpbios(4), kget(8)

HISTORY

The pnp driver first appeared in FreeBSD 2.2.5.

AUTHORS

PnP support was written by Luigi Rizzo, based on initial work done by Sujal Patel.

BUGS

There is no support for visual configuration of PnP devices. It would be nice to have commands in userconfig to fetch the configuration of PnP devices. DragonFly 4.1 September 7, 1997 DragonFly 4.1

Search: Section: