pub trait SystemInterruptControllerApi {
    // Required methods
    fn id(&self) -> SystemInterruptControllerId;
    fn version(&self) -> SystemInterruptControllerVersion;
    fn get_destination(
        &self,
        interrupt: InterruptNumber
    ) -> Result<(Vec<CpuId>, Priority), &'static str>;
    fn set_destination(
        &self,
        interrupt: InterruptNumber,
        destination: Option<CpuId>,
        priority: Priority
    ) -> Result<(), &'static str>;
}
Expand description

Functionality provided by system-wide interrupt controllers.

Note that a system may actually have multiple system-wide interrupt controllers.

  • On x86_64, this corresponds to an I/O APIC (IOAPIC).
  • On aarch64 (with GIC), this corresponds to the Distributor.

Required Methods§

source

fn id(&self) -> SystemInterruptControllerId

Returns the unique ID of this system-wide interrupt controller.

source

fn version(&self) -> SystemInterruptControllerVersion

Returns the version ID of this system-wide interrupt controller.

source

fn get_destination( &self, interrupt: InterruptNumber ) -> Result<(Vec<CpuId>, Priority), &'static str>

Returns the destination(s) that the given interrupt is routed to by this system-wide interrupt controller.

source

fn set_destination( &self, interrupt: InterruptNumber, destination: Option<CpuId>, priority: Priority ) -> Result<(), &'static str>

Routes the given interrupt to the given destination with the given priority.

Implementors§