X86 timing: Difference between revisions

From dankwiki
No edit summary
No edit summary
Line 25: Line 25:
[recombinator](0) $ </pre>
[recombinator](0) $ </pre>
* Linux clocksources vs clockevents
* Linux clocksources vs clockevents
* "RTC Class" drivers on Linux have entries (assuming [[sysfs]] is enabled) in <tt>/sys/class/rtc/*/</tt>:
<pre>[recombinator](0) $ ls /sys/class/rtc/rtc0/
date  device        name  since_epoch  time    wakealarm
dev  max_user_freq  power  subsystem    uevent
[recombinator](0) $ </pre>

Revision as of 03:48, 27 June 2009

  • PIT -- Programmable Interval Timer (eg Intel 8253)
  • ACPI counter
  • LAPIC counter
  • HPET. Unprivileged programmability is limited by /proc/sys/dev/hpet/max-user-freq (in Hz):
[recombinator](1) $ cat /proc/sys/dev/hpet/max-user-freq 
64
[recombinator](0) $ 
[recombinator](0) $ cat /proc/driver/rtc 
rtc_time	: 07:43:30
rtc_date	: 2009-06-27
alrm_time	: **:00:00
alrm_date	: ****-**-**
alarm_IRQ	: no
alrm_pending	: no
24hr		: yes
periodic_IRQ	: no
update_IRQ	: no
HPET_emulated	: yes
DST_enable	: no
periodic_freq	: 1024
batt_status	: okay
[recombinator](0) $ 
  • Linux clocksources vs clockevents
  • "RTC Class" drivers on Linux have entries (assuming sysfs is enabled) in /sys/class/rtc/*/:
[recombinator](0) $ ls /sys/class/rtc/rtc0/
date  device         name   since_epoch  time    wakealarm
dev   max_user_freq  power  subsystem    uevent
[recombinator](0) $