pub struct El1PhysicalTimer(/* private fields */);Expand description
Represents our Physical Timer when we are running at EL1.
This works exactly like El0PhysicalTimer, but it gives you extra methods for functionality that only processors running at EL1 can access.
This type is not [Send] because it is a per-core type and should not be moved across cores on an SMP system.
Implementations§
Source§impl El1PhysicalTimer
impl El1PhysicalTimer
Sourcepub unsafe fn new() -> El1PhysicalTimer
pub unsafe fn new() -> El1PhysicalTimer
Create an EL1 Generic Timer handle
§Safety
Only create one Physical Timer handle (at any EL) at any given time, as they access shared mutable state within the processor and do read-modify-writes on that state.
Sourcepub fn el0_access_physical_counter(&mut self, access: bool)
pub fn el0_access_physical_counter(&mut self, access: bool)
Control whether user code at EL0 can access the physical counter.
Sourcepub fn el0_access_physical_timer(&mut self, access: bool)
pub fn el0_access_physical_timer(&mut self, access: bool)
Control whether user code at EL0 can access the physical timer.
Trait Implementations§
Source§impl GenericTimer for El1PhysicalTimer
impl GenericTimer for El1PhysicalTimer
Source§fn frequency_hz(&self) -> u32
fn frequency_hz(&self) -> u32
Get the timer frequency
Source§fn counter_compare(&self) -> u64
fn counter_compare(&self) -> u64
Get the counter compare value.
Source§fn counter_compare_set(&mut self, value: u64)
fn counter_compare_set(&mut self, value: u64)
Set the counter compare value. Read more
Source§fn countdown_set(&mut self, duration_ticks: u32)
fn countdown_set(&mut self, duration_ticks: u32)
Set the value of the count-down timer. Read more
Source§fn interrupt_masked(&self) -> bool
fn interrupt_masked(&self) -> bool
Is this timer’s interrupt masked?
Source§fn interrupt_mask(&mut self, mask: bool)
fn interrupt_mask(&mut self, mask: bool)
Mask (or unmask) this timer’s interrupt.
Source§fn interrupt_status(&self) -> bool
fn interrupt_status(&self) -> bool
Has this timer’s interrupt fired?
Source§fn delay_ticks(&mut self, ticks: u32)
fn delay_ticks(&mut self, ticks: u32)
Wait for some number of clock ticks