summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-06-18 01:07:04 +0000
committercgd <cgd@NetBSD.org>1995-06-18 01:07:04 +0000
commit27adbb1130eb454cbef545e1aa269019fd1de009 (patch)
treef64f7381436950d3fcd91523f7e3710521b855e9 /sys/dev
parentae76c070ecb0a1a4a11678a4a1613f160f464e3a (diff)
learn about some PCI vendor and product numbers. not yet used
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/Makefile7
-rw-r--r--sys/dev/pci/devlist2h.awk228
-rw-r--r--sys/dev/pci/pcidevs115
3 files changed, 350 insertions, 0 deletions
diff --git a/sys/dev/pci/Makefile b/sys/dev/pci/Makefile
new file mode 100644
index 00000000000..48f8357d969
--- /dev/null
+++ b/sys/dev/pci/Makefile
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 1995/06/18 01:07:04 cgd Exp $
+
+AWK= awk
+
+pcidevs.h pcidevs_data.h: pcidevs devlist2h.awk
+ /bin/rm -f pcidevs.h pcidevs_data.h
+ ${AWK} -f devlist2h.awk pcidevs
diff --git a/sys/dev/pci/devlist2h.awk b/sys/dev/pci/devlist2h.awk
new file mode 100644
index 00000000000..c814f5e2ff0
--- /dev/null
+++ b/sys/dev/pci/devlist2h.awk
@@ -0,0 +1,228 @@
+#! /usr/bin/awk -f
+# $NetBSD: devlist2h.awk,v 1.1 1995/06/18 01:07:06 cgd Exp $
+#
+# Copyright (c) 1995 Christopher G. Demetriou
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by Christopher G. Demetriou.
+# 4. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+BEGIN {
+ nproducts = nvendors = 0
+ dfile="pcidevs_data.h"
+ hfile="pcidevs.h"
+}
+NR == 1 {
+ VERSION = $0
+ gsub("\\$", "", VERSION)
+
+ printf("/*\n") > dfile
+ printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
+ > dfile
+ printf(" *\n") > dfile
+ printf(" * generated from:\n") > dfile
+ printf(" *\t%s\n", VERSION) > dfile
+ printf(" */\n") > dfile
+
+ printf("/*\n") > hfile
+ printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
+ > hfile
+ printf(" *\n") > hfile
+ printf(" * generated from:\n") > hfile
+ printf(" *\t%s\n", VERSION) > hfile
+ printf(" */\n") > hfile
+
+ continue
+}
+$1 == "vendor" {
+ nvendors++
+
+ vendorindex[$2] = nvendors; # record index for this name, for later.
+ vendors[nvendors, 1] = $2; # name
+ vendors[nvendors, 2] = $3; # id
+ printf("#define\tPCI_VENDOR_%s\t%s\t", vendors[nvendors, 1],
+ vendors[nvendors, 2]) > hfile
+
+ i = 3; f = 4;
+
+ # comments
+ ocomment = oparen = 0
+ if (f <= NF) {
+ printf("\t/* ") > hfile
+ ocomment = 1;
+ }
+ while (f <= NF) {
+ if ($f == "#") {
+ printf("(") > hfile
+ oparen = 1
+ f++
+ continue
+ }
+ if (oparen) {
+ printf("%s", $f) > hfile
+ if (f < NF)
+ printf(" ") > hfile
+ f++
+ continue
+ }
+ vendors[nvendors, i] = $f
+ printf("%s", vendors[nvendors, i]) > hfile
+ if (f < NF)
+ printf(" ") > hfile
+ i++; f++;
+ }
+ if (oparen)
+ printf(")") > hfile
+ if (ocomment)
+ printf(" */") > hfile
+ printf("\n") > hfile
+
+ continue
+}
+$1 == "product" {
+ nproducts++
+
+ products[nproducts, 1] = $2; # vendor name
+ products[nproducts, 2] = $3; # product id
+ products[nproducts, 3] = $4; # id
+ printf("#define\tPCI_PRODUCT_%s_%s\t%s\t", products[nproducts, 1],
+ products[nproducts, 2], products[nproducts, 3]) > hfile
+
+ i=4; f = 5;
+
+ # remember if the device is unsupported
+ if ($f == "UNSUPP") {
+ products[nproducts, 1, unsupported] = 1;
+ f++
+ }
+
+ # comments
+ ocomment = oparen = 0
+ if (f <= NF) {
+ printf("\t/* ") > hfile
+ ocomment = 1;
+ }
+ while (f <= NF) {
+ if ($f == "#") {
+ printf("(") > hfile
+ oparen = 1
+ f++
+ continue
+ }
+ if (oparen) {
+ printf("%s", $f) > hfile
+ if (f < NF)
+ printf(" ") > hfile
+ f++
+ continue
+ }
+ products[nproducts, i] = $f
+ printf("%s", products[nproducts, i]) > hfile
+ if (f < NF)
+ printf(" ") > hfile
+ i++; f++;
+ }
+ if (oparen)
+ printf(")") > hfile
+ if (ocomment)
+ printf(" */") > hfile
+ printf("\n") > hfile
+
+ continue
+}
+{
+ if ($0 == "")
+ blanklines++
+ print $0 > hfile
+ if (blanklines < 2)
+ print $0 > dfile
+}
+END {
+ # print out the match tables
+
+ printf("\n") > dfile
+
+ printf("struct pci_knowndev pci_knowndevs[] = {\n") > dfile
+ for (i = 1; i <= nproducts; i++) {
+ printf("\t{\n") > dfile
+ printf("\t PCI_VENDOR_%s, PCI_PRODUCT_%s_%s,\n",
+ products[i, 1], products[i, 1], products[i, 2]) \
+ > dfile
+ printf("\t ") > dfile
+ if (products[i, 1, unsupp])
+ printf("PCI_KNOWNDEV_UNSUPP") > dfile
+ else
+ printf("0") > dfile
+ printf(",\n") > dfile
+
+ vendi = vendorindex[products[i, 1]];
+ printf("\t \"") > dfile
+ j = 3;
+ needspace = 0;
+ while (vendors[vendi, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", vendors[vendi, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+
+ printf("\t \"") > dfile
+ j = 4;
+ needspace = 0;
+ while (products[i, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", products[i, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+ printf("\t},\n") > dfile
+ }
+ for (i = 1; i <= nvendors; i++) {
+ printf("\t{\n") > dfile
+ printf("\t PCI_VENDOR_%s, 0,\n", vendors[i, 1]) \
+ > dfile
+ printf("\t PCI_KNOWNDEV_UNSUPP | PCI_KNOWNDEV_NOPROD,\n") \
+ > dfile
+ printf("\t \"") > dfile
+ j = 3;
+ needspace = 0;
+ while (vendors[i, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", vendors[i, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+ printf("\t NULL,\n") > dfile
+ printf("\t},\n") > dfile
+ }
+ printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile
+ printf("};\n") > dfile
+}
diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs
new file mode 100644
index 00000000000..d1a159032f6
--- /dev/null
+++ b/sys/dev/pci/pcidevs
@@ -0,0 +1,115 @@
+$NetBSD: pcidevs,v 1.1 1995/06/18 01:07:06 cgd Exp $
+
+/*
+ * Copyright (c) 1995 Christopher G. Demetriou
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christopher G. Demetriou
+ * for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * List of known PCI vendors
+ */
+
+vendor OLDNCR 0x1000 NCR # Old ID. see "NCR" below.
+vendor ATI 0x1002 ATI
+vendor DEC 0x1011 DEC
+vendor CIRRUS 0x1013 Cirrus Logic
+vendor IBM 0x1014 IBM
+vendor NCR 0x101A NCR
+vendor AMD 0x1022 AMD
+vendor COMPAQ 0x1032 Compaq
+vendor NEC 0x1033 NEC
+vendor HP 0x103C Hewlett-Packard
+vendor KPC 0x1040 Kubota Pacific Corp.
+vendor TI 0x104C Texas Instruments
+vendor SONY 0x104D Sony
+vendor MOT 0x1057 Motorola
+vendor MYLEX 0x1069 Mylex
+vendor APPLE 0x106B Apple
+vendor QLOGIC 0x1077 QLogic # ??? XXX
+vendor BIT3 0x108A Bit3 Computer Corp.
+vendor CABLETRON 0x10B1 Cabletron
+vendor 3COM 0x10B7 3Com
+vendor CERN 0x10DC CERN # ??? XXX
+vendor ECP 0x10DC ECP # ??? XXX
+vendor ECU 0x10DC ECU # ??? XXX
+vendor PROTEON 0x1108 Proteon
+vendor S3 0x5333 S3
+vendor INTEL 0x8086 Intel
+vendor ADP 0x9004 Adaptec
+
+/*
+ * List of known products. Grouped by vendor.
+ */
+
+/* Adaptec products */
+product ADP AIC7870 0x7078 UNSUPP AIC-7870
+
+/* ATI products */
+product ATI MACH32 0x4158 UNSUPP Mach32
+product ATI MACH64_CX 0x4358 UNSUPP Mach64-CX
+product ATI MACH64_GX 0x4758 UNSUPP Mach64-GX
+
+/* DEC products */
+product DEC 21050 0x0001 UNSUPP DECchip 21050 (\"PPB\")
+product DEC 21040 0x0002 DECchip 21040 (\"Tulip\")
+product DEC 21030 0x0004 UNSUPP DECchip 21030 (\"TGA\")
+product DEC NVRAM 0x0007 UNSUPP Zephyr NV-RAM
+product DEC KZPSA 0x0008 UNSUPP KZPSA
+product DEC 21140 0x0009 DECchip 21140 (\"FasterNet\")
+product DEC DEFPA 0x000f UNSUPP DEFPA
+/* product DEC ??? 0x0010 UNSUPP ??? VME Interface */
+product DEC 21041 0x0014 DECchip 21041 (\"Tulip Pass 3\")
+
+/* Intel products */
+/* XXX name? */
+product INTEL PCEB 0x0482 UNSUPP 82375EB PCI-EISA Bridge
+product INTEL PCIB 0x0486 UNSUPP 82426EX PCI-ISA Bridge
+product INTEL PCMC 0x04a3 UNSUPP 82434LX PCI, Cache, and Memory controller
+
+/* XXX the following two Intel products are UNVERIFIED. */
+product INTEL CDC 0x0483 UNSUPP 82424 Cache and DRAM controller
+/* XXX Supported on the Alpha. XXX unverified. XXX includes PCI-ISA bridge */
+product INTEL SIO 0x0484 UNSUPP 82378 System I/O
+
+/* Mylex products */
+product MYLEX 960P 0x0001 UNSUPP RAID controller
+
+/* NCR/Symbios Logic products */
+product NCR 810 0x0001 53c810
+product OLDNCR 810 0x0001 53c810
+product NCR 825 0x0003 53c825
+product OLDNCR 825 0x0003 53c825
+product NCR 815 0x0004 53c815
+product OLDNCR 815 0x0004 53c815
+
+/* QLogic products */
+product QLOGIC ISP1020 0x1020 UNSUPP ISP1020
+
+/* S3 Products */
+product S3 VISION864 0x88c0 UNSUPP Vision 864