summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-03 19:47:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-03 19:47:14 +0000
commit0053758b01dca70b78169267b09173a9709e64d4 (patch)
treede94659e9118169dae51ac4c6db2691da0f4e8a4 /sys/dev
parent3b1fdecadc0926707c9353ba6a460133669a8f42 (diff)
more pci subclasses and such; netbsd
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci_subr.c64
-rw-r--r--sys/dev/pci/pcireg.h46
2 files changed, 108 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c
index d6068b6e1c6..1a14c25e943 100644
--- a/sys/dev/pci/pci_subr.c
+++ b/sys/dev/pci/pci_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_subr.c,v 1.7 1998/02/03 19:42:04 deraadt Exp $ */
+/* $OpenBSD: pci_subr.c,v 1.8 1998/02/03 19:47:13 deraadt Exp $ */
/* $NetBSD: pci_subr.c,v 1.19 1996/10/13 01:38:29 christos Exp $ */
/*
@@ -68,6 +68,7 @@ struct pci_class pci_subclass_mass_storage[] = {
{ "IDE", PCI_SUBCLASS_MASS_STORAGE_IDE, },
{ "floppy", PCI_SUBCLASS_MASS_STORAGE_FLOPPY, },
{ "IPI", PCI_SUBCLASS_MASS_STORAGE_IPI, },
+ { "RAID", PCI_SUBCLASS_MASS_STORAGE_RAID, },
{ "miscellaneous", PCI_SUBCLASS_MASS_STORAGE_MISC, },
{ 0 },
};
@@ -115,6 +116,55 @@ struct pci_class pci_subclass_bridge[] = {
{ 0 },
};
+struct pci_class pci_subclass_communications[] = {
+ { "serial", PCI_SUBCLASS_COMMUNICATIONS_SERIAL, },
+ { "parallel", PCI_SUBCLASS_COMMUNICATIONS_PARALLEL, },
+ { "miscellaneous", PCI_SUBCLASS_COMMUNICATIONS_MISC, },
+ { 0 },
+};
+
+struct pci_class pci_subclass_system[] = {
+ { "8259 PIC", PCI_SUBCLASS_SYSTEM_PIC, },
+ { "8237 DMA", PCI_SUBCLASS_SYSTEM_DMA, },
+ { "8254 timer", PCI_SUBCLASS_SYSTEM_TIMER, },
+ { "RTC", PCI_SUBCLASS_SYSTEM_RTC, },
+ { "miscellaneous", PCI_SUBCLASS_SYSTEM_MISC, },
+ { 0 },
+};
+
+struct pci_class pci_subclass_input[] = {
+ { "keyboard", PCI_SUBCLASS_INPUT_KEYBOARD, },
+ { "digitizer", PCI_SUBCLASS_INPUT_DIGITIZER, },
+ { "mouse", PCI_SUBCLASS_INPUT_MOUSE, },
+ { "miscellaneous", PCI_SUBCLASS_INPUT_MISC, },
+ { 0 },
+};
+
+struct pci_class pci_subclass_dock[] = {
+ { "generic", PCI_SUBCLASS_DOCK_GENERIC, },
+ { "miscellaneous", PCI_SUBCLASS_DOCK_MISC, },
+ { 0 },
+};
+
+struct pci_class pci_subclass_processor[] = {
+ { "386", PCI_SUBCLASS_PROCESSOR_386, },
+ { "486", PCI_SUBCLASS_PROCESSOR_486, },
+ { "Pentium", PCI_SUBCLASS_PROCESSOR_PENTIUM, },
+ { "Alpha", PCI_SUBCLASS_PROCESSOR_ALPHA, },
+ { "PowerPC", PCI_SUBCLASS_PROCESSOR_POWERPC, },
+ { "Co-processor", PCI_SUBCLASS_PROCESSOR_COPROC, },
+ { 0 },
+};
+
+struct pci_class pci_subclass_serialbus[] = {
+ { "Firewire", PCI_SUBCLASS_SERIALBUS_FIREWIRE, },
+ { "ACCESS.bus", PCI_SUBCLASS_SERIALBUS_ACCESS, },
+ { "SSA", PCI_SUBCLASS_SERIALBUS_SSA, },
+ { "USB", PCI_SUBCLASS_SERIALBUS_USB, },
+ { "Fiber Channel", PCI_SUBCLASS_SERIALBUS_FIBER, },
+ { 0 },
+};
+
struct pci_class pci_class[] = {
{ "prehistoric", PCI_CLASS_PREHISTORIC,
pci_subclass_prehistoric, },
@@ -130,6 +180,18 @@ struct pci_class pci_class[] = {
pci_subclass_memory, },
{ "bridge", PCI_CLASS_BRIDGE,
pci_subclass_bridge, },
+ { "communications", PCI_CLASS_COMMUNICATIONS,
+ pci_subclass_communications, },
+ { "system", PCI_CLASS_SYSTEM,
+ pci_subclass_system, },
+ { "input", PCI_CLASS_INPUT,
+ pci_subclass_input, },
+ { "dock", PCI_CLASS_DOCK,
+ pci_subclass_dock, },
+ { "processor", PCI_CLASS_PROCESSOR,
+ pci_subclass_processor, },
+ { "serial bus", PCI_CLASS_SERIALBUS,
+ pci_subclass_serialbus, },
{ "undefined", PCI_CLASS_UNDEFINED,
0, },
{ 0 },
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index 65da5d84f39..37f60379646 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcireg.h,v 1.6 1998/02/03 19:42:05 deraadt Exp $ */
+/* $OpenBSD: pcireg.h,v 1.7 1998/02/03 19:47:13 deraadt Exp $ */
/* $NetBSD: pcireg.h,v 1.11 1996/08/10 15:42:33 mycroft Exp $ */
/*
@@ -124,6 +124,12 @@ typedef u_int8_t pci_revision_t;
#define PCI_CLASS_MULTIMEDIA 0x04
#define PCI_CLASS_MEMORY 0x05
#define PCI_CLASS_BRIDGE 0x06
+#define PCI_CLASS_COMMUNICATIONS 0x07
+#define PCI_CLASS_SYSTEM 0x08
+#define PCI_CLASS_INPUT 0x09
+#define PCI_CLASS_DOCK 0x0a
+#define PCI_CLASS_PROCESSOR 0x0b
+#define PCI_CLASS_SERIALBUS 0x0c
#define PCI_CLASS_UNDEFINED 0xff
/* 0x00 prehistoric subclasses */
@@ -135,6 +141,7 @@ typedef u_int8_t pci_revision_t;
#define PCI_SUBCLASS_MASS_STORAGE_IDE 0x01
#define PCI_SUBCLASS_MASS_STORAGE_FLOPPY 0x02
#define PCI_SUBCLASS_MASS_STORAGE_IPI 0x03
+#define PCI_SUBCLASS_MASS_STORAGE_RAID 0x04
#define PCI_SUBCLASS_MASS_STORAGE_MISC 0x80
/* 0x02 network subclasses */
@@ -170,6 +177,43 @@ typedef u_int8_t pci_revision_t;
#define PCI_SUBCLASS_BRIDGE_CARDBUS 0x07
#define PCI_SUBCLASS_BRIDGE_MISC 0x80
+/* 0x07 communications subclasses */
+#define PCI_SUBCLASS_COMMUNICATIONS_SERIAL 0x00
+#define PCI_SUBCLASS_COMMUNICATIONS_PARALLEL 0x01
+#define PCI_SUBCLASS_COMMUNICATIONS_MISC 0x80
+
+/* 0x08 system subclasses */
+#define PCI_SUBCLASS_SYSTEM_PIC 0x00
+#define PCI_SUBCLASS_SYSTEM_DMA 0x01
+#define PCI_SUBCLASS_SYSTEM_TIMER 0x02
+#define PCI_SUBCLASS_SYSTEM_RTC 0x03
+#define PCI_SUBCLASS_SYSTEM_MISC 0x80
+
+/* 0x09 input subclasses */
+#define PCI_SUBCLASS_INPUT_KEYBOARD 0x00
+#define PCI_SUBCLASS_INPUT_DIGITIZER 0x01
+#define PCI_SUBCLASS_INPUT_MOUSE 0x02
+#define PCI_SUBCLASS_INPUT_MISC 0x80
+
+/* 0x0a dock subclasses */
+#define PCI_SUBCLASS_DOCK_GENERIC 0x00
+#define PCI_SUBCLASS_DOCK_MISC 0x80
+
+/* 0x0b processor subclasses */
+#define PCI_SUBCLASS_PROCESSOR_386 0x00
+#define PCI_SUBCLASS_PROCESSOR_486 0x01
+#define PCI_SUBCLASS_PROCESSOR_PENTIUM 0x02
+#define PCI_SUBCLASS_PROCESSOR_ALPHA 0x10
+#define PCI_SUBCLASS_PROCESSOR_POWERPC 0x20
+#define PCI_SUBCLASS_PROCESSOR_COPROC 0x40
+
+/* 0x0c serial bus subclasses */
+#define PCI_SUBCLASS_SERIALBUS_FIREWIRE 0x00
+#define PCI_SUBCLASS_SERIALBUS_ACCESS 0x01
+#define PCI_SUBCLASS_SERIALBUS_SSA 0x02
+#define PCI_SUBCLASS_SERIALBUS_USB 0x03
+#define PCI_SUBCLASS_SERIALBUS_FIBER 0x04
+
/*
* PCI BIST/Header Type/Latency Timer/Cache Line Size Register.
*/