From d3c80736fed8293ed8dd3e2ced1f2652915e76dc Mon Sep 17 00:00:00 2001 From: rpaulo Date: Fri, 24 Oct 2014 21:08:36 +0000 Subject: [PATCH] Add a sysctl to control the HPET allow_write behaviour. Requested by: kib --- sys/dev/acpica/acpi_hpet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c index 6cee063f9ce3..6b35f5c4f3d1 100644 --- a/sys/dev/acpica/acpi_hpet.c +++ b/sys/dev/acpica/acpi_hpet.c @@ -760,6 +760,11 @@ hpet_attach(device_t dev) OID_AUTO, "mmap_allow", CTLFLAG_RW, &sc->mmap_allow, 0, "Allow userland to memory map HPET"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "mmap_allow_write", + CTLFLAG_RW, &sc->mmap_allow_write, 0, + "Allow userland write to the HPET register space"); } else device_printf(dev, "could not create /dev/hpet%d\n", device_get_unit(dev));