Check out my first novel, midnight's simulacra!
X86 timing: Difference between revisions
From dankwiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
* Linux clocksources vs clockevents | |||
* PIT -- Programmable Interval Timer (eg [http://en.wikipedia.org/wiki/Intel_8253 Intel 8253]) | * PIT -- Programmable Interval Timer (eg [http://en.wikipedia.org/wiki/Intel_8253 Intel 8253]) | ||
* [[ACPI]] counter | * [[ACPI]] counter | ||
Line 7: | Line 8: | ||
[recombinator](0) $ </pre> | [recombinator](0) $ </pre> | ||
* TSC since Pentium | * TSC since Pentium | ||
* | ==Real Time Clocks== | ||
* [http://fxr.watson.org/fxr/source/Documentation/rtc.txt?v=linux-2.6 Linux docs] | |||
** [[ACPI]] standardized the <tt>cmos-rtc</tt> type, extending the Motorola MC146818 ([http://cateee.net/lkddb/web-lkddb/RTC_DRV_CMOS.html CONFIG_RTC_DRV_CMOS at the LKDD]) | ** [[ACPI]] standardized the <tt>cmos-rtc</tt> type, extending the Motorola MC146818 ([http://cateee.net/lkddb/web-lkddb/RTC_DRV_CMOS.html CONFIG_RTC_DRV_CMOS at the LKDD]) | ||
<pre>[recombinator](0) $ cat /proc/driver/rtc | <pre>[recombinator](0) $ cat /proc/driver/rtc | ||
Line 24: | Line 26: | ||
batt_status : okay | batt_status : okay | ||
[recombinator](0) $ </pre> | [recombinator](0) $ </pre> | ||
* Linux | * Multiple RTC's might exist in a machine, thus Linux's "RTC Class" | ||
** Each RTC gets a device node (by default, <tt>/dev/rtc*</tt> | |||
** If [sysfs] is enabled, each gets an entry at <tt>/sys/class/rtc/*/</tt>: | |||
<pre>[recombinator](0) $ ls /sys/class/rtc/rtc0/ | <pre>[recombinator](0) $ ls /sys/class/rtc/rtc0/ | ||
date device name since_epoch time wakealarm | date device name since_epoch time wakealarm | ||
dev max_user_freq power subsystem uevent | dev max_user_freq power subsystem uevent | ||
[recombinator](0) $ </pre> | [recombinator](0) $ </pre> |