pub struct El1VirtualTimer(/* private fields */);
Expand description
Represents our Virtual Timer when we are running at EL1.
Implementations§
Source§impl El1VirtualTimer
impl El1VirtualTimer
Sourcepub unsafe fn new() -> El1VirtualTimer
pub unsafe fn new() -> El1VirtualTimer
Create an EL1 Generic Timer handle
§Safety
Only create one of these 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_virtual_counter(&mut self, access: bool)
pub fn el0_access_virtual_counter(&mut self, access: bool)
Control whether user code at EL0 can access the virtual counter.
Sourcepub fn el0_access_virtual_timer(&mut self, access: bool)
pub fn el0_access_virtual_timer(&mut self, access: bool)
Control whether user code at EL0 can access the virtual timer.
Sourcepub fn virtual_event_stream_configure(
&mut self,
event_config: Option<&EventConfig>,
)
pub fn virtual_event_stream_configure( &mut self, event_config: Option<&EventConfig>, )
Configure an event stream from the virtual counter.
The event stream is tied to one of the bottom 16 bits of the virtual counter. If you select the bottom (0th) bit, the event fires every counter tick. If you select the 3rd bit, the event fires every 2^3 = 8 counter ticks.
This is useful if you want to ensure that a WFE instruction can never wait forever; effectively it allows you to put a timeout on a WFE.
Pass None to disable.