zephyr/drivers/timer
Andy Ross 662b0bf765 drivers/timer: Add x86 APIC TSC_DEADLINE driver
Modern hardware all supports a TSC_DEADLINE mode for the APIC timer,
where the same GHz-scale 64 bit TSC used for performance monitoring
becomes the free-running counter used for cpu-local timer interrupts.
Being a free running counter that does not need to be reset, it will
not lose time in an interrupt.  Being 64 bit, it needs no rollover or
clamping logic in the driver when presented with a 32 bit tick count.
Being a proper comparator, it will correctly trigger interrupts for
times set "in the past" and thus needs no minimum/clamping logic.  The
counter is synchronized across the system architecturally (modulo one
burp where firmware likes to change the adjustment value) so usage is
SMP-safe by default.  Access to the 64 bit counter and comparator
value are single-instruction atomics even on 32 bit systems, so it
beats even the RISC-V machine timer in complexity (which was our
reigning champ for "simplest timer driver").

Really this is just ideal for Zephyr.  So rather than try to add
support for it to the existing APIC driver and increase complexity,
make this a new standalone driver instead.  All modern hardware has
what it needs.  The sole gotcha is that it's not easily emulatable
(qemu supports it only under kvm where they can freeload on the host
TSC) so it can be exercised only on hardware platforms right now.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-05-07 16:48:58 -04:00
..
altera_avalon_timer_hal.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
apic_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
apic_tsc.c drivers/timer: Add x86 APIC TSC_DEADLINE driver 2021-05-07 16:48:58 -04:00
arcv2_timer0.c tests: boot_time: remove all the code and instrumentation feeding into test 2021-05-05 10:41:15 -04:00
arm_arch_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
cavs_timer.c xtensa: cavs: fix irq_enable() argument 2021-05-03 17:13:01 -04:00
cc13x2_cc26x2_rtc_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
CMakeLists.txt drivers/timer: Add x86 APIC TSC_DEADLINE driver 2021-05-07 16:48:58 -04:00
cortex_m_systick.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
hpet.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
ite_it8xxx2_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
Kconfig drivers/timer: Add x86 APIC TSC_DEADLINE driver 2021-05-07 16:48:58 -04:00
Kconfig.stm32_lptim drivers: timer: st_stm32: add lptimer management to stm32l5 series 2021-03-26 18:06:01 -04:00
leon_gptimer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
litex_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
mchp_xec_rtos_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
mcux_os_timer.c drivers: timer: MXRT600 OS timer to wake platform from deep sleep 2021-05-05 22:28:44 -05:00
native_posix_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
npcx_itim_timer.c driver: itim: npcx: check ITEN bit to prevent return fake error. 2021-04-22 18:03:06 -04:00
nrf_rtc_timer.c drivers: timer: nrf_rtc_timer: Change type of channel argument 2021-03-25 15:54:49 +01:00
rcar_cmt_timer.c drivers: timer: add R-Car cmt driver 2021-04-22 10:38:45 +02:00
riscv_machine_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
rv32m1_lptmr_timer.c clock: rename z_timer_cycle_get_32 -> sys_clock_cycle_get_32 2021-03-19 11:22:17 -04:00
sam0_rtc_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
stm32_lptim_timer.c drivers: timer: st_stm32: add lptimer management to stm32l5 series 2021-03-26 18:06:01 -04:00
sys_clock_init.c pm: rename device_pm_cb to pm_device_cb 2021-05-05 18:35:49 -04:00
xlnx_psttc_timer_priv.h
xlnx_psttc_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00
xtensa_sys_timer.c drivers: device: do not reuse tag name 'device' 2021-03-22 19:48:14 -04:00