summaryrefslogtreecommitdiffstats
path: root/sys/amd64/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-05-18 21:47:32 +0000
committerjhb <jhb@FreeBSD.org>2009-05-18 21:47:32 +0000
commitb80bf310738c84cb37b97c17e706f0b9ce08b280 (patch)
tree4089b27d1917968c5f120521775143102b24786b /sys/amd64/pci
parentefa3503500fe6f30003a73869cff0ab1357e832d (diff)
downloadFreeBSD-src-b80bf310738c84cb37b97c17e706f0b9ce08b280.zip
FreeBSD-src-b80bf310738c84cb37b97c17e706f0b9ce08b280.tar.gz
Add a read-only sysctl hw.pci.mcfg to mirror the tunable by the same name.
MFC after: 1 week
Diffstat (limited to 'sys/amd64/pci')
-rw-r--r--sys/amd64/pci/pci_cfgreg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 61a2db5..be9e404 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/kernel.h>
#include <sys/mutex.h>
+#include <sys/sysctl.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <vm/vm.h>
@@ -56,6 +57,8 @@ static void pciereg_cfgwrite(int bus, unsigned slot, unsigned func,
static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes);
static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes);
+SYSCTL_DECL(_hw_pci);
+
static int cfgmech;
static vm_offset_t pcie_base;
static int pcie_minbus, pcie_maxbus;
@@ -63,6 +66,8 @@ static uint32_t pcie_badslots;
static struct mtx pcicfg_mtx;
static int mcfg_enable = 1;
TUNABLE_INT("hw.pci.mcfg", &mcfg_enable);
+SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0,
+ "Enable support for PCI-e memory mapped config access");
/*
* Initialise access to PCI configuration space
OpenPOWER on IntegriCloud