doc: update timer HLD doc after modularization

Replace rdstc() and get_tsc_khz() with their architectural agnostic
counterparts cpu_ticks() and cpu_tickrate().

Tracked-On: #5920
Signed-off-by: Yi Liang <yi.liang@intel.com>
This commit is contained in:
Liang Yi 2021-05-31 11:10:02 +08:00 committed by David Kinder
parent 42dc49902b
commit 400d31916a
3 changed files with 16 additions and 9 deletions

View File

@ -33,6 +33,9 @@ Interfaces Design
.. doxygenfunction:: timer_expired .. doxygenfunction:: timer_expired
:project: Project ACRN :project: Project ACRN
.. doxygenfunction:: timer_is_started
:project: Project ACRN
.. doxygenfunction:: add_timer .. doxygenfunction:: add_timer
:project: Project ACRN :project: Project ACRN
@ -45,6 +48,12 @@ Interfaces Design
.. doxygenfunction:: calibrate_tsc .. doxygenfunction:: calibrate_tsc
:project: Project ACRN :project: Project ACRN
.. doxygenfunction:: cpu_ticks
:project: Project ACRN
.. doxygenfunction:: cpu_tickrate
:project: Project ACRN
.. doxygenfunction:: us_to_ticks .. doxygenfunction:: us_to_ticks
:project: Project ACRN :project: Project ACRN
@ -54,14 +63,5 @@ Interfaces Design
.. doxygenfunction:: ticks_to_ms .. doxygenfunction:: ticks_to_ms
:project: Project ACRN :project: Project ACRN
.. doxygenfunction:: rdtsc
:project: Project ACRN
.. doxygenfunction:: get_tsc_khz
:project: Project ACRN
.. doxygenfunction:: timer_is_started
:project: Project ACRN
.. doxygenfunction:: udelay .. doxygenfunction:: udelay
:project: Project ACRN :project: Project ACRN

View File

@ -34,6 +34,9 @@ uint32_t get_tsc_khz(void);
/** /**
* @brief Calibrate Time Stamp Counter (TSC) frequency. * @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 * @return None
*/ */
void calibrate_tsc(void); void calibrate_tsc(void);

View File

@ -14,6 +14,8 @@
/** /**
* @brief Read current CPU tick count. * @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 * @return CPU ticks
*/ */
uint64_t cpu_ticks(void); uint64_t cpu_ticks(void);
@ -21,6 +23,8 @@ uint64_t cpu_ticks(void);
/** /**
* @brief Get CPU tick frequency in KHz. * @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) * @return CPU frequency (KHz)
*/ */
uint32_t cpu_tickrate(void); uint32_t cpu_tickrate(void);