FreeBSD Device Driver Writer's Guide : Linking Into the Kernel. : Standard Model : Adding your device to the config file.
Previous: Make room in conf.c
Next: config(8)

4.1.3. Adding your device to the config file.

This is simply adding a line describing your device. The joystick description line is:

device          joy0    at isa? port "IO_GAME"
This says we have a device called ``joy0'' on the isa bus using io-port ``IO_GAME'' (IO_GAME is a macro defined in /usr/src/sys/i386/isa/isa.h).

A slightly more complicated entry is for the ``ix'' driver:

device ix0 at isa? port 0x300 net irq 10 iomem 0xd0000 iosiz 32768 vector ixintr
This says that we have a device called `ix0' on the ISA bus. It uses io-port 0x300. It's interrupt will be masked with other devices in the network class. It uses interrupt 10. It uses 32k of shared memory at physical address 0xd0000. It also defines it's interrupt handler to be ``ixintr()''


FreeBSD Device Driver Writer's Guide : Linking Into the Kernel. : Standard Model : Adding your device to the config file.
Previous: Make room in conf.c
Next: config(8)
freebsd-questions@freebsd.org