summaryrefslogtreecommitdiffstats
path: root/sys/i386
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/i386
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/i386')
-rw-r--r--sys/i386/pci/pci_cfgreg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index ecefa17..20050e6 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/malloc.h>
#include <sys/queue.h>
+#include <sys/sysctl.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <machine/pci_cfgreg.h>
@@ -75,6 +76,8 @@ enum {
CFGMECH_PCIE,
};
+SYSCTL_DECL(_hw_pci);
+
static TAILQ_HEAD(pcie_cfg_list, pcie_cfg_elem) pcie_list[MAXCPU];
static uint64_t pcie_base;
static int pcie_minbus, pcie_maxbus;
@@ -84,6 +87,8 @@ static int devmax;
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");
static uint32_t pci_docfgregread(int bus, int slot, int func, int reg,
int bytes);
OpenPOWER on IntegriCloud