Check out my first novel, midnight's simulacra!

X86 timing: Difference between revisions

From dankwiki
No edit summary
mNo edit summary
Line 8: Line 8:
[recombinator](0) $ </pre>
[recombinator](0) $ </pre>
* TSC since Pentium
* TSC since Pentium
* PMTMR (? '''FIXME''')
==Real Time Clocks==
==Real Time Clocks==
* [http://fxr.watson.org/fxr/source/Documentation/rtc.txt?v=linux-2.6 Linux docs]
* [http://fxr.watson.org/fxr/source/Documentation/rtc.txt?v=linux-2.6 Linux docs]

Revision as of 08:48, 17 December 2009

  • Linux clocksources vs clockevents
  • 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) $ 
  • TSC since Pentium
  • PMTMR (? FIXME)

Real Time Clocks

[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) $ 
  • Multiple RTC's might exist in a machine, thus Linux's "RTC Class"
    • Each RTC gets a device node (by default, /dev/rtc*
    • If [sysfs] is enabled, each gets an entry at /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) $ 

See Also