summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcibus.c
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1997-03-05 20:52:00 +0000
committerse <se@FreeBSD.org>1997-03-05 20:52:00 +0000
commit3fb3bbab68d0b68c65de74580b3f55ba41dc37e1 (patch)
treebae404308e700c0400e2154b643f816d4deb26d7 /sys/i386/isa/pcibus.c
parentd0ff874c8957e3190b701ea212f040add0fcb004 (diff)
downloadFreeBSD-src-3fb3bbab68d0b68c65de74580b3f55ba41dc37e1.zip
FreeBSD-src-3fb3bbab68d0b68c65de74580b3f55ba41dc37e1.tar.gz
improve pcibus_check: Only assume PCI if at least one PCI to anything bridge
on bus 0. This fixes problems with EISA-only systems mistakenly being assumed to support PCI.
Diffstat (limited to 'sys/i386/isa/pcibus.c')
-rw-r--r--sys/i386/isa/pcibus.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/sys/i386/isa/pcibus.c b/sys/i386/isa/pcibus.c
index dfddb43..6af7ffd 100644
--- a/sys/i386/isa/pcibus.c
+++ b/sys/i386/isa/pcibus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id$
+** $Id: pcibus.c,v 1.31 1997/02/22 09:36:58 peter Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -167,14 +167,27 @@ pcibus_check (void)
if (bootverbose) printf ("pcibus_check:\tdevice ");
for (device = 0; device < pci_maxdevice; device++) {
- unsigned long id;
+ unsigned long id, class, header;
if (bootverbose)
printf ("%d ", device);
id = pcibus_read (pcibus_tag (0,device,0), 0);
- if (id && id != 0xfffffffful) {
- if (bootverbose) printf ("is there (id=%08lx)\n", id);
- return 1;
- }
+ if ((id == 0) || (id == 0xfffffffful))
+ continue;
+
+ class = pcibus_read (pcibus_tag (0,device,0), 8);
+ if (bootverbose)
+ printf ("[class=%x] ", class >> 8);
+ if ((class & 0xfff0ff00) != 0x06000000)
+ continue;
+
+ header = pcibus_read (pcibus_tag (0,device,0), 12);
+ if (bootverbose)
+ printf ("[hdr=%x] ", (header >> 16) & 0xff);
+ if ((header & 0x007e0000) != 0)
+ continue;
+
+ if (bootverbose) printf ("is there (id=%08lx)\n", id);
+ return 1;
}
if (bootverbose)
printf ("-- nothing found\n");
OpenPOWER on IntegriCloud