summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/pci_cfgreg.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-08-22 02:14:23 +0000
committerjhb <jhb@FreeBSD.org>2008-08-22 02:14:23 +0000
commit2a48176eba96caaa3a31b0d353942f75bb2fbd49 (patch)
tree9c22e90efaf7573077c0a35e96706beaaa9411fa /sys/amd64/include/pci_cfgreg.h
parent6ab64e14fc373a159372cb6b7df2bf63d117b6f2 (diff)
downloadFreeBSD-src-2a48176eba96caaa3a31b0d353942f75bb2fbd49.zip
FreeBSD-src-2a48176eba96caaa3a31b0d353942f75bb2fbd49.tar.gz
Extend the support for PCI-e memory mapped configuration space access:
- Rename pciereg_cfgopen() to pcie_cfgregopen() and expose it to the rest of the kernel. It now also accepts parameters via function arguments rather than global variables. - Add a notion of minimum and maximum bus numbers and reject requests for an out of range bus. - Add more range checks on slot/func/reg/bytes parameters to the cfg reg read/write routines. Don't panic on any invalid parameters, just fail the request (writes do nothing, reads return -1). This matches the behavior of the other cfg mechanisms. - Port the memory mapped configuration space access to amd64. On amd64 we simply use the direct map (via pmap_mapdev()) for the memory mapped window. - During acpi_attach() just after loading the ACPI tables, check for a MCFG table. If it exists, call pciereg_cfgopen() on each subtable (memory mapped window). For now we only support windows for domain 0 that start with bus 0. This removes the need for more chipset-specific quirks in the MD code. - Remove the chipset-specific quirks for the Intel 5000P/V/Z chipsets since these machines should all have MCFG tables via ACPI. - Updated pci_cfgregopen() to DTRT if ACPI had invoked pcie_cfgregopen() earlier. MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/include/pci_cfgreg.h')
-rw-r--r--sys/amd64/include/pci_cfgreg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/include/pci_cfgreg.h b/sys/amd64/include/pci_cfgreg.h
index e97b367..7588282 100644
--- a/sys/amd64/include/pci_cfgreg.h
+++ b/sys/amd64/include/pci_cfgreg.h
@@ -37,6 +37,7 @@
#define CONF1_ENABLE_MSK1 0x80000001ul
#define CONF1_ENABLE_RES1 0x80000000ul
+int pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus);
int pci_cfgregopen(void);
u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes);
void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes);
OpenPOWER on IntegriCloud