Expand description
Boot timestamp : TSC-based elapsed time from kernel entry.
Captures rdtsc() at the very start of kernel_main and exposes
elapsed_ms() / elapsed_us() for boot milestone logging.
Before APIC timer calibration the TSC frequency is unknown, so we
use a conservative default (2 GHz). Call calibrate() once the
real frequency is known to get accurate readings.
Functionsยง
- calibrate
- Refine TSC frequency after timer calibration.
- elapsed_
ms - Milliseconds elapsed since kernel entry.
- elapsed_
us - Microseconds elapsed since kernel entry.
- init
- Capture the boot TSC. Must be called once, as early as possible.
- tsc_khz
- Current TSC frequency in KHz (for external conversions).