ISA plug-n-play device support (July 8 Snapshot) This is BETA quality code Here is a quick summary of what you need to do.. Sorry for the ugliness, but I'm working on complete auto-configuration of PnP devices (until then you'll need to do manual configuration, but it will work): Here is a manifest of what you'll find in ftp://freefall.freebsd.org/incoming/ISA_PnP.June6.tar.gz: README kernel.patch.2.1.5 Apply kernel patch from /usr/src with "patch -p0" kernel.patch.2.2-current Apply kernel patch from /usr/src/sys with "patch -p0" pnpinfo This will show your PnP devices (run 'make' in this directory) README You're reading it :-) When patching your kernel do it like this: cd /usr/src (or /usr/src/sys if you're 2.2-current) patch -p0 < kernel_patch You'll need to put "controller pnp0" in your kernel config (but do not change any of the device entries to reference the controller pnp). You'll also need to edit pnp.c's configuration information (since it only supports manual configuration right now). The structure looks like: /* Configuration for the Supra Express 288i PnP */ { 0x00008803, /* Serial Number */ -1, /* Logical Device Number */ { { 15, -1 }, /* Primary IRQ Number, Type */ { -1, -1 } /* Second IRQ Number, Type */ }, { -1, -1 }, /* DRQ Number */ { 0x3e8, /* Ports 1 */ -1, /* Ports 2 */ -1, /* Ports 3 */ -1, /* Ports 4 */ -1, /* Ports 5 */ -1, /* Ports 6 */ -1, /* Ports 7 */ -1, /* Ports 8 */ }, { { -1, -1, -1 }, /* Memory desc0 - base, ctrl, range */ { -1, -1, -1 }, /* Memory desc1 - base, ctrl, range */ { -1, -1, -1 }, /* Memory desc2 - base, ctrl, range */ { -1, -1, -1 } /* Memory desc3 - base, ctrl, range */ } } *** OR LIKE THIS *** /* Configuration for the SMC EtherEZ */ { 0xb1f5acc0, /* Serial Number */ -1, /* Logical Device Number */ { { 11, 1 }, /* Primary IRQ Number, Type */ { -1, -1 } /* Second IRQ Number, Type */ }, { -1, -1 }, /* DRQ Number */ { 0x240, /* Ports 1 */ -1, /* Ports 2 */ -1, /* Ports 3 */ -1, /* Ports 4 */ -1, /* Ports 5 */ -1, /* Ports 6 */ -1, /* Ports 7 */ -1, /* Ports 8 */ }, { { 0xd0000, 2, 0x2000 }, /* Memory desc0 - base, ctrl, range */ { -1, -1, -1 }, /* Memory desc1 - base, ctrl, range */ { -1, -1, -1 }, /* Memory desc2 - base, ctrl, range */ { -1, -1, -1 } /* Memory desc3 - base, ctrl, range */ } } } Just change the Serial Number, and other parameters to match what 'pnpinfo' says about your device. As a general rule, if 'pnpinfo' reports something, it MUSt be configured (i.e. if it says that the IRQ supports type "High true edge sensitive", then you MUST specify this in the configuration above). If 'pnpinfo' fails to report extra information (such as IRQ type) or you're not sure about what to do, then use "-1". Here are some specfic details about the fields in the configuration structure: Logical Device Number: This should be 0,1,2,3,4, etc. The number is directly related to the order that 'pnpinfo' reports the logical device. This should be "-1" if there is only one loglcal device. Memory desc: The first argument (base) is the base address for the memory range. The second (ctrl) should be "2" to indicate 16-bit memory OR "0" to indicate 8-bit memory. The third argument (range) should be the memory range's length IF AND ONLY IF 'pnpinfo' reported "Decode supports range length", otherwise this argument is the memory range's upper limit address. Note: All memory address are to be listed as an offset from memory location 0, NOT as a segment address (i.e. you want an address such as 0xd0000) IRQ Types: 0 = Low level, edge triggered 1 = Low level, level triggered 2 = High level, edge triggered 3 = High level, level triggered 32-bit Memory ranges: Are not supported, email me if you need support for this (I've just been too lazy to implement it since it's really messy and I don't think any devices use it yet :-). If all goes well, it should say that it configured your device on boot up. You may need to fiddle with this a bit, since I those patches are against -current. Lemme know how it goes or if you have any problems. This stuff should support 99.99% of ISA PnP devices. This code is known to work on the following: SoundBlaster 16 PnP Supra PnP modems Cardinal PnP modems SMC EtherEz (PnP versions) GUS Ultrasound PnP (Requires special init code, not provided) 3Com 3C509B EtherLink III Last minute side notes: Running 'pnpinfo' may briefly interrupt the operation of your PnP device, use it with care. If you have any questions or comments, please mail smpatel@freebsd.org AND hackers@freebsd.org (or questions@freebsd.org for very basic questions) Sujal smpatel@freebsd.org