1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Arch-specific timer functionality
//! By default, this module attempts to determine the timer frequency via architecture specific methods.
//! (cpuid for x86, `CNTFRQ_EL0` for aarch64)
//!
//! Platforms can override this with a custom performance frequency by providing the Core with the correct frequency:
//!
//! <!-- (The below test has to be ignore because `patna` cannot depend on `patina_dxe_core` - circular dependency.) -->
//! ```rust,ignore
//! let frequency_hz: u64 = 1_000_000_000; // Compute with platform-specific methods.
//!
//! Core::default()
//! .init_timer_frequency(Some(frequency_hz))
//!```
//!
//! ## License
//!
//! Copyright (c) Microsoft Corporation.
//!
//! SPDX-License-Identifier: Apache-2.0
//!
/// Trait that provides architecture-specific timer functionality.
/// Components that need timing functionality can request this service.