summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpihpet.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add support for timeconting in userland.pirofti2020-07-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* Use <stdint.h> types.kettenis2018-06-291-17/+17
| | | | ok mpi@, jung@, krw@, deraadt@
* Recalibrate TSC timecounter with HPET and PM timermikeb2017-10-061-1/+5
| | | | | | | | | | | | | If frequency of an invariant (non-stop) time stamp counter is measured using an independent working timecounter that has a known frequency, we can assume that the measured TSC frequency is as good as the resolution of the timecounter that we use to perform the measurement. This lets us switch from this high quality but expensive source to the cheaper TSC without sacrificing precision on a wide range of modern CPUs. From Adam Steen <adam@adamsteen.com.au> with tweaks from reyk@ and myself. Tested by brynet@, sthen@ and others, OK mlarkin, sthen
* 0xffffffff is 32 bits, not 24 bitsmatthew2015-10-061-2/+2
| | | | ok deraadt
* Check proper HPET period value during attach.mlarkin2015-08-121-3/+5
| | | | Pointed out by patrick keshishian <pkeshish at gmail.com>, thanks.
* do not save & restore a capability register, it is RO.deraadt2015-08-041-6/+1
| | | | issue noticed by patrick kehishian, ok mlarkin
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* force cfattach decl to same form as othersderaadt2014-03-051-6/+3
|
* save/restore hpet configuration. Perhaps a little more than wederaadt2013-12-211-1/+98
| | | | | need to do, since we do not use many hpet features. ok kettenis millert
* be more careful during suspend/resume cycles, as roughly detailed in thederaadt2013-12-191-5/+13
| | | | | spec. More might be required. ok jordan matthew mlarkin
* we are past the point where timecounters may disappeartedu2012-08-161-9/+1
| | | | ok miod
* Attach acpihpet only once. The matching code is changed because acpi busmikeb2011-01-101-3/+6
| | | | | | | can be enumerated which means match routine should do the right thing and prevent further attachments. With input from kettenis, deraadt, miod; ok deraadt, kettenis
* spacing and indents that are driving me crazyderaadt2010-07-211-7/+7
|
* knfderaadt2009-11-231-2/+2
|
* Fix pckbd and acpihpet suspend/resume cases to fit with the future frameworkpirofti2009-11-231-7/+4
| | | | | | that's going to get in really soon. Okay mlarkin@, deraadt@.
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-3/+3
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* Add wake support to acpihpet(4).pirofti2009-08-121-2/+25
| | | | Patch initially from mlarkin@. KNF and refactoring by me. Okay deraadt@.
* Add workaround for broken ATI southbridges; inspired by how Linux handles this.kettenis2009-01-201-1/+22
| | | | | | Fixes PR 5916 & 5959. ok toby@
* Fix $OpenBSD$ for once and for allmarco2008-06-111-1/+1
|
* Fix for PR 5642 & 5643. Report and testing Martijn Rijkeboermarco2007-11-181-2/+22
| | | | | | <martijn at bunix dot org> ok deraadt kettenis
* It helps to enable hpet... This fixes bnx not working on amd64.marco2007-02-201-1/+2
|
* KNF while here.marco2007-02-201-3/+3
|
* Added acpi_map_address function for mapping GAS/IO registersjordan2007-02-191-29/+6
| | | | ok marco@
* Rename hpet to acpihpet so that all devices use the same naming convention.marco2006-03-061-0/+144
discussed with jordan.