Madt

Struct Madt 

Source
pub struct Madt {
    pub header: SdtHeader,
    pub local_apic_address: u32,
    pub flags: u32,
    /* private fields */
}
Expand description

Represents the MADT - this contains the MADT header fields. You can then iterate over a Madt to read each entry from it.

In modern versions of ACPI, the MADT can detail one of four interrupt models:

  • The ancient dual-i8259 legacy PIC model
  • The Advanced Programmable Interrupt Controller (APIC) model
  • The Streamlined Advanced Programmable Interrupt Controller (SAPIC) model (for Itanium systems)
  • The Generic Interrupt Controller (GIC) model (for ARM systems)

The MADT is a variable-sized structure consisting of a static header and then a variable number of entries. This type only contains the static portion, and then uses pointer arithmetic to parse the following entries. To make this sound, this type is !Unpin - this prevents you from getting anything other than a Pin<&Madt> out of a PhysicalMapping, thereby preventing a Madt from being moved before Madt::entries is called.

Fields§

§header: SdtHeader§local_apic_address: u32§flags: u32

Implementations§

Source§

impl Madt

Source

pub fn get_mpwk_mailbox_addr(self: Pin<&Self>) -> Result<u64, AcpiError>

Source

pub fn parse_interrupt_model_in<'a, A>( self: Pin<&Self>, allocator: A, ) -> AcpiResult<(InterruptModel<'a, A>, Option<ProcessorInfo<'a, A>>)>
where A: Allocator + Clone,

Source

pub fn entries(self: Pin<&Self>) -> MadtEntryIter<'_>

Source

pub fn supports_8259(&self) -> bool

Trait Implementations§

Source§

impl AcpiTable for Madt

§Safety: Implementation properly represents a valid MADT.
Source§

const SIGNATURE: Signature = Signature::MADT

Source§

fn header(&self) -> &SdtHeader

Source§

fn validate(&self) -> AcpiResult<()>

Source§

impl Debug for Madt

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Madt

§

impl RefUnwindSafe for Madt

§

impl Send for Madt

§

impl Sync for Madt

§

impl !Unpin for Madt

§

impl UnwindSafe for Madt

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.