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

RedirectionEntry

Struct RedirectionEntry 

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

Redirection table entry – represents a 64-bit I/O APIC routing entry.

Layout:

  • Bits 7:0 – Interrupt vector
  • Bits 10:8 – Delivery mode (000=Fixed, 001=LowestPri, 010=SMI, 100=NMI, 101=INIT, 111=ExtINT)
  • Bit 11 – Destination mode (0=Physical, 1=Logical)
  • Bit 12 – Delivery status (read-only: 0=idle, 1=pending)
  • Bit 13 – Pin polarity (0=active high, 1=active low)
  • Bit 14 – Remote IRR (read-only, level-triggered)
  • Bit 15 – Trigger mode (0=edge, 1=level)
  • Bit 16 – Mask (1=masked)
  • Bits 63:56 – Destination APIC ID (physical mode)

Implementations§

Source§

impl RedirectionEntry

Source

pub const fn new(vector: u8) -> Self

Create a new masked redirection entry with the given vector.

Source

pub fn set_vector(&mut self, vector: u8)

Set the interrupt vector (bits 7:0).

Source

pub fn vector(&self) -> u8

Get the interrupt vector.

Source

pub fn set_delivery_mode(&mut self, mode: u8)

Set delivery mode (bits 10:8). 0=Fixed, 1=LowestPriority, 2=SMI, 4=NMI, 5=INIT, 7=ExtINT.

Source

pub fn set_dest_mode_logical(&mut self, logical: bool)

Set destination mode (bit 11). 0=Physical, 1=Logical.

Source

pub fn set_active_low(&mut self, active_low: bool)

Set pin polarity (bit 13). false=active high, true=active low.

Source

pub fn set_level_triggered(&mut self, level: bool)

Set trigger mode (bit 15). false=edge, true=level.

Source

pub fn set_masked(&mut self, masked: bool)

Set mask bit (bit 16). true=masked.

Source

pub fn is_masked(&self) -> bool

Check if the entry is masked.

Source

pub fn set_destination(&mut self, dest: u8)

Set destination APIC ID (bits 63:56).

Source

pub fn low(&self) -> u32

Get the low 32 bits of the entry.

Source

pub fn high(&self) -> u32

Get the high 32 bits of the entry.

Source

pub fn from_parts(low: u32, high: u32) -> Self

Construct from low and high 32-bit halves.

Trait Implementations§

Source§

impl Clone for RedirectionEntry

Source§

fn clone(&self) -> RedirectionEntry

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RedirectionEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for RedirectionEntry

Auto Trait Implementations§

§

impl Freeze for RedirectionEntry

§

impl RefUnwindSafe for RedirectionEntry

§

impl Send for RedirectionEntry

§

impl Sync for RedirectionEntry

§

impl Unpin for RedirectionEntry

§

impl UnwindSafe for RedirectionEntry

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> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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.