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 2004 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_PCI_TYPES_H 28 #define _SYS_PCI_TYPES_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #define HI32(x) ((uint32_t)(((uint64_t)(x)) >> 32)) 35 #define LO32(x) ((uint32_t)(x)) 36 #define NAMEINST(dip) ddi_driver_name(dip), ddi_get_instance(dip) 37 #define NAMEADDR(dip) ddi_node_name(dip), ddi_get_name_addr(dip) 38 39 typedef uint16_t pci_ign_t; 40 typedef struct pci pci_t; 41 typedef struct pci_common pci_common_t; 42 typedef struct pci_errstate pci_errstate_t; 43 typedef struct iommu_errstate iommu_errstate_t; 44 typedef struct ecc_errstate ecc_errstate_t; 45 typedef struct pbm_errstate pbm_errstate_t; 46 typedef struct cb_errstate cb_errstate_t; 47 48 /* 49 * external global function prototypes 50 */ 51 extern int pf_is_memory(pfn_t); 52 extern void do_shutdown(); 53 extern void power_down(); 54 extern void set_intr_mapping_reg(int, uint64_t *, int); 55 56 #ifdef __cplusplus 57 } 58 #endif 59 60 #endif /* _SYS_PCI_TYPES_H */ 61