Date: Mon, 12 Jun 1995 14:08:18 +0200 From: esser@zpr.uni-koeln.de (Stefan Esser) To: hackers@freebsd.org Subject: Please give feedback: New PCI configuration mechanism test Message-ID: <199506121208.AA25186@FileServ1.MI.Uni-Koeln.DE>
next in thread | raw e-mail | index | archive | help
After some problems with the "Compaq Prosignia 300" I've taken a look at the PCI specification rev. 2.0 (don't have 2.1, yet, anybody able to check for major differences between 2.0 and 2.1 regarding configuration space accesses and especially changes to chapters 3.6.4.1.x). The following patch should be tested on as many PCI motherboards as possible, since I don't want to break PCI support for old systems with this patch. I've tested it on a Saturn based i486 system and will try it on a Pentium later today. Please report any problems with this patch ! There is a slight chance, that a chip set that supports PCI configuration mechanism 2 will be erroneously detected as supporting mechanism 1. If a PCI system stops working with this patch, I'd like to receive boot messages as written by the working (i.e. unpatched) kernel. Thanks in advance! STefan Index: /sys/i386/isa/pcibus.c =================================================================== RCS file: /usr/cvs/src/sys/i386/isa/pcibus.c,v retrieving revision 1.8 diff -C2 -r1.8 pcibus.c *** 1.8 1995/03/22 21:35:39 --- pcibus.c 1995/06/12 09:44:07 *************** *** 140,143 **** --- 140,144 ---- #define CONF1_ENABLE 0x80000000ul + #define CONF1_ENABLE_CHK 0xF0000000ul #define CONF1_ADDR_PORT 0x0cf8 #define CONF1_DATA_PORT 0x0cfc *************** *** 154,170 **** /*--------------------------------------- - ** Configuration mode 2 ? - **--------------------------------------- - */ - - outb (CONF2_ENABLE_PORT, 0); - outb (CONF2_FORWARD_PORT, 0); - if (!inb (CONF2_ENABLE_PORT) && !inb (CONF2_FORWARD_PORT)) { - pci_mechanism = 2; - pci_maxdevice = 16; - return; - }; - - /*--------------------------------------- ** Configuration mode 1 ? **--------------------------------------- --- 155,158 ---- *************** *** 172,176 **** oldval = inl (CONF1_ADDR_PORT); ! outl (CONF1_ADDR_PORT, CONF1_ENABLE); result = inl (CONF1_ADDR_PORT); outl (CONF1_ADDR_PORT, oldval); --- 160,164 ---- oldval = inl (CONF1_ADDR_PORT); ! outl (CONF1_ADDR_PORT, CONF1_ENABLE_CHK); result = inl (CONF1_ADDR_PORT); outl (CONF1_ADDR_PORT, oldval); *************** *** 179,182 **** --- 167,183 ---- pci_mechanism = 1; pci_maxdevice = 32; + return; + }; + + /*--------------------------------------- + ** Configuration mode 2 ? + **--------------------------------------- + */ + + outb (CONF2_ENABLE_PORT, 0); + outb (CONF2_FORWARD_PORT, 0); + if (!inb (CONF2_ENABLE_PORT) && !inb (CONF2_FORWARD_PORT)) { + pci_mechanism = 2; + pci_maxdevice = 16; return; }; -- Stefan Esser Internet: <se@ZPR.Uni-Koeln.DE> Zentrum fuer Paralleles Rechnen Tel: +49 221 4706017 Universitaet zu Koeln FAX: +49 221 4705160 Weyertal 80 50931 Koeln
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506121208.AA25186>