Add a sysctl to control the HPET allow_write behaviour.
Requested by: kib
This commit is contained in:
parent
c2bbf09479
commit
d3c80736fe
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user