diff options
author | John Baldwin <jhb@FreeBSD.org> | 2008-09-11 21:42:11 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2008-09-11 21:42:11 +0000 |
commit | 3591fea8b02d2f210d78be53582901efd21128b4 (patch) | |
tree | c9d1712fe0e9f4587422020efab72df18a87a3dc /sys/amd64 | |
parent | 34ba28d1826c8ee62efecb10274bcbfa7458d367 (diff) | |
download | src-3591fea8b02d2f210d78be53582901efd21128b4.tar.gz src-3591fea8b02d2f210d78be53582901efd21128b4.zip |
Add a 'hw.pci.mcfg' tunable. It can be set to 0 to disable memory-mapped
PCI config access.
Notes
Notes:
svn path=/head/; revision=182947
Diffstat (limited to 'sys/amd64')
-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 13d27a18c704..8f757a74d7d0 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); |