pub struct GicV3 { /* private fields */ }
Expand description
Driver for an Arm Generic Interrupt Controller version 3 (or 4).
Implementations§
source§impl GicV3
impl GicV3
sourcepub const fn new(gicd: *mut u8, gicr: *mut u8) -> Self
pub const fn new(gicd: *mut u8, gicr: *mut u8) -> Self
Constructs a new instance of the driver for a GIC with the given distributor and redistributor base addresses.
Safety
The given base addresses must point to the GIC distributor and redistributor registers respectively. These regions must be mapped into the address space of the process as device memory, and not have any other aliases, either via another instance of this driver or otherwise.
Trait Implementations§
source§impl GenericArmGic for GicV3
impl GenericArmGic for GicV3
source§fn init_primary(&mut self)
fn init_primary(&mut self)
Initialises the GIC.
source§fn enable_interrupt(&mut self, intid: IntId)
fn enable_interrupt(&mut self, intid: IntId)
Enables the interrupt with the given ID.
source§fn set_trigger(&mut self, intid: IntId, tm: TriggerMode)
fn set_trigger(&mut self, intid: IntId, tm: TriggerMode)
Configures the trigger type for the interrupt with the given ID.
source§fn get_and_acknowledge_interrupt(&self) -> Option<IntId>
fn get_and_acknowledge_interrupt(&self) -> Option<IntId>
Gets the ID of the highest priority signalled interrupt, and acknowledges it.
Returns None
if there is no pending interrupt of sufficient priority.
source§fn end_interrupt(&self, intid: IntId)
fn end_interrupt(&self, intid: IntId)
Informs the interrupt controller that the CPU has completed processing the given interrupt. This drops the interrupt priority and deactivates the interrupt.