[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/pciio.h

Version: -  FREEBSD  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  cheribsd  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1  -  FREEBSD-LIBC  -  FREEBSD8-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1997, Stefan Esser <se@FreeBSD.ORG>
    3  * Copyright (c) 1997, 1998, 1999, Kenneth D. Merry <ken@FreeBSD.ORG>
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice unmodified, this list of conditions, and the following
   11  *    disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  *
   16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   26  *
   27  *      $FreeBSD: src/sys/sys/pciio.h,v 1.6 2001/09/05 01:22:14 obrien Exp $
   28  *
   29  */
   30 
   31 #ifndef _SYS_PCIIO_H_
   32 #define _SYS_PCIIO_H_
   33 
   34 #include <sys/ioccom.h>
   35 
   36 #define PCI_MAXNAMELEN  16
   37 
   38 typedef enum {
   39         PCI_GETCONF_LAST_DEVICE,
   40         PCI_GETCONF_LIST_CHANGED,
   41         PCI_GETCONF_MORE_DEVS,
   42         PCI_GETCONF_ERROR
   43 } pci_getconf_status;
   44 
   45 typedef enum {
   46         PCI_GETCONF_NO_MATCH            = 0x00,
   47         PCI_GETCONF_MATCH_BUS           = 0x01,
   48         PCI_GETCONF_MATCH_DEV           = 0x02,
   49         PCI_GETCONF_MATCH_FUNC          = 0x04,
   50         PCI_GETCONF_MATCH_NAME          = 0x08,
   51         PCI_GETCONF_MATCH_UNIT          = 0x10,
   52         PCI_GETCONF_MATCH_VENDOR        = 0x20,
   53         PCI_GETCONF_MATCH_DEVICE        = 0x40,
   54         PCI_GETCONF_MATCH_CLASS         = 0x80
   55 } pci_getconf_flags;
   56 
   57 struct pcisel {
   58         u_int8_t        pc_bus;         /* bus number */
   59         u_int8_t        pc_dev;         /* device on this bus */
   60         u_int8_t        pc_func;        /* function on this device */
   61 };
   62 
   63 struct pci_conf {
   64         struct pcisel   pc_sel;         /* bus+slot+function */
   65         u_int8_t        pc_hdr;         /* PCI header type */
   66         u_int16_t       pc_subvendor;   /* card vendor ID */
   67         u_int16_t       pc_subdevice;   /* card device ID, assigned by 
   68                                            card vendor */
   69         u_int16_t       pc_vendor;      /* chip vendor ID */
   70         u_int16_t       pc_device;      /* chip device ID, assigned by 
   71                                            chip vendor */
   72         u_int8_t        pc_class;       /* chip PCI class */
   73         u_int8_t        pc_subclass;    /* chip PCI subclass */
   74         u_int8_t        pc_progif;      /* chip PCI programming interface */
   75         u_int8_t        pc_revid;       /* chip revision ID */
   76         char            pd_name[PCI_MAXNAMELEN + 1];  /* device name */
   77         u_long          pd_unit;        /* device unit number */
   78 };
   79 
   80 struct pci_match_conf {
   81         struct pcisel           pc_sel;         /* bus+slot+function */
   82         char                    pd_name[PCI_MAXNAMELEN + 1];  /* device name */
   83         u_long                  pd_unit;        /* Unit number */
   84         u_int16_t               pc_vendor;      /* PCI Vendor ID */
   85         u_int16_t               pc_device;      /* PCI Device ID */
   86         u_int8_t                pc_class;       /* PCI class */
   87         pci_getconf_flags       flags;          /* Matching expression */
   88 };
   89 
   90 struct pci_conf_io {
   91         u_int32_t               pat_buf_len;    /* pattern buffer length */
   92         u_int32_t               num_patterns;   /* number of patterns */
   93         struct pci_match_conf   *patterns;      /* pattern buffer */
   94         u_int32_t               match_buf_len;  /* match buffer length */
   95         u_int32_t               num_matches;    /* number of matches returned */
   96         struct pci_conf         *matches;       /* match buffer */
   97         u_int32_t               offset;         /* offset into device list */
   98         u_int32_t               generation;     /* device list generation */
   99         pci_getconf_status      status;         /* request status */
  100 };
  101 
  102 struct pci_io {
  103         struct pcisel   pi_sel;         /* device to operate on */
  104         int             pi_reg;         /* configuration register to examine */
  105         int             pi_width;       /* width (in bytes) of read or write */
  106         u_int32_t       pi_data;        /* data to write or result of read */
  107 };
  108         
  109 
  110 #define PCIOCGETCONF    _IOWR('p', 1, struct pci_conf_io)
  111 #define PCIOCREAD       _IOWR('p', 2, struct pci_io)
  112 #define PCIOCWRITE      _IOWR('p', 3, struct pci_io)
  113 #define PCIOCATTACHED   _IOWR('p', 4, struct pci_io)
  114 
  115 #endif /* !_SYS_PCIIO_H_ */

Cache object: 66ebcbe1f34a3b1a9e5455f760eda727


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.