pci_machdep.h revision 1.18
11.18Sdyoung/* $NetBSD: pci_machdep.h,v 1.18 2011/04/04 20:37:55 dyoung Exp $ */
21.2Sbouyer
31.2Sbouyer/*
41.6Sbouyer * Copyright (c) 2006 Manuel Bouyer.
51.2Sbouyer *
61.2Sbouyer * Redistribution and use in source and binary forms, with or without
71.2Sbouyer * modification, are permitted provided that the following conditions
81.2Sbouyer * are met:
91.2Sbouyer * 1. Redistributions of source code must retain the above copyright
101.2Sbouyer *    notice, this list of conditions and the following disclaimer.
111.2Sbouyer * 2. Redistributions in binary form must reproduce the above copyright
121.2Sbouyer *    notice, this list of conditions and the following disclaimer in the
131.2Sbouyer *    documentation and/or other materials provided with the distribution.
141.2Sbouyer *
151.2Sbouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
161.2Sbouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
171.2Sbouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
181.2Sbouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
191.2Sbouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
201.2Sbouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
211.2Sbouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
221.2Sbouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
231.2Sbouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
241.2Sbouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
251.2Sbouyer *
261.2Sbouyer */
271.2Sbouyer
281.6Sbouyer/*
291.6Sbouyer * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
301.6Sbouyer * Copyright (c) 1994 Charles M. Hannum.  All rights reserved.
311.6Sbouyer *
321.6Sbouyer * Redistribution and use in source and binary forms, with or without
331.6Sbouyer * modification, are permitted provided that the following conditions
341.6Sbouyer * are met:
351.6Sbouyer * 1. Redistributions of source code must retain the above copyright
361.6Sbouyer *    notice, this list of conditions and the following disclaimer.
371.6Sbouyer * 2. Redistributions in binary form must reproduce the above copyright
381.6Sbouyer *    notice, this list of conditions and the following disclaimer in the
391.6Sbouyer *    documentation and/or other materials provided with the distribution.
401.6Sbouyer * 3. All advertising materials mentioning features or use of this software
411.6Sbouyer *    must display the following acknowledgement:
421.6Sbouyer *      This product includes software developed by Charles M. Hannum.
431.6Sbouyer * 4. The name of the author may not be used to endorse or promote products
441.6Sbouyer *    derived from this software without specific prior written permission.
451.6Sbouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
461.6Sbouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
471.6Sbouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
481.6Sbouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
491.6Sbouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
501.6Sbouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
511.6Sbouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
521.6Sbouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
531.6Sbouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
541.6Sbouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
551.6Sbouyer */
561.6Sbouyer
571.2Sbouyer#ifndef _XEN_PCI_MACHDEP_H_
581.2Sbouyer#define _XEN_PCI_MACHDEP_H_
591.2Sbouyer
601.17Sdyoung/*
611.17Sdyoung * Types provided to machine-independent PCI code
621.17Sdyoung */
631.17Sdyoungtypedef struct xen_intr_handle pci_intr_handle_t;
641.6Sbouyer
651.17Sdyoung#include <x86/pci_machdep_common.h>
661.11Sbouyer
671.17Sdyoung#include "opt_xen.h"
681.6Sbouyer
691.11Sbouyer#ifndef DOM0OPS
701.11Sbouyerint		xpci_enumerate_bus(struct pci_softc *, const int *,
711.18Sdyoung		   int (*)(const struct pci_attach_args *),
721.18Sdyoung		   struct pci_attach_args *);
731.11Sbouyer#define PCI_MACHDEP_ENUMERATE_BUS xpci_enumerate_bus
741.11Sbouyer#endif
751.16Sdyoung
761.2Sbouyer/* functions provided to MI PCI */
771.2Sbouyer
781.4Sbouyerint		xen_pci_enumerate_bus(struct pci_softc *, const int *,
791.18Sdyoung		   int (*)(const struct pci_attach_args *),
801.18Sdyoung		   struct pci_attach_args *);
811.2Sbouyer
821.2Sbouyer#endif /* _XEN_PCI_MACHDEP_H_ */
83