⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

IoApic

Struct IoApic 

Source
pub struct IoApic { /* private fields */ }
Expand description

I/O APIC controller.

The I/O APIC uses indirect register access: write the register index to IOREGSEL, then read/write the value through IOWIN.

Implementations§

Source§

impl IoApic

Source

pub fn read_register(&self, reg: u32) -> u32

Read a 32-bit I/O APIC register.

Source

pub fn write_register(&self, reg: u32, value: u32)

Write a 32-bit value to an I/O APIC register.

Source

pub fn max_redirection_entries(&self) -> u8

Read the maximum number of redirection entries supported by this I/O APIC (from bits 23:16 of the version register, plus one).

Source

pub fn set_irq_route(&self, irq: u8, vector: u8, dest: u8)

Route an external IRQ to a specific interrupt vector and destination APIC ID with edge-triggered, active-high, fixed delivery mode.

Source

pub fn mask_irq(&self, irq: u8)

Mask an IRQ in the I/O APIC redirection table.

Source

pub fn unmask_irq(&self, irq: u8)

Unmask an IRQ in the I/O APIC redirection table.

Auto Trait Implementations§

§

impl Freeze for IoApic

§

impl RefUnwindSafe for IoApic

§

impl Send for IoApic

§

impl Sync for IoApic

§

impl Unpin for IoApic

§

impl UnwindSafe for IoApic

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.