xref: /titanic_51/usr/src/uts/sun4u/sys/pci/pci_nexus.h (revision c10c16dec587a0662068f6e2991c29ed3a9db943)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1994-2000 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_SYS_PCI_NEXUS_H
28 #define	_SYS_PCI_NEXUS_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 typedef struct pci_ispec pci_ispec_t;
37 
38 struct pci_ispec {
39 	struct intrspec ispec;		/* interrupt pri/pil, vec/ino, func */
40 	dev_info_t *pci_ispec_dip;	/* interrupt parent dip */
41 	uint32_t pci_ispec_intr;	/* dev "interrupts" prop or imap */
42 					/* lookup result storage for UPA */
43 					/* intr */
44 	void *pci_ispec_arg;		/* interrupt handler argument */
45 	ddi_acc_handle_t pci_ispec_hdl;	/* map hdl to dev PCI config space */
46 	pci_ispec_t *pci_ispec_next;	/* per ino link list */
47 };
48 
49 enum pci_fault_ops { FAULT_LOG, FAULT_RESET, FAULT_POKEFLT, FAULT_POKEFINI };
50 
51 struct pci_fault_handle {
52 	dev_info_t *fh_dip;		/* device registered fault handler */
53 	int (*fh_f)();			/* fault handler function */
54 	void *fh_arg;			/* argument for fault handler */
55 	struct pci_fault_handle *fh_next;
56 };
57 
58 #ifdef	__cplusplus
59 }
60 #endif
61 
62 #endif	/* _SYS_PCI_NEXUS_H */
63