diff options
author | jhb <jhb@FreeBSD.org> | 2008-09-11 21:42:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-09-11 21:42:11 +0000 |
commit | 1d4a561a281b386aeefb1c4827cf8fe6c86f21d0 (patch) | |
tree | c9d1712fe0e9f4587422020efab72df18a87a3dc /sys/amd64/pci/pci_cfgreg.c | |
parent | 5b5d402e310bfeb84d4bc66d726e9ec45b26b6dd (diff) | |
download | FreeBSD-src-1d4a561a281b386aeefb1c4827cf8fe6c86f21d0.zip FreeBSD-src-1d4a561a281b386aeefb1c4827cf8fe6c86f21d0.tar.gz |
Add a 'hw.pci.mcfg' tunable. It can be set to 0 to disable memory-mapped
PCI config access.
Diffstat (limited to 'sys/amd64/pci/pci_cfgreg.c')
-rw-r--r-- | sys/amd64/pci/pci_cfgreg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c index 13d27a1..8f757a7 100644 --- a/sys/amd64/pci/pci_cfgreg.c +++ b/sys/amd64/pci/pci_cfgreg.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> #include <sys/lock.h> +#include <sys/kernel.h> #include <sys/mutex.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> @@ -60,6 +61,8 @@ static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; +static int mcfg_enable = 1; +TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); /* * Initialise access to PCI configuration space @@ -248,6 +251,9 @@ pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus) uint32_t val1, val2; int slot; + if (!mcfg_enable) + return (0); + if (minbus != 0) return (0); |