xref: /illumos-gate/usr/src/uts/common/sys/pci.h (revision a9fb0ae8cfc9d2ebdf5f7cded8945fbb649ba24e)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
500d0963fSdilpreet  * Common Development and Distribution License (the "License").
600d0963fSdilpreet  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
2200d0963fSdilpreet  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_SYS_PCI_H
277c478bd9Sstevel@tonic-gate #define	_SYS_PCI_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
327c478bd9Sstevel@tonic-gate extern "C" {
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate /*
367c478bd9Sstevel@tonic-gate  * PCI Configuration Header offsets
377c478bd9Sstevel@tonic-gate  */
387c478bd9Sstevel@tonic-gate #define	PCI_CONF_VENID		0x0	/* vendor id, 2 bytes */
397c478bd9Sstevel@tonic-gate #define	PCI_CONF_DEVID		0x2	/* device id, 2 bytes */
407c478bd9Sstevel@tonic-gate #define	PCI_CONF_COMM		0x4	/* command register, 2 bytes */
417c478bd9Sstevel@tonic-gate #define	PCI_CONF_STAT		0x6	/* status register, 2 bytes */
427c478bd9Sstevel@tonic-gate #define	PCI_CONF_REVID		0x8	/* revision id, 1 byte */
437c478bd9Sstevel@tonic-gate #define	PCI_CONF_PROGCLASS	0x9	/* programming class code, 1 byte */
447c478bd9Sstevel@tonic-gate #define	PCI_CONF_SUBCLASS	0xA	/* sub-class code, 1 byte */
457c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASCLASS	0xB	/* basic class code, 1 byte */
467c478bd9Sstevel@tonic-gate #define	PCI_CONF_CACHE_LINESZ	0xC	/* cache line size, 1 byte */
477c478bd9Sstevel@tonic-gate #define	PCI_CONF_LATENCY_TIMER	0xD	/* latency timer, 1 byte */
487c478bd9Sstevel@tonic-gate #define	PCI_CONF_HEADER		0xE	/* header type, 1 byte */
497c478bd9Sstevel@tonic-gate #define	PCI_CONF_BIST		0xF	/* builtin self test, 1 byte */
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /*
527c478bd9Sstevel@tonic-gate  * Header type 0 offsets
537c478bd9Sstevel@tonic-gate  */
547c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE0		0x10	/* base register 0, 4 bytes */
557c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE1		0x14	/* base register 1, 4 bytes */
567c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE2		0x18	/* base register 2, 4 bytes */
577c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE3		0x1c	/* base register 3, 4 bytes */
587c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE4		0x20	/* base register 4, 4 bytes */
597c478bd9Sstevel@tonic-gate #define	PCI_CONF_BASE5		0x24	/* base register 5, 4 bytes */
607c478bd9Sstevel@tonic-gate #define	PCI_CONF_CIS		0x28	/* Cardbus CIS Pointer */
617c478bd9Sstevel@tonic-gate #define	PCI_CONF_SUBVENID	0x2c	/* Subsystem Vendor ID */
627c478bd9Sstevel@tonic-gate #define	PCI_CONF_SUBSYSID	0x2e	/* Subsystem ID */
637c478bd9Sstevel@tonic-gate #define	PCI_CONF_ROM		0x30	/* ROM base register, 4 bytes */
647c478bd9Sstevel@tonic-gate #define	PCI_CONF_CAP_PTR	0x34	/* capabilities pointer, 1 byte */
657c478bd9Sstevel@tonic-gate #define	PCI_CONF_ILINE		0x3c	/* interrupt line, 1 byte */
667c478bd9Sstevel@tonic-gate #define	PCI_CONF_IPIN		0x3d	/* interrupt pin, 1 byte */
677c478bd9Sstevel@tonic-gate #define	PCI_CONF_MIN_G		0x3e	/* minimum grant, 1 byte */
687c478bd9Sstevel@tonic-gate #define	PCI_CONF_MAX_L		0x3f	/* maximum grant, 1 byte */
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate /*
717c478bd9Sstevel@tonic-gate  * PCI to PCI bridge configuration space header format
727c478bd9Sstevel@tonic-gate  */
737c478bd9Sstevel@tonic-gate #define	PCI_BCNF_PRIBUS		0x18	/* primary bus number */
747c478bd9Sstevel@tonic-gate #define	PCI_BCNF_SECBUS		0x19	/* secondary bus number */
757c478bd9Sstevel@tonic-gate #define	PCI_BCNF_SUBBUS		0x1a	/* subordinate bus number */
767c478bd9Sstevel@tonic-gate #define	PCI_BCNF_LATENCY_TIMER	0x1b
777c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IO_BASE_LOW	0x1c
787c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IO_LIMIT_LOW	0x1d
797c478bd9Sstevel@tonic-gate #define	PCI_BCNF_SEC_STATUS	0x1e
807c478bd9Sstevel@tonic-gate #define	PCI_BCNF_MEM_BASE	0x20
817c478bd9Sstevel@tonic-gate #define	PCI_BCNF_MEM_LIMIT	0x22
827c478bd9Sstevel@tonic-gate #define	PCI_BCNF_PF_BASE_LOW	0x24
837c478bd9Sstevel@tonic-gate #define	PCI_BCNF_PF_LIMIT_LOW	0x26
847c478bd9Sstevel@tonic-gate #define	PCI_BCNF_PF_BASE_HIGH	0x28
857c478bd9Sstevel@tonic-gate #define	PCI_BCNF_PF_LIMIT_HIGH	0x2c
867c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IO_BASE_HI	0x30
877c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IO_LIMIT_HI	0x32
887c478bd9Sstevel@tonic-gate #define	PCI_BCNF_CAP_PTR	0x34
897c478bd9Sstevel@tonic-gate #define	PCI_BCNF_ROM		0x38
907c478bd9Sstevel@tonic-gate #define	PCI_BCNF_ILINE		0x3c
917c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IPIN		0x3d
927c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BCNTRL		0x3e
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BASE_NUM	0x2
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate /*
977c478bd9Sstevel@tonic-gate  * PCI to PCI bridge control register (0x3e) format
987c478bd9Sstevel@tonic-gate  */
997c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BCNTRL_PARITY_ENABLE	0x1
1007c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BCNTRL_SERR_ENABLE	0x2
1017c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BCNTRL_MAST_AB_MODE	0x20
1027c478bd9Sstevel@tonic-gate #define	PCI_BCNF_BCNTRL_DTO_STAT	0x400
1037c478bd9Sstevel@tonic-gate 
104*a9fb0ae8Srw #define	PCI_BCNF_BCNTRL_RESET		0x0040
105*a9fb0ae8Srw #define	PCI_BCNF_BCNTRL_B2B_ENAB	0x0080
106*a9fb0ae8Srw 
1077c478bd9Sstevel@tonic-gate #define	PCI_BCNF_IO_MASK	0xf0
1087c478bd9Sstevel@tonic-gate #define	PCI_BCNF_MEM_MASK	0xfff0
1097c478bd9Sstevel@tonic-gate 
1107c478bd9Sstevel@tonic-gate /*
1117c478bd9Sstevel@tonic-gate  * Header type 2 (Cardbus) offsets
1127c478bd9Sstevel@tonic-gate  */
1137c478bd9Sstevel@tonic-gate #define	PCI_CBUS_SOCK_REG	0x10	/* Cardbus socket regs, 4 bytes */
1147c478bd9Sstevel@tonic-gate #define	PCI_CBUS_RESERVED1	0x14	/* Reserved, 2 bytes */
1157c478bd9Sstevel@tonic-gate #define	PCI_CBUS_SEC_STATUS	0x16	/* Secondary status, 2 bytes */
1167c478bd9Sstevel@tonic-gate #define	PCI_CBUS_PCI_BUS_NO	0x18	/* PCI bus number, 1 byte */
1177c478bd9Sstevel@tonic-gate #define	PCI_CBUS_CBUS_NO	0x19	/* Cardbus bus number, 1 byte */
1187c478bd9Sstevel@tonic-gate #define	PCI_CBUS_SUB_BUS_NO	0x1a	/* Subordinate bus number, 1 byte */
1197c478bd9Sstevel@tonic-gate #define	PCI_CBUS_LATENCY_TIMER	0x1b	/* Cardbus latency timer, 1 byte */
1207c478bd9Sstevel@tonic-gate #define	PCI_CBUS_MEM_BASE0	0x1c	/* Memory base reg 0, 4 bytes */
1217c478bd9Sstevel@tonic-gate #define	PCI_CBUS_MEM_LIMIT0	0x20	/* Memory limit reg 0, 4 bytes */
1227c478bd9Sstevel@tonic-gate #define	PCI_CBUS_MEM_BASE1	0x24	/* Memory base reg 1, 4 bytes */
1237c478bd9Sstevel@tonic-gate #define	PCI_CBUS_MEM_LIMIT1	0x28	/* Memory limit reg 1, 4 bytes */
1247c478bd9Sstevel@tonic-gate #define	PCI_CBUS_IO_BASE0	0x2c	/* IO base reg 0, 4 bytes */
1257c478bd9Sstevel@tonic-gate #define	PCI_CBUS_IO_LIMIT0	0x30	/* IO limit reg 0, 4 bytes */
1267c478bd9Sstevel@tonic-gate #define	PCI_CBUS_IO_BASE1	0x34	/* IO base reg 1, 4 bytes */
1277c478bd9Sstevel@tonic-gate #define	PCI_CBUS_IO_LIMIT1	0x38	/* IO limit reg 1, 4 bytes */
1287c478bd9Sstevel@tonic-gate #define	PCI_CBUS_ILINE		0x3c	/* interrupt line, 1 byte */
1297c478bd9Sstevel@tonic-gate #define	PCI_CBUS_IPIN		0x3d	/* interrupt pin, 1 byte */
1307c478bd9Sstevel@tonic-gate #define	PCI_CBUS_BRIDGE_CTRL	0x3e	/* Bridge control, 2 bytes */
1317c478bd9Sstevel@tonic-gate #define	PCI_CBUS_SUBVENID	0x40	/* Subsystem Vendor ID, 2 bytes */
1327c478bd9Sstevel@tonic-gate #define	PCI_CBUS_SUBSYSID	0x42	/* Subsystem ID, 2 bytes */
1337c478bd9Sstevel@tonic-gate #define	PCI_CBUS_LEG_MODE_ADDR	0x44	/* PCCard 16bit IF legacy mode addr */
1347c478bd9Sstevel@tonic-gate 
1357c478bd9Sstevel@tonic-gate #define	PCI_CBUS_BASE_NUM	0x1	/* number of base registers */
1367c478bd9Sstevel@tonic-gate 
1377c478bd9Sstevel@tonic-gate /*
1387c478bd9Sstevel@tonic-gate  * PCI command register bits
1397c478bd9Sstevel@tonic-gate  */
1407c478bd9Sstevel@tonic-gate #define	PCI_COMM_IO		0x1	/* I/O access enable */
1417c478bd9Sstevel@tonic-gate #define	PCI_COMM_MAE		0x2	/* memory access enable */
1427c478bd9Sstevel@tonic-gate #define	PCI_COMM_ME		0x4	/* master enable */
1437c478bd9Sstevel@tonic-gate #define	PCI_COMM_SPEC_CYC	0x8
1447c478bd9Sstevel@tonic-gate #define	PCI_COMM_MEMWR_INVAL	0x10
1457c478bd9Sstevel@tonic-gate #define	PCI_COMM_PALETTE_SNOOP	0x20
1467c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARITY_DETECT	0x40
1477c478bd9Sstevel@tonic-gate #define	PCI_COMM_WAIT_CYC_ENAB	0x80
1487c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERR_ENABLE	0x100
1497c478bd9Sstevel@tonic-gate #define	PCI_COMM_BACK2BACK_ENAB	0x200
1507c478bd9Sstevel@tonic-gate #define	PCI_COMM_INTX_DISABLE	0x400	/* INTx emulation disable */
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate /*
1537c478bd9Sstevel@tonic-gate  * PCI Interrupt pin value
1547c478bd9Sstevel@tonic-gate  */
1557c478bd9Sstevel@tonic-gate #define	PCI_INTA	1
1567c478bd9Sstevel@tonic-gate #define	PCI_INTB	2
1577c478bd9Sstevel@tonic-gate #define	PCI_INTC	3
1587c478bd9Sstevel@tonic-gate #define	PCI_INTD	4
1597c478bd9Sstevel@tonic-gate 
1607c478bd9Sstevel@tonic-gate /*
1617c478bd9Sstevel@tonic-gate  * PCI status register bits
1627c478bd9Sstevel@tonic-gate  */
1637c478bd9Sstevel@tonic-gate #define	PCI_STAT_INTR		0x8	/* Interrupt state */
1647c478bd9Sstevel@tonic-gate #define	PCI_STAT_CAP		0x10	/* Implements Capabilities */
1657c478bd9Sstevel@tonic-gate #define	PCI_STAT_66MHZ		0x20	/* 66 MHz capable */
1667c478bd9Sstevel@tonic-gate #define	PCI_STAT_UDF		0x40	/* UDF supported */
1677c478bd9Sstevel@tonic-gate #define	PCI_STAT_FBBC		0x80	/* Fast Back-to-Back Capable */
1687c478bd9Sstevel@tonic-gate #define	PCI_STAT_S_PERROR	0x100	/* Data Parity Reported */
1697c478bd9Sstevel@tonic-gate #define	PCI_STAT_DEVSELT	0x600	/* Device select timing */
1707c478bd9Sstevel@tonic-gate #define	PCI_STAT_S_TARG_AB	0x800	/* Signaled Target Abort */
1717c478bd9Sstevel@tonic-gate #define	PCI_STAT_R_TARG_AB	0x1000	/* Received Target Abort */
1727c478bd9Sstevel@tonic-gate #define	PCI_STAT_R_MAST_AB	0x2000	/* Received Master Abort */
1737c478bd9Sstevel@tonic-gate #define	PCI_STAT_S_SYSERR	0x4000	/* Signaled System Error */
1747c478bd9Sstevel@tonic-gate #define	PCI_STAT_PERROR		0x8000	/* Detected Parity Error */
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate /*
1777c478bd9Sstevel@tonic-gate  * DEVSEL timing values
1787c478bd9Sstevel@tonic-gate  */
1797c478bd9Sstevel@tonic-gate #define	PCI_STAT_DEVSELT_FAST	0x0000
1807c478bd9Sstevel@tonic-gate #define	PCI_STAT_DEVSELT_MEDIUM	0x0200
1817c478bd9Sstevel@tonic-gate #define	PCI_STAT_DEVSELT_SLOW	0x0400
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate /*
1847c478bd9Sstevel@tonic-gate  * BIST values
1857c478bd9Sstevel@tonic-gate  */
1867c478bd9Sstevel@tonic-gate #define	PCI_BIST_SUPPORTED	0x80
1877c478bd9Sstevel@tonic-gate #define	PCI_BIST_GO		0x40
1887c478bd9Sstevel@tonic-gate #define	PCI_BIST_RESULT_M	0x0f
1897c478bd9Sstevel@tonic-gate #define	PCI_BIST_RESULT_OK	0x00
1907c478bd9Sstevel@tonic-gate 
1917c478bd9Sstevel@tonic-gate /*
1927c478bd9Sstevel@tonic-gate  * PCI class codes
1937c478bd9Sstevel@tonic-gate  */
1947c478bd9Sstevel@tonic-gate #define	PCI_CLASS_NONE		0x0	/* class code for pre-2.0 devices */
1957c478bd9Sstevel@tonic-gate #define	PCI_CLASS_MASS		0x1	/* Mass storage Controller class */
1967c478bd9Sstevel@tonic-gate #define	PCI_CLASS_NET		0x2	/* Network Controller class */
1977c478bd9Sstevel@tonic-gate #define	PCI_CLASS_DISPLAY	0x3	/* Display Controller class */
1987c478bd9Sstevel@tonic-gate #define	PCI_CLASS_MM		0x4	/* Multimedia Controller class */
1997c478bd9Sstevel@tonic-gate #define	PCI_CLASS_MEM		0x5	/* Memory Controller class */
2007c478bd9Sstevel@tonic-gate #define	PCI_CLASS_BRIDGE	0x6	/* Bridge Controller class */
2017c478bd9Sstevel@tonic-gate #define	PCI_CLASS_COMM		0x7	/* Communications Controller class */
2027c478bd9Sstevel@tonic-gate #define	PCI_CLASS_PERIPH	0x8	/* Peripheral Controller class */
2037c478bd9Sstevel@tonic-gate #define	PCI_CLASS_INPUT		0x9	/* Input Device class */
2047c478bd9Sstevel@tonic-gate #define	PCI_CLASS_DOCK		0xa	/* Docking Station class */
2057c478bd9Sstevel@tonic-gate #define	PCI_CLASS_PROCESSOR	0xb	/* Processor class */
2067c478bd9Sstevel@tonic-gate #define	PCI_CLASS_SERIALBUS	0xc	/* Serial Bus class */
2077c478bd9Sstevel@tonic-gate #define	PCI_CLASS_WIRELESS	0xd	/* Wireless Controller class */
2087c478bd9Sstevel@tonic-gate #define	PCI_CLASS_INTIO		0xe	/* Intelligent IO Controller class */
2097c478bd9Sstevel@tonic-gate #define	PCI_CLASS_SATELLITE	0xf	/* Satellite Communication class */
2107c478bd9Sstevel@tonic-gate #define	PCI_CLASS_CRYPT		0x10	/* Encrytion/Decryption class */
2117c478bd9Sstevel@tonic-gate #define	PCI_CLASS_SIGNAL	0x11	/* Signal Processing class */
2127c478bd9Sstevel@tonic-gate 
2137c478bd9Sstevel@tonic-gate /*
2147c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x0 (no new devices should use this code).
2157c478bd9Sstevel@tonic-gate  */
2167c478bd9Sstevel@tonic-gate #define	PCI_NONE_NOTVGA		0x0	/* All devices except VGA compatible */
2177c478bd9Sstevel@tonic-gate #define	PCI_NONE_VGA		0x1	/* VGA compatible */
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate /*
2207c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x1 (mass storage controllers)
2217c478bd9Sstevel@tonic-gate  */
2227c478bd9Sstevel@tonic-gate #define	PCI_MASS_SCSI		0x0	/* SCSI bus Controller */
2237c478bd9Sstevel@tonic-gate #define	PCI_MASS_IDE		0x1	/* IDE Controller */
2247c478bd9Sstevel@tonic-gate #define	PCI_MASS_FD		0x2	/* floppy disk Controller */
2257c478bd9Sstevel@tonic-gate #define	PCI_MASS_IPI		0x3	/* IPI bus Controller */
2267c478bd9Sstevel@tonic-gate #define	PCI_MASS_RAID		0x4	/* RAID Controller */
2277c478bd9Sstevel@tonic-gate #define	PCI_MASS_ATA		0x5	/* ATA Controller */
2287c478bd9Sstevel@tonic-gate #define	PCI_MASS_SATA		0x6	/* Serial ATA */
2297c478bd9Sstevel@tonic-gate #define	PCI_MASS_OTHER		0x80	/* Other Mass Storage Controller */
2307c478bd9Sstevel@tonic-gate 
2317c478bd9Sstevel@tonic-gate /*
2327c478bd9Sstevel@tonic-gate  * programming interface for IDE (subclass 1)
2337c478bd9Sstevel@tonic-gate  */
2347c478bd9Sstevel@tonic-gate #define	PCI_IDE_IF_NATIVE_PRI	0x1	/* primary channel is native */
2357c478bd9Sstevel@tonic-gate #define	PCI_IDE_IF_PROG_PRI	0x2	/* primary can operate in either mode */
2367c478bd9Sstevel@tonic-gate #define	PCI_IDE_IF_NATIVE_SEC	0x4	/* secondary channel is native */
2377c478bd9Sstevel@tonic-gate #define	PCI_IDE_IF_PROG_SEC	0x8	/* sec. can operate in either mode */
2387c478bd9Sstevel@tonic-gate #define	PCI_IDE_IF_MASK		0xf	/* programming interface mask */
2397c478bd9Sstevel@tonic-gate 
2407c478bd9Sstevel@tonic-gate 
2417c478bd9Sstevel@tonic-gate /*
2427c478bd9Sstevel@tonic-gate  * programming interface for ATA (subclass 5)
2437c478bd9Sstevel@tonic-gate  */
2447c478bd9Sstevel@tonic-gate #define	PCI_ATA_IF_SINGLE_DMA	0x20	/* ATA controller with single DMA */
2457c478bd9Sstevel@tonic-gate #define	PCI_ATA_IF_CHAINED_DMA	0x30	/* ATA controller with chained DMA */
2467c478bd9Sstevel@tonic-gate 
2477c478bd9Sstevel@tonic-gate /*
2487c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x2 (Network controllers)
2497c478bd9Sstevel@tonic-gate  */
2507c478bd9Sstevel@tonic-gate #define	PCI_NET_ENET		0x0	/* Ethernet Controller */
2517c478bd9Sstevel@tonic-gate #define	PCI_NET_TOKEN		0x1	/* Token Ring Controller */
2527c478bd9Sstevel@tonic-gate #define	PCI_NET_FDDI		0x2	/* FDDI Controller */
2537c478bd9Sstevel@tonic-gate #define	PCI_NET_ATM		0x3	/* ATM Controller */
2547c478bd9Sstevel@tonic-gate #define	PCI_NET_ISDN		0x4	/* ISDN Controller */
2557c478bd9Sstevel@tonic-gate #define	PCI_NET_WFIP		0x5	/* WorldFip Controller */
2567c478bd9Sstevel@tonic-gate #define	PCI_NET_PICMG		0x6	/* PICMG 2.14 Multi Computing */
2577c478bd9Sstevel@tonic-gate #define	PCI_NET_OTHER		0x80	/* Other Network Controller */
2587c478bd9Sstevel@tonic-gate 
2597c478bd9Sstevel@tonic-gate /*
2607c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 03 (display controllers)
2617c478bd9Sstevel@tonic-gate  */
2627c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_VGA		0x0	/* VGA device */
2637c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_XGA		0x1	/* XGA device */
2647c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_3D		0x2	/* 3D controller */
2657c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_OTHER	0x80	/* Other Display Device */
2667c478bd9Sstevel@tonic-gate 
2677c478bd9Sstevel@tonic-gate /*
2687c478bd9Sstevel@tonic-gate  * programming interface for display for display class (subclass 0) VGA ctrlrs
2697c478bd9Sstevel@tonic-gate  */
2707c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_IF_VGA	0x0	/* VGA compatible */
2717c478bd9Sstevel@tonic-gate #define	PCI_DISPLAY_IF_8514	0x1	/* 8514 compatible */
2727c478bd9Sstevel@tonic-gate 
2737c478bd9Sstevel@tonic-gate /*
2747c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x4 (multi-media devices)
2757c478bd9Sstevel@tonic-gate  */
2767c478bd9Sstevel@tonic-gate #define	PCI_MM_VIDEO		0x0	/* Video device */
2777c478bd9Sstevel@tonic-gate #define	PCI_MM_AUDIO		0x1	/* Audio device */
2787c478bd9Sstevel@tonic-gate #define	PCI_MM_TELEPHONY	0x2	/* Computer Telephony device */
2797c478bd9Sstevel@tonic-gate #define	PCI_MM_OTHER		0x80	/* Other Multimedia Device */
2807c478bd9Sstevel@tonic-gate 
2817c478bd9Sstevel@tonic-gate /*
2827c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x5 (memory controllers)
2837c478bd9Sstevel@tonic-gate  */
2847c478bd9Sstevel@tonic-gate #define	PCI_MEM_RAM		0x0	/* RAM device */
2857c478bd9Sstevel@tonic-gate #define	PCI_MEM_FLASH		0x1	/* FLASH device */
2867c478bd9Sstevel@tonic-gate #define	PCI_MEM_OTHER		0x80	/* Other Memory Controller */
2877c478bd9Sstevel@tonic-gate 
2887c478bd9Sstevel@tonic-gate /*
2897c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x6 (Bridge devices)
2907c478bd9Sstevel@tonic-gate  */
2917c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_HOST		0x0	/* Host/PCI Bridge */
2927c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_ISA		0x1	/* PCI/ISA Bridge */
2937c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_EISA		0x2	/* PCI/EISA Bridge */
2947c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_MC		0x3	/* PCI/MC Bridge */
2957c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_PCI		0x4	/* PCI/PCI Bridge */
2967c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_PCMCIA	0x5	/* PCI/PCMCIA Bridge */
2977c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_NUBUS	0x6	/* PCI/NUBUS Bridge */
2987c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_CARDBUS	0x7	/* PCI/CARDBUS Bridge */
2997c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_RACE		0x8	/* RACE-way Bridge */
3007c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_STPCI	0x9	/* Semi-transparent PCI/PCI Bridge */
3017c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_IB		0xA	/* InfiniBand/PCI host Bridge */
3027c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_OTHER	0x80	/* PCI/Other Bridge Device */
3037c478bd9Sstevel@tonic-gate 
3047c478bd9Sstevel@tonic-gate /*
3057c478bd9Sstevel@tonic-gate  * programming interface for Bridges class 0x6 (subclass 4) PCI-PCI bridge
3067c478bd9Sstevel@tonic-gate  */
3077c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_PCI_IF_PCI2PCI	0x0	/* PCI-PCI bridge */
3087c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_PCI_IF_SUBDECODE	0x1	/* Subtractive Decode */
3097c478bd9Sstevel@tonic-gate 						/* PCI/PCI bridge */
3107c478bd9Sstevel@tonic-gate 
3117c478bd9Sstevel@tonic-gate /*
3127c478bd9Sstevel@tonic-gate  * programming interface for Bridges class 0x6 (subclass 08) RACEway bridge
3137c478bd9Sstevel@tonic-gate  */
3147c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_RACE_IF_TRANSPARENT	0x0	/* Transport mode */
3157c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_RACE_IF_ENDPOINT	0x1	/* Endpoint mode */
3167c478bd9Sstevel@tonic-gate 
3177c478bd9Sstevel@tonic-gate /*
3187c478bd9Sstevel@tonic-gate  * programming interface for Bridges class 0x6 (subclass 09)
3197c478bd9Sstevel@tonic-gate  * Semi-transparent PCI-to-PCI bridge
3207c478bd9Sstevel@tonic-gate  */
3217c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_STPCI_IF_PRIMARY	0x40	/* primary PCI side bus */
3227c478bd9Sstevel@tonic-gate 						/* facing system processor */
3237c478bd9Sstevel@tonic-gate #define	PCI_BRIDGE_STPCI_IF_SECONDARY	0x80	/* secondary PCI side bus */
3247c478bd9Sstevel@tonic-gate 						/* facing system processor */
3257c478bd9Sstevel@tonic-gate 
3267c478bd9Sstevel@tonic-gate /*
3277c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x7 (communication devices)
3287c478bd9Sstevel@tonic-gate  */
3297c478bd9Sstevel@tonic-gate #define	PCI_COMM_GENERIC_XT	0x0	/* XT Compatible Serial Controller */
3307c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL	0x1	/* Parallel Port Controller */
3317c478bd9Sstevel@tonic-gate #define	PCI_COMM_MSC		0x2	/* Multiport Serial Controller */
3327c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM		0x3	/* Modem Controller */
3337c478bd9Sstevel@tonic-gate #define	PCI_COMM_GPIB		0x4	/* GPIB Controller */
3347c478bd9Sstevel@tonic-gate #define	PCI_COMM_SMARTCARD	0x5	/* Smart Card Controller */
3357c478bd9Sstevel@tonic-gate #define	PCI_COMM_OTHER		0x80	/* Other Communications Controller */
3367c478bd9Sstevel@tonic-gate 
3377c478bd9Sstevel@tonic-gate /*
3387c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x7 / subclass 0x0 (Serial)
3397c478bd9Sstevel@tonic-gate  */
3407c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_GENERIC	0x0	/* Generic XT-compat serial */
3417c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16450	0x1	/* 16450-compat serial ctrlr */
3427c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16550	0x2	/* 16550-compat serial ctrlr */
3437c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16650	0x3	/* 16650-compat serial ctrlr */
3447c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16750	0x4	/* 16750-compat serial ctrlr */
3457c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16850	0x5	/* 16850-compat serial ctrlr */
3467c478bd9Sstevel@tonic-gate #define	PCI_COMM_SERIAL_IF_16950	0x6	/* 16950-compat serial ctrlr */
3477c478bd9Sstevel@tonic-gate 
3487c478bd9Sstevel@tonic-gate /*
3497c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x7 / subclass 0x1 (Parallel)
3507c478bd9Sstevel@tonic-gate  */
3517c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL_IF_GENERIC	0x0	/* Generic Parallel port */
3527c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL_IF_BIDIRECT	0x1	/* Bi-directional Parallel */
3537c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL_IF_ECP	0x2	/* ECP 1.X Parallel port */
3547c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL_IF_1284	0x3	/* IEEE 1284 Parallel port */
3557c478bd9Sstevel@tonic-gate #define	PCI_COMM_PARALLEL_IF_1284_TARG	0xFE	/* IEEE 1284 target device */
3567c478bd9Sstevel@tonic-gate 
3577c478bd9Sstevel@tonic-gate /*
3587c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x7 / subclass 0x3 (Modem)
3597c478bd9Sstevel@tonic-gate  */
3607c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM_IF_GENERIC	0x0	/* Generic Modem */
3617c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM_IF_HAYES_16450	0x1	/* Hayes 16450-compat Modem */
3627c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM_IF_HAYES_16550	0x2	/* Hayes 16550-compat Modem */
3637c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM_IF_HAYES_16650	0x3	/* Hayes 16650-compat Modem */
3647c478bd9Sstevel@tonic-gate #define	PCI_COMM_MODEM_IF_HAYES_16750	0x4	/* Hayes 16750-compat Modem */
3657c478bd9Sstevel@tonic-gate 
3667c478bd9Sstevel@tonic-gate /*
3677c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x8
3687c478bd9Sstevel@tonic-gate  */
3697c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC		0x0	/* Generic PIC */
3707c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_DMA		0x1	/* Generic DMA Controller */
3717c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_TIMER	0x2	/* Generic System Timer Controller */
3727c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_RTC		0x3	/* Generic RTC Controller */
3737c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_HPC		0x3	/* Generic PCI Hot-Plug Controller */
3747c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_OTHER	0x80	/* Other System Peripheral */
3757c478bd9Sstevel@tonic-gate 
3767c478bd9Sstevel@tonic-gate /*
3777c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x8 / subclass 0x0 (interrupt controller)
3787c478bd9Sstevel@tonic-gate  */
3797c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC_IF_GENERIC	0x0	/* Generic 8259 APIC */
3807c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC_IF_ISA		0x1	/* ISA PIC */
3817c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC_IF_EISA		0x2	/* EISA PIC */
3827c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC_IF_IO_APIC	0x10	/* I/O APIC interrupt ctrlr */
3837c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_PIC_IF_IOX_APIC	0x20	/* I/O(x) APIC intr ctrlr */
3847c478bd9Sstevel@tonic-gate 
3857c478bd9Sstevel@tonic-gate /*
3867c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x8 / subclass 0x1 (DMA controller)
3877c478bd9Sstevel@tonic-gate  */
3887c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_DMA_IF_GENERIC	0x0	/* Generic 8237 DMA ctrlr */
3897c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_DMA_IF_ISA		0x1	/* ISA DMA ctrlr */
3907c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_DMA_IF_EISA		0x2	/* EISA DMA ctrlr */
3917c478bd9Sstevel@tonic-gate 
3927c478bd9Sstevel@tonic-gate /*
3937c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x8 / subclass 0x2 (timer)
3947c478bd9Sstevel@tonic-gate  */
3957c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_TIMER_IF_GENERIC	0x0	/* Generic 8254 system timer */
3967c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_TIMER_IF_ISA		0x1	/* ISA system timers */
3977c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_TIMER_IF_EISA	0x2	/* EISA system timers (two) */
3987c478bd9Sstevel@tonic-gate 
3997c478bd9Sstevel@tonic-gate /*
4007c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x8 / subclass 0x3 (realtime clock)
4017c478bd9Sstevel@tonic-gate  */
4027c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_RTC_IF_GENERIC	0x0	/* Generic RTC controller */
4037c478bd9Sstevel@tonic-gate #define	PCI_PERIPH_RTC_IF_ISA		0x1	/* ISA RTC controller */
4047c478bd9Sstevel@tonic-gate 
4057c478bd9Sstevel@tonic-gate /*
4067c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x9
4077c478bd9Sstevel@tonic-gate  */
4087c478bd9Sstevel@tonic-gate #define	PCI_INPUT_KEYBOARD	0x0	/* Keyboard Controller */
4097c478bd9Sstevel@tonic-gate #define	PCI_INPUT_DIGITIZ	0x1	/* Digitizer (Pen) */
4107c478bd9Sstevel@tonic-gate #define	PCI_INPUT_MOUSE		0x2	/* Mouse Controller */
4117c478bd9Sstevel@tonic-gate #define	PCI_INPUT_SCANNER	0x3	/* Scanner Controller */
4127c478bd9Sstevel@tonic-gate #define	PCI_INPUT_GAMEPORT	0x4	/* Gameport Controller */
4137c478bd9Sstevel@tonic-gate #define	PCI_INPUT_OTHER		0x80	/* Other Input Controller */
4147c478bd9Sstevel@tonic-gate 
4157c478bd9Sstevel@tonic-gate /*
4167c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0x9 / subclass 0x4 (Gameport controller)
4177c478bd9Sstevel@tonic-gate  */
4187c478bd9Sstevel@tonic-gate #define	PCI_INPUT_GAMEPORT_IF_GENERIC	0x00	/* Generic controller */
4197c478bd9Sstevel@tonic-gate #define	PCI_INPUT_GAMEPORT_IF_LEGACY	0x10	/* Legacy controller */
4207c478bd9Sstevel@tonic-gate 
4217c478bd9Sstevel@tonic-gate /*
4227c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xa
4237c478bd9Sstevel@tonic-gate  */
4247c478bd9Sstevel@tonic-gate #define	PCI_DOCK_GENERIC	0x00	/* Generic Docking Station */
4257c478bd9Sstevel@tonic-gate #define	PCI_DOCK_OTHER		0x80	/* Other Type of Docking Station */
4267c478bd9Sstevel@tonic-gate 
4277c478bd9Sstevel@tonic-gate /*
4287c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xb
4297c478bd9Sstevel@tonic-gate  */
4307c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_386	0x0	/* 386 */
4317c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_486	0x1	/* 486 */
4327c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_PENT	0x2	/* Pentium */
4337c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_ALPHA	0x10	/* Alpha */
4347c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_POWERPC	0x20	/* PowerPC */
4357c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_MIPS	0x30	/* MIPS */
4367c478bd9Sstevel@tonic-gate #define	PCI_PROCESSOR_COPROC	0x40	/* Co-processor */
4377c478bd9Sstevel@tonic-gate 
4387c478bd9Sstevel@tonic-gate /*
4397c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xc (Serial Controllers)
4407c478bd9Sstevel@tonic-gate  */
4417c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_FIRE		0x0	/* FireWire (IEEE 1394) */
4427c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_ACCESS	0x1	/* ACCESS.bus */
4437c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_SSA		0x2	/* SSA */
4447c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB		0x3	/* Universal Serial Bus */
4457c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_FIBRE	0x4	/* Fibre Channel */
4467c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_SMBUS	0x5	/* System Management Bus */
4477c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_IB		0x6	/* InfiniBand */
4487c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_IPMI		0x7	/* IPMI */
4497c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_SERCOS	0x8	/* SERCOS Interface Std (IEC 61491) */
4507c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_CANBUS	0x9	/* CANbus */
4517c478bd9Sstevel@tonic-gate 
4527c478bd9Sstevel@tonic-gate /*
4537c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0xC / subclass 0x3 (USB controller)
4547c478bd9Sstevel@tonic-gate  */
4557c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB_IF_UHCI 		0x00	/* UHCI Compliant */
4567c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB_IF_OHCI 		0x10	/* OHCI Compliant */
4577c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB_IF_EHCI 		0x20	/* EHCI Compliant */
4587c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB_IF_GENERIC 	0x80	/* no specific HCD */
4597c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_USB_IF_DEVICE 	0xFE	/* not a HCD */
4607c478bd9Sstevel@tonic-gate 
4617c478bd9Sstevel@tonic-gate /*
4627c478bd9Sstevel@tonic-gate  * Programming interfaces for class 0xC / subclass 0x7 (IPMI controller)
4637c478bd9Sstevel@tonic-gate  */
4647c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_IPMI_IF_SMIC 	0x0	/* SMIC Interface */
4657c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_IPMI_IF_KBD 		0x1	/* Keyboard Ctrl Style Intfc */
4667c478bd9Sstevel@tonic-gate #define	PCI_SERIAL_IPMI_IF_BTI		0x2	/* Block Transfer Interface */
4677c478bd9Sstevel@tonic-gate 
4687c478bd9Sstevel@tonic-gate /*
4697c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xd (Wireless controllers)
4707c478bd9Sstevel@tonic-gate  */
4717c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_IRDA		0x0	/* iRDA Compatible Controller */
4727c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_IR			0x1	/* Consumer IR Controller */
4737c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_RF			0x10	/* RF Controller */
4747c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_BLUETOOTH		0x11	/* Bluetooth Controller */
4757c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_BROADBAND		0x12	/* Broadband Controller */
4767c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_80211A		0x20	/* Ethernet 802.11a 5 GHz */
4777c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_80211B		0x21	/* Ethernet 802.11b 2.4 GHz */
4787c478bd9Sstevel@tonic-gate #define	PCI_WIRELESS_OTHER		0x80	/* Other Wireless Controllers */
4797c478bd9Sstevel@tonic-gate 
4807c478bd9Sstevel@tonic-gate /*
4817c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xe (Intelligent I/O controllers)
4827c478bd9Sstevel@tonic-gate  */
4837c478bd9Sstevel@tonic-gate #define	PCI_INTIO_I20			0x1	/* I20 Arch Spec 1.0 */
4847c478bd9Sstevel@tonic-gate 
4857c478bd9Sstevel@tonic-gate /*
4867c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0xf (Satellite Communication controllers)
4877c478bd9Sstevel@tonic-gate  */
4887c478bd9Sstevel@tonic-gate #define	PCI_SATELLITE_COMM_TV		0x01	/* TV */
4897c478bd9Sstevel@tonic-gate #define	PCI_SATELLITE_COMM_AUDIO	0x02	/* Audio */
4907c478bd9Sstevel@tonic-gate #define	PCI_SATELLITE_COMM_VOICE	0x03	/* Voice */
4917c478bd9Sstevel@tonic-gate #define	PCI_SATELLITE_COMM_DATA		0x04	/* DATA */
4927c478bd9Sstevel@tonic-gate 
4937c478bd9Sstevel@tonic-gate /*
4947c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x10 (Encryption/Decryption controllers)
4957c478bd9Sstevel@tonic-gate  */
4967c478bd9Sstevel@tonic-gate #define	PCI_CRYPT_NETWORK		0x00	/* Network and Computing */
4977c478bd9Sstevel@tonic-gate #define	PCI_CRYPT_ENTERTAINMENT		0x10	/* Entertainment en/decrypt */
4987c478bd9Sstevel@tonic-gate #define	PCI_CRYPT_OTHER			0x80	/* Other en/decryption ctrlrs */
4997c478bd9Sstevel@tonic-gate 
5007c478bd9Sstevel@tonic-gate /*
5017c478bd9Sstevel@tonic-gate  * PCI Sub-class codes - base class 0x11 (Signal Processing controllers)
5027c478bd9Sstevel@tonic-gate  */
5037c478bd9Sstevel@tonic-gate #define	PCI_SIGNAL_DPIO			0x00	/* DPIO modules */
5047c478bd9Sstevel@tonic-gate #define	PCI_SIGNAL_PERF_COUNTERS	0x01	/* Performance counters */
5057c478bd9Sstevel@tonic-gate #define	PCI_SIGNAL_COMM_SYNC		0x10	/* Comm. synchronization plus */
5067c478bd9Sstevel@tonic-gate 						/* time and freq test ctrlr */
5077c478bd9Sstevel@tonic-gate #define	PCI_SIGNAL_MANAGEMENT		0x20	/* Management card */
5087c478bd9Sstevel@tonic-gate #define	PCI_SIGNAL_OTHER		0x80	/* DSP/DAP controller */
5097c478bd9Sstevel@tonic-gate 
5107c478bd9Sstevel@tonic-gate /* PCI header decode */
5117c478bd9Sstevel@tonic-gate #define	PCI_HEADER_MULTI	0x80	/* multi-function device */
5127c478bd9Sstevel@tonic-gate #define	PCI_HEADER_ZERO		0x00	/* type zero PCI header */
5137c478bd9Sstevel@tonic-gate #define	PCI_HEADER_ONE		0x01	/* type one PCI header */
5147c478bd9Sstevel@tonic-gate #define	PCI_HEADER_TWO		0x02	/* type two PCI header */
5157c478bd9Sstevel@tonic-gate #define	PCI_HEADER_PPB		PCI_HEADER_ONE  /* type one PCI to PCI Bridge */
5167c478bd9Sstevel@tonic-gate #define	PCI_HEADER_CARDBUS	PCI_HEADER_TWO	/* type one PCI header */
5177c478bd9Sstevel@tonic-gate 
5187c478bd9Sstevel@tonic-gate #define	PCI_HEADER_TYPE_M	0x7f  /* type mask for header */
5197c478bd9Sstevel@tonic-gate 
5207c478bd9Sstevel@tonic-gate /*
5217c478bd9Sstevel@tonic-gate  * Base register bit definitions.
5227c478bd9Sstevel@tonic-gate  */
5237c478bd9Sstevel@tonic-gate #define	PCI_BASE_SPACE_M    0x1  /* memory space indicator */
5247c478bd9Sstevel@tonic-gate #define	PCI_BASE_SPACE_IO   0x1   /* IO space */
5257c478bd9Sstevel@tonic-gate #define	PCI_BASE_SPACE_MEM  0x0   /* memory space */
5267c478bd9Sstevel@tonic-gate 
5277c478bd9Sstevel@tonic-gate #define	PCI_BASE_TYPE_MEM   0x0   /* 32-bit memory address */
5287c478bd9Sstevel@tonic-gate #define	PCI_BASE_TYPE_LOW   0x2   /* less than 1Mb address */
5297c478bd9Sstevel@tonic-gate #define	PCI_BASE_TYPE_ALL   0x4   /* 64-bit memory address */
5307c478bd9Sstevel@tonic-gate #define	PCI_BASE_TYPE_RES   0x6   /* reserved */
5317c478bd9Sstevel@tonic-gate 
5327c478bd9Sstevel@tonic-gate #define	PCI_BASE_TYPE_M		0x00000006  /* type indicator mask */
5337c478bd9Sstevel@tonic-gate #define	PCI_BASE_PREF_M		0x00000008  /* prefetch mask */
5347c478bd9Sstevel@tonic-gate #define	PCI_BASE_M_ADDR_M	0xfffffff0  /* memory address mask */
5357c478bd9Sstevel@tonic-gate #define	PCI_BASE_IO_ADDR_M	0xfffffffe  /* I/O address mask */
5367c478bd9Sstevel@tonic-gate 
5377c478bd9Sstevel@tonic-gate #define	PCI_BASE_ROM_ADDR_M	0xfffff800  /* ROM address mask */
5387c478bd9Sstevel@tonic-gate #define	PCI_BASE_ROM_ENABLE	0x00000001  /* ROM decoder enable */
5397c478bd9Sstevel@tonic-gate 
5407c478bd9Sstevel@tonic-gate /*
5417c478bd9Sstevel@tonic-gate  * Capabilities linked list entry offsets
5427c478bd9Sstevel@tonic-gate  */
5437c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID		0x0	/* capability identifier, 1 byte */
5447c478bd9Sstevel@tonic-gate #define	PCI_CAP_NEXT_PTR	0x1	/* next entry pointer, 1 byte */
54570025d76Sjohnny #define	PCI_CAP_ID_REGS_OFF	0x2	/* cap id register offset */
5467c478bd9Sstevel@tonic-gate #define	PCI_CAP_MAX_PTR		0x30	/* maximum number of cap pointers */
5477c478bd9Sstevel@tonic-gate #define	PCI_CAP_PTR_OFF		0x40	/* minimum cap pointer offset */
5487c478bd9Sstevel@tonic-gate #define	PCI_CAP_PTR_MASK	0xFC	/* mask for capability pointer */
5497c478bd9Sstevel@tonic-gate 
5507c478bd9Sstevel@tonic-gate /*
5517c478bd9Sstevel@tonic-gate  * Capability identifier values
5527c478bd9Sstevel@tonic-gate  */
5537c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_PM		0x1	/* power management entry */
5547c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_AGP		0x2	/* AGP supported */
5557c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_VPD		0x3	/* VPD supported */
5567c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_SLOT_ID	0x4	/* Slot Identification supported */
5577c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_MSI		0x5	/* MSI supported */
5587c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_cPCI_HS	0x6	/* CompactPCI Host Swap supported */
5597c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_PCIX		0x7	/* PCI-X supported */
5607c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_HT		0x8	/* HyperTransport supported */
5617c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_VS		0x9	/* Vendor Specific */
5627c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_DEBUG_PORT	0xA	/* Debug Port supported */
5637c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_cPCI_CRC	0xB	/* CompactPCI central resource ctrl */
5647c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_PCI_HOTPLUG	0xC	/* PCI Hot Plug supported */
5657c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_AGP_8X	0xE	/* AGP 8X supported */
5667c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_SECURE_DEV	0xF	/* Secure Device supported */
5677c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_PCI_E	0x10	/* PCI Express supported */
5687c478bd9Sstevel@tonic-gate #define	PCI_CAP_ID_MSI_X	0x11	/* MSI-X supported */
5697c478bd9Sstevel@tonic-gate 
5707c478bd9Sstevel@tonic-gate /*
5717c478bd9Sstevel@tonic-gate  * Capability next entry pointer values
5727c478bd9Sstevel@tonic-gate  */
5737c478bd9Sstevel@tonic-gate #define	PCI_CAP_NEXT_PTR_NULL	0x0	/* no more entries in the list */
5747c478bd9Sstevel@tonic-gate 
5757c478bd9Sstevel@tonic-gate /*
5767c478bd9Sstevel@tonic-gate  * PCI power management (PM) capability entry offsets
5777c478bd9Sstevel@tonic-gate  */
5787c478bd9Sstevel@tonic-gate #define	PCI_PMCAP		0x2	/* PM capabilities, 2 bytes */
5797c478bd9Sstevel@tonic-gate #define	PCI_PMCSR		0x4	/* PM control/status reg, 2 bytes */
5807c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_BSE		0x6	/* PCI-PCI bridge extensions, 1 byte */
5817c478bd9Sstevel@tonic-gate #define	PCI_PMDATA		0x7	/* PM data, 1 byte */
5827c478bd9Sstevel@tonic-gate 
5837c478bd9Sstevel@tonic-gate /*
5847c478bd9Sstevel@tonic-gate  * PM capabilities values - 2 bytes
5857c478bd9Sstevel@tonic-gate  */
5867c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_VER_1_0	0x1	/* PCI PM spec 1.0 */
5877c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_VER_1_1	0x2	/* PCI PM spec 1.1 */
5887c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_VER_MASK	0x7	/* version mask */
5897c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_PME_CLOCK	0x8	/* needs PCI clock for PME */
5907c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_DSI		0x20	/* needs device specific init */
5917c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_SELF	0x0	/* 0 aux current - self powered */
5927c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_55mA	0x40	/* 55 mA aux current */
5937c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_100mA	0x80	/* 100 mA aux current */
5947c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_160mA	0xc0	/* 160 mA aux current */
5957c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_220mA	0x100	/* 220 mA aux current */
5967c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_270mA	0x140	/* 270 mA aux current */
5977c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_320mA	0x180	/* 320 mA aux current */
5987c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_375mA	0x1c0	/* 375 mA aux current */
5997c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_AUX_CUR_MASK	0x1c0	/* 3.3Vaux aux current needs */
6007c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D1		0x200	/* D1 state supported */
6017c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D2		0x400	/* D2 state supported */
6027c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D0_PME	0x800	/* PME from D0 */
6037c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D1_PME	0x1000	/* PME from D1 */
6047c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D2_PME	0x2000	/* PME from D2 */
6057c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D3HOT_PME	0x4000	/* PME from D3hot */
6067c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_D3COLD_PME	0x8000	/* PME from D3cold */
6077c478bd9Sstevel@tonic-gate #define	PCI_PMCAP_PME_MASK	0xf800	/* PME support mask */
6087c478bd9Sstevel@tonic-gate 
6097c478bd9Sstevel@tonic-gate /*
6107c478bd9Sstevel@tonic-gate  * PM control/status values - 2 bytes
6117c478bd9Sstevel@tonic-gate  */
6127c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_D0			0x0	/* power state D0 */
6137c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_D1			0x1	/* power state D1 */
6147c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_D2			0x2	/* power state D2 */
6157c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_D3HOT			0x3	/* power state D3hot */
6167c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_STATE_MASK		0x3	/* power state mask */
6177c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_PME_EN		0x100	/* enable PME assertion */
6187c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D0_PWR_C		0x0	/* D0 power consumed */
6197c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D1_PWR_C		0x200	/* D1 power consumed */
6207c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D2_PWR_C		0x400	/* D2 power consumed */
6217c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D3_PWR_C		0x600	/* D3 power consumed */
6227c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D0_PWR_D		0x800	/* D0 power dissipated */
6237c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D1_PWR_D		0xa00	/* D1 power dissipated */
6247c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D2_PWR_D		0xc00	/* D2 power dissipated */
6257c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_D3_PWR_D		0xe00	/* D3 power dissipated */
6267c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_COM_C		0x1000	/* common power consumption */
6277c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSEL_MASK		0x1e00	/* data select mask */
6287c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSCL_UNKNOWN		0x0	/* data scale unknown */
6297c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSCL_1_BY_10		0x2000	/* data scale 0.1x */
6307c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSCL_1_BY_100		0x4000	/* data scale 0.01x */
6317c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSCL_1_BY_1000	0x6000	/* data scale 0.001x */
6327c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_DSCL_MASK		0x6000	/* data scale mask */
6337c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_PME_STAT		0x8000	/* PME status */
6347c478bd9Sstevel@tonic-gate 
6357c478bd9Sstevel@tonic-gate /*
6367c478bd9Sstevel@tonic-gate  * PM PMCSR PCI to PCI bridge support extension values - 1 byte
6377c478bd9Sstevel@tonic-gate  */
6387c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_BSE_B2_B3	0x40	/* bridge D3hot -> secondary B2 */
6397c478bd9Sstevel@tonic-gate #define	PCI_PMCSR_BSE_BPCC_EN	0x80	/* bus power/clock control enabled */
6407c478bd9Sstevel@tonic-gate 
6417c478bd9Sstevel@tonic-gate /*
6427c478bd9Sstevel@tonic-gate  * PCI-X capability related definitions
6437c478bd9Sstevel@tonic-gate  */
6447c478bd9Sstevel@tonic-gate #define	PCI_PCIX_COMMAND	0x2	/* Command register offset */
64500d0963fSdilpreet #define	PCI_PCIX_STATUS		0x4	/* Status register offset */
64600d0963fSdilpreet #define	PCI_PCIX_ECC_STATUS	0x8	/* ECC Status register offset */
64700d0963fSdilpreet #define	PCI_PCIX_ECC_FST_AD	0xC	/* ECC First address register offset */
64800d0963fSdilpreet #define	PCI_PCIX_ECC_SEC_AD	0x10	/* ECC Second address register offset */
64900d0963fSdilpreet #define	PCI_PCIX_ECC_ATTR	0x14	/* ECC Attribute register offset */
6507c478bd9Sstevel@tonic-gate 
65100d0963fSdilpreet /*
65200d0963fSdilpreet  * PCI-X bridge capability related definitions
65300d0963fSdilpreet  */
65400d0963fSdilpreet #define	PCI_PCIX_SEC_STATUS	0x2	/* Secondary status register offset */
65500d0963fSdilpreet #define	PCI_PCIX_BDG_STATUS	0x4	/* Bridge Status register offset */
65600d0963fSdilpreet #define	PCI_PCIX_UP_SPL_CTL	0x8	/* Upstream split ctrl reg offset */
65700d0963fSdilpreet #define	PCI_PCIX_DOWN_SPL_CTL	0xC	/* Downstream split ctrl reg offset */
65800d0963fSdilpreet #define	PCI_PCIX_BDG_ECC_STATUS	0x10	/* ECC Status register offset */
65900d0963fSdilpreet #define	PCI_PCIX_BDG_ECC_FST_AD	0x14	/* ECC First address register offset */
66000d0963fSdilpreet #define	PCI_PCIX_BDG_ECC_SEC_AD	0x18	/* ECC Second address register offset */
66100d0963fSdilpreet #define	PCI_PCIX_BDG_ECC_ATTR	0x1C	/* ECC Attribute register offset */
66200d0963fSdilpreet 
66300d0963fSdilpreet /*
66400d0963fSdilpreet  * PCIX capabilities values
66500d0963fSdilpreet  */
6667c478bd9Sstevel@tonic-gate #define	PCI_PCIX_VER_MASK	0x3000	/* Bits 12 and 13 */
6677c478bd9Sstevel@tonic-gate #define	PCI_PCIX_VER_0		0x0000	/* PCIX cap list item version 0 */
6687c478bd9Sstevel@tonic-gate #define	PCI_PCIX_VER_1		0x1000	/* PCIX cap list item version 1 */
6697c478bd9Sstevel@tonic-gate #define	PCI_PCIX_VER_2		0x2000	/* PCIX cap list item version 2 */
6707c478bd9Sstevel@tonic-gate 
67100d0963fSdilpreet #define	PCI_PCIX_SPL_DSCD	0x40000 /* Split Completion Discarded */
67200d0963fSdilpreet #define	PCI_PCIX_UNEX_SPL	0x80000	/* Unexpected Split Completion */
67300d0963fSdilpreet #define	PCI_PCIX_RX_SPL_MSG	0x20000000 /* Recieved Spl Comp Error Message */
67400d0963fSdilpreet 
67500d0963fSdilpreet #define	PCI_PCIX_ECC_SEL	0x1	/* Secondary ECC register select */
67600d0963fSdilpreet #define	PCI_PCIX_ECC_EP		0x2	/* Error Present on other side */
67700d0963fSdilpreet #define	PCI_PCIX_ECC_S_CE	0x4	/* Addl Correctable ECC Error */
67800d0963fSdilpreet #define	PCI_PCIX_ECC_S_UE	0x8	/* Addl Uncorrectable ECC Error */
67900d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE	0x70	/* ECC Error Phase */
68000d0963fSdilpreet #define	PCI_PCIX_ECC_CORR	0x80	/* ECC Error Corrected */
68100d0963fSdilpreet #define	PCI_PCIX_ECC_SYN	0xff00	/* ECC Error Syndrome */
68200d0963fSdilpreet #define	PCI_PCIX_ECC_FST_CMD	0xf0000	 /* ECC Error First Command */
68300d0963fSdilpreet #define	PCI_PCIX_ECC_SEC_CMD	0xf00000 /* ECC Error Second Command */
68400d0963fSdilpreet #define	PCI_PCIX_ECC_UP_ATTR	0xf000000 /* ECC Error Upper Attributes */
68500d0963fSdilpreet 
68600d0963fSdilpreet /*
68700d0963fSdilpreet  * PCIX ECC Phase Values
68800d0963fSdilpreet  */
68900d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_NOERR	0x0
69000d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_FADDR	0x1
69100d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_SADDR	0x2
69200d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_ATTR		0x3
69300d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_DATA32	0x4
69400d0963fSdilpreet #define	PCI_PCIX_ECC_PHASE_DATA64	0x5
69500d0963fSdilpreet 
69600d0963fSdilpreet /*
69700d0963fSdilpreet  * PCI-X Command Encoding
69800d0963fSdilpreet  */
69900d0963fSdilpreet #define	PCI_PCIX_CMD_INTR		0x0
70000d0963fSdilpreet #define	PCI_PCIX_CMD_SPEC		0x1
70100d0963fSdilpreet #define	PCI_PCIX_CMD_IORD		0x2
70200d0963fSdilpreet #define	PCI_PCIX_CMD_IOWR		0x3
70300d0963fSdilpreet #define	PCI_PCIX_CMD_DEVID		0x5
70400d0963fSdilpreet #define	PCI_PCIX_CMD_MEMRD_DW		0x6
70500d0963fSdilpreet #define	PCI_PCIX_CMD_MEMWR		0x7
70600d0963fSdilpreet #define	PCI_PCIX_CMD_MEMRD_BL		0x8
70700d0963fSdilpreet #define	PCI_PCIX_CMD_MEMWR_BL		0x9
70800d0963fSdilpreet #define	PCI_PCIX_CMD_CFRD		0xA
70900d0963fSdilpreet #define	PCI_PCIX_CMD_CFWR		0xB
71000d0963fSdilpreet #define	PCI_PCIX_CMD_SPL		0xC
71100d0963fSdilpreet #define	PCI_PCIX_CMD_DADR		0xD
71200d0963fSdilpreet #define	PCI_PCIX_CMD_MEMRDBL		0xE
71300d0963fSdilpreet #define	PCI_PCIX_CMD_MEMWRBL		0xF
71400d0963fSdilpreet 
71500d0963fSdilpreet #if defined(_BIT_FIELDS_LTOH)
71600d0963fSdilpreet typedef struct pcix_attr {
71700d0963fSdilpreet 	uint32_t	lbc	:8,
71800d0963fSdilpreet 			rid	:16,
71900d0963fSdilpreet 			tag	:5,
72000d0963fSdilpreet 			ro	:1,
72100d0963fSdilpreet 			ns	:1,
72200d0963fSdilpreet 			r	:1;
72300d0963fSdilpreet } pcix_attr_t;
72400d0963fSdilpreet #elif defined(_BIT_FIELDS_HTOL)
72500d0963fSdilpreet typedef struct pcix_attr {
72600d0963fSdilpreet 	uint32_t	r	:1,
72700d0963fSdilpreet 			ns	:1,
72800d0963fSdilpreet 			ro	:1,
72900d0963fSdilpreet 			tag	:5,
73000d0963fSdilpreet 			rid	:16,
73100d0963fSdilpreet 			lbc	:8;
73200d0963fSdilpreet } pcix_attr_t;
73300d0963fSdilpreet #else
73400d0963fSdilpreet #error "bit field not defined"
73500d0963fSdilpreet #endif
73600d0963fSdilpreet 
73700d0963fSdilpreet #define	PCI_PCIX_BSS_SPL_DSCD	0x4	/* Secondary split comp discarded */
73800d0963fSdilpreet #define	PCI_PCIX_BSS_UNEX_SPL	0x8	/* Secondary unexpected split comp */
73900d0963fSdilpreet #define	PCI_PCIX_BSS_SPL_OR	0x10	/* Secondary split comp overrun */
74000d0963fSdilpreet #define	PCI_PCIX_BSS_SPL_DLY	0x20	/* Secondary split comp delayed */
74100d0963fSdilpreet 
7427c478bd9Sstevel@tonic-gate /*
7437c478bd9Sstevel@tonic-gate  * PCI Message Signalled Interrupts (MSI) capability entry offsets for 32-bit
7447c478bd9Sstevel@tonic-gate  */
7457c478bd9Sstevel@tonic-gate #define	PCI_MSI_CTRL		0x02	/* MSI control register, 2 bytes */
7467c478bd9Sstevel@tonic-gate #define	PCI_MSI_ADDR_OFFSET	0x04	/* MSI 32-bit msg address, 4 bytes */
7477c478bd9Sstevel@tonic-gate #define	PCI_MSI_32BIT_DATA	0x08	/* MSI 32-bit msg data, 2 bytes */
7487c478bd9Sstevel@tonic-gate #define	PCI_MSI_32BIT_MASK	0x0C	/* MSI 32-bit mask bits, 4 bytes */
7497c478bd9Sstevel@tonic-gate #define	PCI_MSI_32BIT_PENDING	0x10	/* MSI 32-bit pending bits, 4 bytes */
7507c478bd9Sstevel@tonic-gate 
7517c478bd9Sstevel@tonic-gate /*
7527c478bd9Sstevel@tonic-gate  * PCI Message Signalled Interrupts (MSI) capability entry offsets for 64-bit
7537c478bd9Sstevel@tonic-gate  */
7547c478bd9Sstevel@tonic-gate #define	PCI_MSI_64BIT_DATA	0x0C	/* MSI 64-bit msg data, 2 bytes */
7557c478bd9Sstevel@tonic-gate #define	PCI_MSI_64BIT_MASKBITS	0x10	/* MSI 64-bit mask bits, 4 bytes */
7567c478bd9Sstevel@tonic-gate #define	PCI_MSI_64BIT_PENDING	0x14	/* MSI 64-bit pending bits, 4 bytes */
7577c478bd9Sstevel@tonic-gate 
7587c478bd9Sstevel@tonic-gate /*
7597c478bd9Sstevel@tonic-gate  * PCI Message Signalled Interrupts (MSI) capability masks and shifts
7607c478bd9Sstevel@tonic-gate  */
7617c478bd9Sstevel@tonic-gate #define	PCI_MSI_ENABLE_BIT	0x0001	/* MSI enable mask in MSI ctrl reg */
7627c478bd9Sstevel@tonic-gate #define	PCI_MSI_MMC_MASK	0x000E	/* MMC mask in MSI ctrl reg */
7637c478bd9Sstevel@tonic-gate #define	PCI_MSI_MMC_SHIFT	0x1	/* Shift for MMC bits */
7647c478bd9Sstevel@tonic-gate #define	PCI_MSI_MME_MASK	0x0070	/* MME mask in MSI ctrl reg */
7657c478bd9Sstevel@tonic-gate #define	PCI_MSI_MME_SHIFT	0x4	/* Shift for MME bits */
7667c478bd9Sstevel@tonic-gate #define	PCI_MSI_64BIT_MASK	0x0080	/* 64bit support mask in MSI ctrl reg */
7677c478bd9Sstevel@tonic-gate #define	PCI_MSI_PVM_MASK	0x0100	/* PVM support mask in MSI ctrl reg */
7687c478bd9Sstevel@tonic-gate 
7697c478bd9Sstevel@tonic-gate /*
7707c478bd9Sstevel@tonic-gate  * PCI Extended Message Signalled Interrupts (MSI-X) capability entry offsets
7717c478bd9Sstevel@tonic-gate  */
7727c478bd9Sstevel@tonic-gate #define	PCI_MSIX_CTRL		0x02	/* MSI-X control register, 2 bytes */
7737c478bd9Sstevel@tonic-gate #define	PCI_MSIX_TBL_OFFSET	0x04	/* MSI-X table offset, 4 bytes */
7749c75c6bfSgovinda #define	PCI_MSIX_TBL_BIR_MASK	0x0007	/* MSI-X table BIR mask */
7759c75c6bfSgovinda #define	PCI_MSIX_PBA_OFFSET	0x08	/* MSI-X pending bit array, 4 bytes */
7769c75c6bfSgovinda #define	PCI_MSIX_PBA_BIR_MASK	0x0007	/* MSI-X PBA BIR mask */
7777c478bd9Sstevel@tonic-gate 
7787c478bd9Sstevel@tonic-gate #define	PCI_MSIX_TBL_SIZE_MASK	0x07FF	/* table size mask in MSI-X ctrl reg */
7797c478bd9Sstevel@tonic-gate #define	PCI_MSIX_FUNCTION_MASK	0x4000	/* function mask in MSI-X ctrl reg */
7807c478bd9Sstevel@tonic-gate #define	PCI_MSIX_ENABLE_BIT	0x8000	/* MSI-X enable mask in MSI-X ctl reg */
7817c478bd9Sstevel@tonic-gate 
7827c478bd9Sstevel@tonic-gate #define	PCI_MSIX_LOWER_ADDR_OFFSET	0	/* MSI-X lower addr offset */
7837c478bd9Sstevel@tonic-gate #define	PCI_MSIX_UPPER_ADDR_OFFSET	4	/* MSI-X upper addr offset */
7847c478bd9Sstevel@tonic-gate #define	PCI_MSIX_DATA_OFFSET		8	/* MSI-X data offset */
7857c478bd9Sstevel@tonic-gate #define	PCI_MSIX_VECTOR_CTRL_OFFSET	12	/* MSI-X vector ctrl offset */
7867c478bd9Sstevel@tonic-gate #define	PCI_MSIX_VECTOR_SIZE		16	/* MSI-X size of each vector */
7877c478bd9Sstevel@tonic-gate 
7887c478bd9Sstevel@tonic-gate /*
7897c478bd9Sstevel@tonic-gate  * PCI Message Signalled Interrupts: other interesting constants
7907c478bd9Sstevel@tonic-gate  */
7917c478bd9Sstevel@tonic-gate #define	PCI_MSI_MAX_INTRS	32	/* maximum MSI interrupts supported */
7927c478bd9Sstevel@tonic-gate #define	PCI_MSIX_MAX_INTRS	2048	/* maximum MSI-X interrupts supported */
7937c478bd9Sstevel@tonic-gate 
79470025d76Sjohnny /*
79570025d76Sjohnny  * PCI Slot Id Capabilities, 2 bytes
79670025d76Sjohnny  */
79770025d76Sjohnny /* Byte 1: Expansion Slot Register (ESR), Byte 2: Chassis Number Register */
79870025d76Sjohnny #define	PCI_CAPSLOT_ESR_NSLOTS_MASK	0x1F	/* Number of slots mask */
79970025d76Sjohnny #define	PCI_CAPSLOT_ESR_FIC		0x20	/* First In Chassis bit */
80070025d76Sjohnny #define	PCI_CAPSLOT_ESR_FIC_MASK	0x01	/* First In Chassis mask */
80170025d76Sjohnny #define	PCI_CAPSLOT_ESR_FIC_SHIFT	5	/* First In Chassis shift */
80270025d76Sjohnny #define	PCI_CAPSLOT_FIC(esr_reg)	((esr_reg) & PCI_CAPSLOT_ESR_FIC)
80370025d76Sjohnny #define	PCI_CAPSLOT_NSLOTS(esr_reg)	((esr_reg) & \
80470025d76Sjohnny 						PCI_CAPSLOT_ESR_NSLOTS_MASK)
80570025d76Sjohnny 
8067c478bd9Sstevel@tonic-gate /*
8077c478bd9Sstevel@tonic-gate  * other interesting PCI constants
8087c478bd9Sstevel@tonic-gate  */
8097c478bd9Sstevel@tonic-gate #define	PCI_BASE_NUM	6	/* num of base regs in configuration header */
8107c478bd9Sstevel@tonic-gate #define	PCI_BAR_SZ_32	4	/* size of 32 bit base addr reg in bytes */
8117c478bd9Sstevel@tonic-gate #define	PCI_BAR_SZ_64	8	/* size of 64 bit base addr reg in bytes */
8127c478bd9Sstevel@tonic-gate #define	PCI_BASE_SIZE	4	/* size of base reg in bytes */
8137c478bd9Sstevel@tonic-gate #define	PCI_CONF_HDR_SIZE	256	/* configuration header size */
81470025d76Sjohnny #define	PCI_MAX_BUS_NUM		256		/* Maximum PCI buses allowed */
8157c478bd9Sstevel@tonic-gate #define	PCI_CLK_33MHZ	(33 * 1000 * 1000)	/* 33MHz clock speed */
8167c478bd9Sstevel@tonic-gate #define	PCI_CLK_66MHZ	(66 * 1000 * 1000)	/* 66MHz clock speed */
8177c478bd9Sstevel@tonic-gate #define	PCI_CLK_133MHZ	(133 * 1000 * 1000)	/* 133MHz clock speed */
8187c478bd9Sstevel@tonic-gate 
81900d0963fSdilpreet /*
82000d0963fSdilpreet  * pci bus range definition
82100d0963fSdilpreet  */
82200d0963fSdilpreet typedef struct pci_bus_range {
82300d0963fSdilpreet 	uint32_t lo;
82400d0963fSdilpreet 	uint32_t hi;
82500d0963fSdilpreet } pci_bus_range_t;
82600d0963fSdilpreet 
82700d0963fSdilpreet /*
82800d0963fSdilpreet  * The following typedef is used to represent an entry in the "ranges"
82900d0963fSdilpreet  * property of a pci hostbridge device node.
83000d0963fSdilpreet  */
83100d0963fSdilpreet typedef struct pci_ranges {
83200d0963fSdilpreet 	uint32_t child_high;
83300d0963fSdilpreet 	uint32_t child_mid;
83400d0963fSdilpreet 	uint32_t child_low;
83500d0963fSdilpreet 	uint32_t parent_high;
83600d0963fSdilpreet 	uint32_t parent_low;
83700d0963fSdilpreet 	uint32_t size_high;
83800d0963fSdilpreet 	uint32_t size_low;
83900d0963fSdilpreet } pci_ranges_t;
84000d0963fSdilpreet 
84100d0963fSdilpreet /*
84200d0963fSdilpreet  * The following typedef is used to represent an entry in the "ranges"
84300d0963fSdilpreet  * property of a pci-pci bridge device node.
84400d0963fSdilpreet  */
84500d0963fSdilpreet typedef struct {
84600d0963fSdilpreet 	uint32_t child_high;
84700d0963fSdilpreet 	uint32_t child_mid;
84800d0963fSdilpreet 	uint32_t child_low;
84900d0963fSdilpreet 	uint32_t parent_high;
85000d0963fSdilpreet 	uint32_t parent_mid;
85100d0963fSdilpreet 	uint32_t parent_low;
85200d0963fSdilpreet 	uint32_t size_high;
85300d0963fSdilpreet 	uint32_t size_low;
85400d0963fSdilpreet } ppb_ranges_t;
85500d0963fSdilpreet 
8567c478bd9Sstevel@tonic-gate /*
8577c478bd9Sstevel@tonic-gate  * This structure represents one entry of the 1275 "reg" property and
8587c478bd9Sstevel@tonic-gate  * "assigned-addresses" property for a PCI node.  For the "reg" property, it
8597c478bd9Sstevel@tonic-gate  * may be one of an arbitrary length array for devices with multiple address
8607c478bd9Sstevel@tonic-gate  * windows.  For the "assigned-addresses" property, it denotes an assigned
8617c478bd9Sstevel@tonic-gate  * physical address on the PCI bus.  It may be one entry of the six entries
8627c478bd9Sstevel@tonic-gate  * for devices with multiple base registers.
8637c478bd9Sstevel@tonic-gate  *
8647c478bd9Sstevel@tonic-gate  * The physical address format is:
8657c478bd9Sstevel@tonic-gate  *
8667c478bd9Sstevel@tonic-gate  *             Bit#:  33222222 22221111 11111100 00000000
8677c478bd9Sstevel@tonic-gate  *                    10987654 32109876 54321098 76543210
8687c478bd9Sstevel@tonic-gate  *
8697c478bd9Sstevel@tonic-gate  * pci_phys_hi cell:  np0000tt bbbbbbbb dddddfff rrrrrrrr
8707c478bd9Sstevel@tonic-gate  * pci_phys_mid cell: hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh
8717c478bd9Sstevel@tonic-gate  * pci_phys_low cell: llllllll llllllll llllllll llllllll
8727c478bd9Sstevel@tonic-gate  *
8737c478bd9Sstevel@tonic-gate  * n          is 0 if the address is relocatable, 1 otherwise
8747c478bd9Sstevel@tonic-gate  * p          is 1 if the addressable region is "prefetchable", 0 otherwise
8757c478bd9Sstevel@tonic-gate  * t          is 1 if the address range is aliased
8767c478bd9Sstevel@tonic-gate  * tt         is the type code, denoting which address space
8777c478bd9Sstevel@tonic-gate  * bbbbbbbb   is the 8-bit bus number
8787c478bd9Sstevel@tonic-gate  * ddddd      is the 5-bit device number
8797c478bd9Sstevel@tonic-gate  * fff        is the 3-bit function number
8807c478bd9Sstevel@tonic-gate  * rrrrrrrr   is the 8-bit register number
8817c478bd9Sstevel@tonic-gate  * hh...hhh   is the 32-bit unsigned number
8827c478bd9Sstevel@tonic-gate  * ll...lll   is the 32-bit unsigned number
8837c478bd9Sstevel@tonic-gate  *
8847c478bd9Sstevel@tonic-gate  * The physical size format is:
8857c478bd9Sstevel@tonic-gate  *
8867c478bd9Sstevel@tonic-gate  * pci_size_hi cell:  hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh
8877c478bd9Sstevel@tonic-gate  * pci_size_low cell: llllllll llllllll llllllll llllllll
8887c478bd9Sstevel@tonic-gate  *
8897c478bd9Sstevel@tonic-gate  * hh...hhh   is the 32-bit unsigned number
8907c478bd9Sstevel@tonic-gate  * ll...lll   is the 32-bit unsigned number
8917c478bd9Sstevel@tonic-gate  */
8927c478bd9Sstevel@tonic-gate struct pci_phys_spec {
8937c478bd9Sstevel@tonic-gate 	uint_t pci_phys_hi;		/* child's address, hi word */
8947c478bd9Sstevel@tonic-gate 	uint_t pci_phys_mid;		/* child's address, middle word */
8957c478bd9Sstevel@tonic-gate 	uint_t pci_phys_low;		/* child's address, low word */
8967c478bd9Sstevel@tonic-gate 	uint_t pci_size_hi;		/* high word of size field */
8977c478bd9Sstevel@tonic-gate 	uint_t pci_size_low;		/* low word of size field */
8987c478bd9Sstevel@tonic-gate };
8997c478bd9Sstevel@tonic-gate 
9007c478bd9Sstevel@tonic-gate typedef struct pci_phys_spec pci_regspec_t;
9017c478bd9Sstevel@tonic-gate 
9027c478bd9Sstevel@tonic-gate /*
9037c478bd9Sstevel@tonic-gate  * PCI masks for pci_phy_hi of PCI 1275 address cell.
9047c478bd9Sstevel@tonic-gate  */
9057c478bd9Sstevel@tonic-gate #define	PCI_REG_REG_M		0xff		/* register mask */
9067c478bd9Sstevel@tonic-gate #define	PCI_REG_FUNC_M		0x700		/* function mask */
9077c478bd9Sstevel@tonic-gate #define	PCI_REG_DEV_M		0xf800		/* device mask */
9087c478bd9Sstevel@tonic-gate #define	PCI_REG_BUS_M		0xff0000	/* bus number mask */
9097c478bd9Sstevel@tonic-gate #define	PCI_REG_ADDR_M		0x3000000	/* address space mask */
9107c478bd9Sstevel@tonic-gate #define	PCI_REG_ALIAS_M		0x20000000	/* aliased bit mask */
9117c478bd9Sstevel@tonic-gate #define	PCI_REG_PF_M		0x40000000	/* prefetch bit mask */
9127c478bd9Sstevel@tonic-gate #define	PCI_REG_REL_M		0x80000000	/* relocation bit mask */
9137c478bd9Sstevel@tonic-gate #define	PCI_REG_BDFR_M		0xffffff	/* bus, dev, func, reg mask */
9147c478bd9Sstevel@tonic-gate 
9157c478bd9Sstevel@tonic-gate #define	PCI_REG_FUNC_SHIFT	8		/* Offset of function bits */
9167c478bd9Sstevel@tonic-gate #define	PCI_REG_DEV_SHIFT	11		/* Offset of device bits */
9177c478bd9Sstevel@tonic-gate #define	PCI_REG_BUS_SHIFT	16		/* Offset of bus bits */
9187c478bd9Sstevel@tonic-gate #define	PCI_REG_ADDR_SHIFT	24		/* Offset of address bits */
9197c478bd9Sstevel@tonic-gate 
9207c478bd9Sstevel@tonic-gate #define	PCI_REG_REG_G(x)	((x) & PCI_REG_REG_M)
9217c478bd9Sstevel@tonic-gate #define	PCI_REG_FUNC_G(x)	(((x) & PCI_REG_FUNC_M) >> PCI_REG_FUNC_SHIFT)
9227c478bd9Sstevel@tonic-gate #define	PCI_REG_DEV_G(x)	(((x) & PCI_REG_DEV_M) >> PCI_REG_DEV_SHIFT)
9237c478bd9Sstevel@tonic-gate #define	PCI_REG_BUS_G(x)	(((x) & PCI_REG_BUS_M) >> PCI_REG_BUS_SHIFT)
9247c478bd9Sstevel@tonic-gate #define	PCI_REG_ADDR_G(x)	(((x) & PCI_REG_ADDR_M) >> PCI_REG_ADDR_SHIFT)
9257c478bd9Sstevel@tonic-gate #define	PCI_REG_BDFR_G(x)	((x) & PCI_REG_BDFR_M)
9267c478bd9Sstevel@tonic-gate 
9277c478bd9Sstevel@tonic-gate /*
9287c478bd9Sstevel@tonic-gate  * PCI bit encodings of pci_phys_hi of PCI 1275 address cell.
9297c478bd9Sstevel@tonic-gate  */
9307c478bd9Sstevel@tonic-gate #define	PCI_ADDR_MASK		PCI_REG_ADDR_M
9317c478bd9Sstevel@tonic-gate #define	PCI_ADDR_CONFIG		0x00000000	/* configuration address */
9327c478bd9Sstevel@tonic-gate #define	PCI_ADDR_IO		0x01000000	/* I/O address */
9337c478bd9Sstevel@tonic-gate #define	PCI_ADDR_MEM32		0x02000000	/* 32-bit memory address */
9347c478bd9Sstevel@tonic-gate #define	PCI_ADDR_MEM64		0x03000000	/* 64-bit memory address */
9357c478bd9Sstevel@tonic-gate #define	PCI_ALIAS_B		PCI_REG_ALIAS_M	/* aliased bit */
9367c478bd9Sstevel@tonic-gate #define	PCI_PREFETCH_B		PCI_REG_PF_M	/* prefetch bit */
9377c478bd9Sstevel@tonic-gate #define	PCI_RELOCAT_B		PCI_REG_REL_M	/* non-relocatable bit */
9387c478bd9Sstevel@tonic-gate #define	PCI_CONF_ADDR_MASK	0x00ffffff	/* mask for config address */
9397c478bd9Sstevel@tonic-gate 
9407c478bd9Sstevel@tonic-gate #define	PCI_HARDDEC_8514 2	/* number of reg entries for 8514 hard-decode */
9417c478bd9Sstevel@tonic-gate #define	PCI_HARDDEC_VGA	3	/* number of reg entries for VGA hard-decode */
9427c478bd9Sstevel@tonic-gate #define	PCI_HARDDEC_IDE	4	/* number of reg entries for IDE hard-decode */
9437c478bd9Sstevel@tonic-gate #define	PCI_HARDDEC_IDE_PRI 2	/* number of reg entries for IDE primary */
9447c478bd9Sstevel@tonic-gate #define	PCI_HARDDEC_IDE_SEC 2	/* number of reg entries for IDE secondary */
9457c478bd9Sstevel@tonic-gate 
9467c478bd9Sstevel@tonic-gate /*
9477c478bd9Sstevel@tonic-gate  * PCI Expansion ROM Header Format
9487c478bd9Sstevel@tonic-gate  */
9497c478bd9Sstevel@tonic-gate #define	PCI_ROM_SIGNATURE		0x0	/* ROM Signature 0xaa55 */
9507c478bd9Sstevel@tonic-gate #define	PCI_ROM_ARCH_UNIQUE_START	0x2	/* Start of processor unique */
9517c478bd9Sstevel@tonic-gate #define	PCI_ROM_PCI_DATA_STRUCT_PTR	0x18	/* Ptr to PCI Data Structure */
9527c478bd9Sstevel@tonic-gate 
9537c478bd9Sstevel@tonic-gate /*
9547c478bd9Sstevel@tonic-gate  * PCI Data Structure
9557c478bd9Sstevel@tonic-gate  *
9567c478bd9Sstevel@tonic-gate  * The PCI Data Structure is located within the first 64KB
9577c478bd9Sstevel@tonic-gate  * of the ROM image and must be DWORD aligned.
9587c478bd9Sstevel@tonic-gate  */
9597c478bd9Sstevel@tonic-gate #define	PCI_PDS_SIGNATURE	0x0	/* Signature, the string 'PCIR' */
9607c478bd9Sstevel@tonic-gate #define	PCI_PDS_VENDOR_ID	0x4	/* Vendor Identification */
9617c478bd9Sstevel@tonic-gate #define	PCI_PDS_DEVICE_ID	0x6	/* Device Identification */
9627c478bd9Sstevel@tonic-gate #define	PCI_PDS_VPD_PTR		0x8	/* Pointer to Vital Product Data */
9637c478bd9Sstevel@tonic-gate #define	PCI_PDS_PDS_LENGTH	0xa	/* PCI Data Structure Length */
9647c478bd9Sstevel@tonic-gate #define	PCI_PDS_PDS_REVISION	0xc	/* PCI Data Structure Revision */
9657c478bd9Sstevel@tonic-gate #define	PCI_PDS_CLASS_CODE	0xd	/* Class Code */
9667c478bd9Sstevel@tonic-gate #define	PCI_PDS_IMAGE_LENGTH	0x10	/* Image Length in 512 byte units */
9677c478bd9Sstevel@tonic-gate #define	PCI_PDS_CODE_REVISON	0x12	/* Revision Level of Code/Data */
9687c478bd9Sstevel@tonic-gate #define	PCI_PDS_CODE_TYPE	0x14	/* Code Type */
9697c478bd9Sstevel@tonic-gate #define	PCI_PDS_INDICATOR	0x15	/* Indicates if image is last in ROM */
9707c478bd9Sstevel@tonic-gate 
9717c478bd9Sstevel@tonic-gate #define	PCI_PDS_CODE_TYPE_PCAT		0x0	/* Intel x86/PC-AT Type */
9727c478bd9Sstevel@tonic-gate #define	PCI_PDS_CODE_TYPE_OPEN_FW	0x1	/* Open Firmware */
9737c478bd9Sstevel@tonic-gate 
9747c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
9757c478bd9Sstevel@tonic-gate }
9767c478bd9Sstevel@tonic-gate #endif
9777c478bd9Sstevel@tonic-gate 
9787c478bd9Sstevel@tonic-gate #endif	/* _SYS_PCI_H */
979