From owner-freebsd-current Mon Jun 12 12:50:03 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA18765 for current-outgoing; Mon, 12 Jun 1995 12:50:03 -0700 Received: from FileServ1.MI.Uni-Koeln.DE (FileServ1.MI.Uni-Koeln.DE [134.95.212.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id MAA18729 for ; Mon, 12 Jun 1995 12:49:54 -0700 Received: by FileServ1.MI.Uni-Koeln.DE id AA01970 (5.67b/IDA-1.5 for current@freebsd.org); Mon, 12 Jun 1995 21:49:39 +0200 Message-Id: <199506121949.AA01970@FileServ1.MI.Uni-Koeln.DE> From: esser@ZPR.Uni-Koeln.DE (Stefan Esser) Date: Mon, 12 Jun 1995 21:49:38 +0200 X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: current@FreeBSD.ORG Subject: Please test this PCI bus init patch ... Sender: current-owner@FreeBSD.ORG Precedence: bulk There have been a few reports on newer PCI chip sets not being correctly recognised as using configuration mechanism 1 (the preferred mechnism for all new PCI chip sets). To make FreeBSD boot on these systems, I made a patch to "/sys/i386/isa/pcibus.c", which is expected to correctly determine the configuration mechanism on old and new systems ... I've sent an earlier version of this patch to the "hackers@freebsd.org" list and got some feedback, leading to one further small modification. Please test this patch on all PCI systems you use, to make sure your system will continue to work after this patch goes into FreeBSD-current ! 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 19:04:50 *************** *** 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,165 ---- oldval = inl (CONF1_ADDR_PORT); ! outl (CONF1_ADDR_PORT, CONF1_ENABLE_CHK); ! outb (CONF1_ADDR_PORT +3, 0); result = inl (CONF1_ADDR_PORT); outl (CONF1_ADDR_PORT, oldval); *************** *** 179,182 **** --- 168,184 ---- 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: Zentrum fuer Paralleles Rechnen Tel: +49 221 4706017 Universitaet zu Koeln FAX: +49 221 4705160 Weyertal 80 50931 Koeln