Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pcivar.h
Show All 25 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
* | * | ||||
*/ | */ | ||||
#ifndef _PCIVAR_H_ | #ifndef _PCIVAR_H_ | ||||
#define _PCIVAR_H_ | #define _PCIVAR_H_ | ||||
#include <sys/bitstring.h> | |||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/_eventhandler.h> | #include <sys/_eventhandler.h> | ||||
/* some PCI bus constants */ | /* some PCI bus constants */ | ||||
#define PCI_MAXMAPS_0 6 /* max. no. of memory/port maps */ | #define PCI_MAXMAPS_0 6 /* max. no. of memory/port maps */ | ||||
#define PCI_MAXMAPS_1 2 /* max. no. of maps for PCI to PCI bridge */ | #define PCI_MAXMAPS_1 2 /* max. no. of maps for PCI to PCI bridge */ | ||||
#define PCI_MAXMAPS_2 1 /* max. no. of maps for CardBus bridge */ | #define PCI_MAXMAPS_2 1 /* max. no. of maps for CardBus bridge */ | ||||
▲ Show 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | typedef struct pcicfg { | ||||
uint32_t domain; /* PCI domain */ | uint32_t domain; /* PCI domain */ | ||||
uint8_t bus; /* config space bus address */ | uint8_t bus; /* config space bus address */ | ||||
uint8_t slot; /* config space slot address */ | uint8_t slot; /* config space slot address */ | ||||
uint8_t func; /* config space function number */ | uint8_t func; /* config space function number */ | ||||
uint32_t flags; /* flags defined above */ | uint32_t flags; /* flags defined above */ | ||||
bitstr_t *dma_aliases; /* PCI function aliases for IOMMU. */ | |||||
struct mtx dma_aliases_mtx; /* protection for aliases bitstr */ | |||||
struct pcicfg_bridge bridge; /* Bridges */ | struct pcicfg_bridge bridge; /* Bridges */ | ||||
struct pcicfg_pp pp; /* Power management */ | struct pcicfg_pp pp; /* Power management */ | ||||
struct pcicfg_vpd vpd; /* Vital product data */ | struct pcicfg_vpd vpd; /* Vital product data */ | ||||
struct pcicfg_msi msi; /* PCI MSI */ | struct pcicfg_msi msi; /* PCI MSI */ | ||||
struct pcicfg_msix msix; /* PCI MSI-X */ | struct pcicfg_msix msix; /* PCI MSI-X */ | ||||
struct pcicfg_ht ht; /* HyperTransport */ | struct pcicfg_ht ht; /* HyperTransport */ | ||||
struct pcicfg_pcie pcie; /* PCI Express */ | struct pcicfg_pcie pcie; /* PCI Express */ | ||||
struct pcicfg_pcix pcix; /* PCI-X */ | struct pcicfg_pcix pcix; /* PCI-X */ | ||||
▲ Show 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | uint32_t pcie_adjust_config(device_t dev, int reg, uint32_t mask, | ||||
uint32_t value, int width); | uint32_t value, int width); | ||||
void pcie_apei_error(device_t dev, int sev, uint8_t *aer); | void pcie_apei_error(device_t dev, int sev, uint8_t *aer); | ||||
bool pcie_flr(device_t dev, u_int max_delay, bool force); | bool pcie_flr(device_t dev, u_int max_delay, bool force); | ||||
int pcie_get_max_completion_timeout(device_t dev); | int pcie_get_max_completion_timeout(device_t dev); | ||||
bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); | bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); | ||||
int pcie_link_reset(device_t port, int pcie_location); | int pcie_link_reset(device_t port, int pcie_location); | ||||
void pci_print_faulted_dev(void); | void pci_print_faulted_dev(void); | ||||
int pci_add_dma_alias(device_t dev, uint8_t devfn_from, uint8_t nr_devfns); | |||||
int pci_for_each_dma_alias(device_t dev, int (*fn)(device_t dev, | |||||
uint8_t alias, void *data), void *data); | |||||
#endif /* _SYS_BUS_H_ */ | #endif /* _SYS_BUS_H_ */ | ||||
/* | /* | ||||
* cdev switch for control device, initialised in generic PCI code | * cdev switch for control device, initialised in generic PCI code | ||||
*/ | */ | ||||
extern struct cdevsw pcicdev; | extern struct cdevsw pcicdev; | ||||
Show All 29 Lines |