1*e82ab0a3Sriastradh /* $NetBSD: pci_machdep.h,v 1.24 2024/06/23 00:53:34 riastradh Exp $ */ 2e9666f30Sbouyer 3e9666f30Sbouyer /* 4aab0004bSbouyer * Copyright (c) 2006 Manuel Bouyer. 5e9666f30Sbouyer * 6e9666f30Sbouyer * Redistribution and use in source and binary forms, with or without 7e9666f30Sbouyer * modification, are permitted provided that the following conditions 8e9666f30Sbouyer * are met: 9e9666f30Sbouyer * 1. Redistributions of source code must retain the above copyright 10e9666f30Sbouyer * notice, this list of conditions and the following disclaimer. 11e9666f30Sbouyer * 2. Redistributions in binary form must reproduce the above copyright 12e9666f30Sbouyer * notice, this list of conditions and the following disclaimer in the 13e9666f30Sbouyer * documentation and/or other materials provided with the distribution. 14e9666f30Sbouyer * 15e9666f30Sbouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16e9666f30Sbouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17e9666f30Sbouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18e9666f30Sbouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19e9666f30Sbouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20e9666f30Sbouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21e9666f30Sbouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22e9666f30Sbouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23e9666f30Sbouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24e9666f30Sbouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25e9666f30Sbouyer * 26e9666f30Sbouyer */ 27e9666f30Sbouyer 28aab0004bSbouyer /* 29aab0004bSbouyer * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 30aab0004bSbouyer * Copyright (c) 1994 Charles M. Hannum. All rights reserved. 31aab0004bSbouyer * 32aab0004bSbouyer * Redistribution and use in source and binary forms, with or without 33aab0004bSbouyer * modification, are permitted provided that the following conditions 34aab0004bSbouyer * are met: 35aab0004bSbouyer * 1. Redistributions of source code must retain the above copyright 36aab0004bSbouyer * notice, this list of conditions and the following disclaimer. 37aab0004bSbouyer * 2. Redistributions in binary form must reproduce the above copyright 38aab0004bSbouyer * notice, this list of conditions and the following disclaimer in the 39aab0004bSbouyer * documentation and/or other materials provided with the distribution. 40aab0004bSbouyer * 3. All advertising materials mentioning features or use of this software 41aab0004bSbouyer * must display the following acknowledgement: 42aab0004bSbouyer * This product includes software developed by Charles M. Hannum. 43aab0004bSbouyer * 4. The name of the author may not be used to endorse or promote products 44aab0004bSbouyer * derived from this software without specific prior written permission. 45aab0004bSbouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 46aab0004bSbouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 47aab0004bSbouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 48aab0004bSbouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 49aab0004bSbouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 50aab0004bSbouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 51aab0004bSbouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 52aab0004bSbouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 53aab0004bSbouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 54aab0004bSbouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 55aab0004bSbouyer */ 56aab0004bSbouyer 57e9666f30Sbouyer #ifndef _XEN_PCI_MACHDEP_H_ 58e9666f30Sbouyer #define _XEN_PCI_MACHDEP_H_ 59e9666f30Sbouyer 60090e16c4Sdyoung /* 61090e16c4Sdyoung * Types provided to machine-independent PCI code 62090e16c4Sdyoung */ 63be333a38Scherry typedef intr_handle_t pci_intr_handle_t; 64090e16c4Sdyoung 65090e16c4Sdyoung #include <x86/pci_machdep_common.h> 66090e16c4Sdyoung 67aab0004bSbouyer #include "opt_xen.h" 68aab0004bSbouyer 69b4bf0ca2Scherry #if !defined(DOM0OPS) && defined(XENPV) 70*e82ab0a3Sriastradh int xpci_enumerate_bus1(struct pci_softc *, const int *, 71*e82ab0a3Sriastradh int (*)(void *, const struct pci_attach_args *), void *, 72d3e53912Sdyoung struct pci_attach_args *); 73*e82ab0a3Sriastradh #define PCI_MACHDEP_ENUMERATE_BUS1 xpci_enumerate_bus1 74ad86c9a1Sbouyer #endif 75512b7322Sdyoung 7630654f1bSbouyer #ifdef XENPV 7730654f1bSbouyer void pci_conf_write16(pci_chipset_tag_t, pcitag_t, int, uint16_t); 7830654f1bSbouyer #endif 7930654f1bSbouyer 80e9666f30Sbouyer #endif /* _XEN_PCI_MACHDEP_H_ */ 81