aboutsummaryrefslogtreecommitdiff
path: root/include/Makefile
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@FreeBSD.org>2014-10-24 18:39:15 +0000
committerRui Paulo <rpaulo@FreeBSD.org>2014-10-24 18:39:15 +0000
commit3149cc9df6bd219b121a504e0e01c5f76532d2f4 (patch)
treefcc3174a70ed3fea6b338938227627ce445dea2a /include/Makefile
parentca807c8a881be09687e58d9ff27fdc4d7b4df150 (diff)
downloadsrc-3149cc9df6bd219b121a504e0e01c5f76532d2f4.tar.gz
src-3149cc9df6bd219b121a504e0e01c5f76532d2f4.zip
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
Notes
Notes: svn path=/head/; revision=273598
Diffstat (limited to 'include/Makefile')
-rw-r--r--include/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/Makefile b/include/Makefile
index f046bc16fc41..6c7a6a301b35 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