summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2014-10-24 18:39:15 +0000
committerrpaulo <rpaulo@FreeBSD.org>2014-10-24 18:39:15 +0000
commit65e80d25cabe5061e1532d06d3c42e874ccebd3a (patch)
treefcc3174a70ed3fea6b338938227627ce445dea2a /include
parent46565044f0ff989e5c6d3cbaee1096368089b589 (diff)
downloadFreeBSD-src-65e80d25cabe5061e1532d06d3c42e874ccebd3a.zip
FreeBSD-src-65e80d25cabe5061e1532d06d3c42e874ccebd3a.tar.gz
HPET: create /dev/hpetN as a way to access HPET from userland.
In some cases, TSC is broken and special applications might benefit from memory mapping HPET and reading the registers to count time. Most often the main HPET counter is 32-bit only[1], so this only gives the application a 300 second window based on the default HPET interval. Other applications, such as Intel's DPDK, expect /dev/hpet to be present and use it to count time as well. Although we have an almost userland version of gettimeofday() which uses rdtsc in userland, it's not always possible to use it, depending on how broken the multi-socket hardware is. Install the acpi_hpet.h so that applications can use the HPET register definitions. [1] I haven't found a system where HPET's main counter uses more than 32 bit. There seems to be a discrepancy in the Intel documentation (claiming it's a 64-bit counter) and the actual implementation (a 32-bit counter in a 64-bit memory area). MFC after: 1 week Relnotes: yes
Diffstat (limited to 'include')
-rw-r--r--include/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/Makefile b/include/Makefile
index f046bc1..6c7a6a3 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -159,6 +159,8 @@ copies:
cd ${.CURDIR}/../sys/dev/acpica; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpiio.h \
${DESTDIR}${INCLUDEDIR}/dev/acpica
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 acpi_hpet.h \
+ ${DESTDIR}${INCLUDEDIR}/dev/acpica
cd ${.CURDIR}/../sys/dev/agp; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \
${DESTDIR}${INCLUDEDIR}/dev/agp
@@ -243,7 +245,7 @@ symlinks:
done
.endfor
cd ${.CURDIR}/../sys/dev/acpica; \
- for h in acpiio.h; do \
+ for h in acpiio.h acpi_hpet.h; do \
ln -fs ../../../../sys/dev/acpica/$$h \
${DESTDIR}${INCLUDEDIR}/dev/acpica; \
done
OpenPOWER on IntegriCloud