diff options
author | se <se@FreeBSD.org> | 1996-10-22 20:33:19 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1996-10-22 20:33:19 +0000 |
commit | 30d2a7333e521f136ba7b7f54276affd0f346715 (patch) | |
tree | f3d1b796c2d6721f9704d95c2ecc443918536e35 /sys/sys/pciio.h | |
parent | 1aed9ce9d1b8e4b0e0fd92495630ca4e8ba49652 (diff) | |
download | FreeBSD-src-30d2a7333e521f136ba7b7f54276affd0f346715.zip FreeBSD-src-30d2a7333e521f136ba7b7f54276affd0f346715.tar.gz |
Definitions for ioctl() accesses to PCI config space registers.
Submitted by: wollman
Diffstat (limited to 'sys/sys/pciio.h')
-rw-r--r-- | sys/sys/pciio.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h new file mode 100644 index 0000000..ea0b939 --- /dev/null +++ b/sys/sys/pciio.h @@ -0,0 +1,36 @@ +#ifndef _PCI_IOCTL_H +#define _PCI_IOCTL_H 1 + +#include <sys/ioccom.h> + +struct pcisel { + u_char pc_bus; /* bus number */ + u_char pc_dev; /* device on this bus */ + u_char pc_func; /* function on this device */ +}; + +struct pci_conf { + struct pcisel pc_sel; /* bus+slot+function */ + pcidi_t pc_devid; /* device ID */ + pcidi_t pc_subid; /* subvendor ID */ + u_int32_t pc_class; /* device class */ +}; + +struct pci_conf_io { + size_t pci_len; /* length of buffer */ + struct pci_conf *pci_buf; /* buffer */ +}; + +struct pci_io { + struct pcisel pi_sel; /* device to operate on */ + int pi_reg; /* configuration register to examine */ + int pi_width; /* width (in bytes) of read or write */ + u_int32_t pi_data; /* data to write or result of read */ +}; + + +#define PCIOCGETCONF _IOWR('p', 1, struct pci_conf_io) +#define PCIOCREAD _IOWR('p', 2, struct pci_io) +#define PCIOCWRITE _IOWR('p', 3, struct pci_io) + +#endif /* _PCI_IOCTL_H */ |