pub struct Apic { /* private fields */ }
Expand description
Advanced Programmable Interrupt Controller
Implementations
sourceimpl Apic
impl Apic
sourcepub fn new(acpi_rsdp: usize, phys_to_virt: fn(paddr: usize) -> usize) -> Self
pub fn new(acpi_rsdp: usize, phys_to_virt: fn(paddr: usize) -> usize) -> Self
Construct a new Apic
.
pub fn init_local_apic_bsp(phys_to_virt: fn(paddr: usize) -> usize)
pub fn init_local_apic_ap()
pub fn local_apic<'a>() -> &'a mut LocalApic
pub fn register_local_apic_handler(
&self,
vector: usize,
handler: IrqHandler
) -> DeviceResult
Trait Implementations
sourceimpl IrqScheme for Apic
impl IrqScheme for Apic
sourcefn is_valid_irq(&self, gsi: usize) -> bool
fn is_valid_irq(&self, gsi: usize) -> bool
Is a valid IRQ number.
sourcefn mask(&self, gsi: usize) -> DeviceResult
fn mask(&self, gsi: usize) -> DeviceResult
Disable IRQ.
sourcefn unmask(&self, gsi: usize) -> DeviceResult
fn unmask(&self, gsi: usize) -> DeviceResult
Enable IRQ.
sourcefn configure(
&self,
gsi: usize,
tm: IrqTriggerMode,
pol: IrqPolarity
) -> DeviceResult
fn configure(
&self,
gsi: usize,
tm: IrqTriggerMode,
pol: IrqPolarity
) -> DeviceResult
Configure the specified interrupt vector. If it is invoked, it must be invoked prior to interrupt registration. Read more
sourcefn register_handler(&self, gsi: usize, handler: IrqHandler) -> DeviceResult
fn register_handler(&self, gsi: usize, handler: IrqHandler) -> DeviceResult
Add an interrupt handler to an IRQ.
sourcefn unregister(&self, gsi: usize) -> DeviceResult
fn unregister(&self, gsi: usize) -> DeviceResult
Remove the interrupt handler to an IRQ.
sourcefn msi_alloc_block(&self, requested_irqs: usize) -> DeviceResult<Range<usize>>
fn msi_alloc_block(&self, requested_irqs: usize) -> DeviceResult<Range<usize>>
Method used for platform allocation of blocks of MSI and MSI-X compatible IRQ targets. Read more
sourcefn msi_free_block(&self, block: Range<usize>) -> DeviceResult
fn msi_free_block(&self, block: Range<usize>) -> DeviceResult
Method used to free a block of MSI IRQs previously allocated by msi_alloc_block(). This does not unregister IRQ handlers. Read more
sourcefn msi_register_handler(
&self,
block: Range<usize>,
msi_id: usize,
handler: IrqHandler
) -> DeviceResult
fn msi_register_handler(
&self,
block: Range<usize>,
msi_id: usize,
handler: IrqHandler
) -> DeviceResult
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. Read more
sourcefn apic_timer_enable(&self)
fn apic_timer_enable(&self)
[for x86_64] enable apic timer
sourcefn register_device(&self, irq_num: usize, dev: Arc<dyn Scheme>) -> DeviceResult
fn register_device(&self, irq_num: usize, dev: Arc<dyn Scheme>) -> DeviceResult
Register the device to delivery an IRQ.
Auto Trait Implementations
impl !RefUnwindSafe for Apic
impl Send for Apic
impl Sync for Apic
impl Unpin for Apic
impl !UnwindSafe for Apic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> SchemeUpcast for T where
T: Scheme,
impl<T> SchemeUpcast for T where
T: Scheme,
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.