pub trait IrqScheme: Scheme {
    fn is_valid_irq(&self, irq_num: usize) -> bool;
    fn mask(&self, irq_num: usize) -> Result<(), DeviceError>;
    fn unmask(&self, irq_num: usize) -> Result<(), DeviceError>;
    fn register_handler(
        &self,
        irq_num: usize,
        handler: Box<dyn Fn() + Sync + Send + 'static, Global>
    ) -> Result<(), DeviceError>; fn unregister(&self, irq_num: usize) -> Result<(), DeviceError>; fn configure(
        &self,
        _irq_num: usize,
        _tm: IrqTriggerMode,
        _pol: IrqPolarity
    ) -> Result<(), DeviceError> { ... } fn register_device(
        &self,
        irq_num: usize,
        dev: Arc<dyn Scheme + 'static>
    ) -> Result<(), DeviceError> { ... } fn msi_alloc_block(
        &self,
        _requested_irqs: usize
    ) -> Result<Range<usize>, DeviceError> { ... } fn msi_free_block(&self, _block: Range<usize>) -> Result<(), DeviceError> { ... } fn msi_register_handler(
        &self,
        _block: Range<usize>,
        _msi_id: usize,
        _handler: Box<dyn Fn() + Sync + Send + 'static, Global>
    ) -> Result<(), DeviceError> { ... } fn init_hart(&self) { ... } fn apic_timer_enable(&self) { ... } }

Required Methods

Is a valid IRQ number.

Disable IRQ.

Enable IRQ.

Add an interrupt handler to an IRQ.

Remove the interrupt handler to an IRQ.

Provided Methods

Configure the specified interrupt vector. If it is invoked, it must be invoked prior to interrupt registration.

Register the device to delivery an IRQ.

Method used for platform allocation of blocks of MSI and MSI-X compatible IRQ targets.

Method used to free a block of MSI IRQs previously allocated by msi_alloc_block(). This does not unregister IRQ handlers.

Register a handler function for a given msi_id within an msi_block_t. Passing a NULL handler will effectively unregister a handler for a given msi_id within the block.

Init irq for current cpu. Some IRQ hardware requires per-CPU initialization.

[for x86_64] enable apic timer

Implementors