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

AcpiInfo

Struct AcpiInfo 

Source
pub struct AcpiInfo {
Show 23 fields pub oem_id: [u8; 6], pub local_apic_address: u32, pub madt_flags: u32, pub local_apics: [Option<MadtLocalApic>; 16], pub local_apic_count: usize, pub io_apics: [Option<MadtIoApic>; 4], pub io_apic_count: usize, pub isos: [Option<MadtIso>; 24], pub iso_count: usize, pub mcfg_entries: [Option<McfgEntry>; 4], pub mcfg_count: usize, pub has_madt: bool, pub has_mcfg: bool, pub has_dmar: bool, pub dmar_address: u64, pub dmar_length: u32, pub revision: u8, pub has_srat: bool, pub srat_address: u64, pub srat_length: u32, pub has_slit: bool, pub slit_address: u64, pub slit_length: u32,
}
Expand description

Parsed ACPI information, populated by init().

Fields§

§oem_id: [u8; 6]

OEM ID from the RSDT/XSDT (6-byte ASCII, null-padded).

§local_apic_address: u32

Local APIC base address from the MADT.

§madt_flags: u32

MADT flags (bit 0: dual 8259 PIC present).

§local_apics: [Option<MadtLocalApic>; 16]

Local APIC entries (one per CPU).

§local_apic_count: usize

Number of valid local APIC entries.

§io_apics: [Option<MadtIoApic>; 4]

I/O APIC entries.

§io_apic_count: usize

Number of valid I/O APIC entries.

§isos: [Option<MadtIso>; 24]

Interrupt Source Override entries.

§iso_count: usize

Number of valid ISO entries.

§mcfg_entries: [Option<McfgEntry>; 4]

PCIe MCFG entries.

§mcfg_count: usize

Number of valid MCFG entries.

§has_madt: bool

Whether MADT was found and parsed.

§has_mcfg: bool

Whether MCFG was found and parsed.

§has_dmar: bool

Whether DMAR (DMA Remapping) table was found.

§dmar_address: u64

Physical address of the DMAR table (for IOMMU driver to parse).

§dmar_length: u32

Length of the DMAR table in bytes.

§revision: u8

ACPI revision (0 = ACPI 1.0, 2 = ACPI 2.0+).

§has_srat: bool

Whether SRAT (System Resource Affinity Table) was found.

§srat_address: u64

Virtual address of the SRAT table.

§srat_length: u32

Length of the SRAT table in bytes.

§has_slit: bool

Whether SLIT (System Locality Information Table) was found.

§slit_address: u64

Virtual address of the SLIT table.

§slit_length: u32

Length of the SLIT table in bytes.

Implementations§

Source§

impl AcpiInfo

Source

pub fn io_apic_address(&self) -> u32

Get the I/O APIC address (first one, or default 0xFEC0_0000).

Source

pub fn irq_to_gsi(&self, irq: u8) -> (u32, bool, bool)

Look up the GSI for a given ISA IRQ, applying interrupt source overrides.

Source

pub fn cpu_count(&self) -> usize

Count usable CPUs.

Trait Implementations§

Source§

impl Debug for AcpiInfo

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for AcpiInfo

§

impl RefUnwindSafe for AcpiInfo

§

impl Send for AcpiInfo

§

impl Sync for AcpiInfo

§

impl Unpin for AcpiInfo

§

impl UnwindSafe for AcpiInfo

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.