diff --git a/doc/developer-guides/hld/hv-timer.rst b/doc/developer-guides/hld/hv-timer.rst index 36c4d804c..2f7d96662 100644 --- a/doc/developer-guides/hld/hv-timer.rst +++ b/doc/developer-guides/hld/hv-timer.rst @@ -33,6 +33,9 @@ Interfaces Design .. doxygenfunction:: timer_expired :project: Project ACRN +.. doxygenfunction:: timer_is_started + :project: Project ACRN + .. doxygenfunction:: add_timer :project: Project ACRN @@ -45,6 +48,12 @@ Interfaces Design .. doxygenfunction:: calibrate_tsc :project: Project ACRN +.. doxygenfunction:: cpu_ticks + :project: Project ACRN + +.. doxygenfunction:: cpu_tickrate + :project: Project ACRN + .. doxygenfunction:: us_to_ticks :project: Project ACRN @@ -54,14 +63,5 @@ Interfaces Design .. doxygenfunction:: ticks_to_ms :project: Project ACRN -.. doxygenfunction:: rdtsc - :project: Project ACRN - -.. doxygenfunction:: get_tsc_khz - :project: Project ACRN - -.. doxygenfunction:: timer_is_started - :project: Project ACRN - .. doxygenfunction:: udelay :project: Project ACRN diff --git a/hypervisor/include/arch/x86/asm/tsc.h b/hypervisor/include/arch/x86/asm/tsc.h index 47aff3524..5cb44ef16 100644 --- a/hypervisor/include/arch/x86/asm/tsc.h +++ b/hypervisor/include/arch/x86/asm/tsc.h @@ -34,6 +34,9 @@ uint32_t get_tsc_khz(void); /** * @brief Calibrate Time Stamp Counter (TSC) frequency. * + * @remark Generic time related routines, e.g., cpu_tickrate(), us_to_ticks(), + * udelay(), etc., relies on this function being called earlier during system initialization. + * * @return None */ void calibrate_tsc(void); diff --git a/hypervisor/include/common/ticks.h b/hypervisor/include/common/ticks.h index 0362676ea..1c20df5a8 100644 --- a/hypervisor/include/common/ticks.h +++ b/hypervisor/include/common/ticks.h @@ -14,6 +14,8 @@ /** * @brief Read current CPU tick count. * + * @remark On x86, this is the Time Stamp Counter (TSC) value of the current logical CPU. + * * @return CPU ticks */ uint64_t cpu_ticks(void); @@ -21,6 +23,8 @@ uint64_t cpu_ticks(void); /** * @brief Get CPU tick frequency in KHz. * + * @remark On x86, this is the Time Stamp Counter (TSC) frequency of the current logical CPU. + * * @return CPU frequency (KHz) */ uint32_t cpu_tickrate(void);