IntId

Struct IntId 

Source
pub struct IntId(/* private fields */);
Expand description

An interrupt ID.

Implementations§

Source§

impl IntId

Source

pub const SPECIAL_SECURE: Self

Special interrupt ID returned when running at EL3 and the interrupt should be handled at S-EL2 or S-EL1.

Source

pub const SPECIAL_NONSECURE: Self

Special interrupt ID returned when running at EL3 and the interrupt should be handled at (non-secure) EL2 or EL1.

Source

pub const SPECIAL_NMI: Self

Special interrupt ID returned when the interrupt is a non-maskable interrupt.

Source

pub const SPECIAL_NONE: Self

Special interrupt ID returned when there is no pending interrupt of sufficient priority for the current security state and interrupt group.

Source

pub const MAX_SPI_COUNT: u32 = 988u32

The maximum number of SPIs which may be supported.

Source

pub const SGI_COUNT: u32 = 16u32

The number of Software Generated Interrupts.

Source

pub const PPI_COUNT: u32 = 16u32

The number of (non-extended) Private Peripheral Interrupts.

Source

pub const MAX_EPPI_COUNT: u32 = 64u32

The maximum number of extended Private Peripheral Interrupts which may be supported.

Source

pub const MAX_ESPI_COUNT: u32 = 1_024u32

The maximum number of extended Shared Peripheral Interrupts which may be supported.

Source

pub const fn sgi(sgi: u32) -> Self

Returns the interrupt ID for the given Software Generated Interrupt.

Source

pub const fn ppi(ppi: u32) -> Self

Returns the interrupt ID for the given Private Peripheral Interrupt.

Source

pub const fn spi(spi: u32) -> Self

Returns the interrupt ID for the given Shared Peripheral Interrupt.

Source

pub const fn eppi(eppi: u32) -> Self

Returns the interrupt ID for the given extended Private Peripheral Interrupt.

Source

pub const fn espi(espi: u32) -> Self

Returns the interrupt ID for the given extended Shared Peripheral Interrupt.

Source

pub const fn lpi(lpi: u32) -> Self

Returns the interrupt ID for the given Locality-specific Peripheral Interrupt.

Source

pub const fn is_sgi(self) -> bool

Returns whether this interrupt ID is for a Software Generated Interrupt.

Source

pub const fn is_ppi(self) -> bool

Returns whether this interrupt ID is for a Private Peripheral Interrupt.

Source

pub const fn is_eppi(self) -> bool

Returns whether this interrupt ID is for an Extended Private Peripheral Interrupt.

Source

pub const fn is_spi(self) -> bool

Returns whether this interrupt ID is for a Shared Peripheral Interrupt.

Source

pub const fn is_espi(self) -> bool

Returns whether this interrupt ID is for an Extended Shared Peripheral Interrupt.

Source

pub const fn is_private(self) -> bool

Returns whether this interrupt ID is private to a core, i.e. it is an SGI, PPI or EPPI.

Source

pub const fn sgi_index(self) -> Option<u32>

Returns SGI index or None if it is not an SGI interrupt ID.

Source

pub const fn private_index(self) -> Option<usize>

Maps SGI, PPI and EPPI interrupt IDs into a continuous index range starting from 0, making it ideal for indexing redistributor registers.

Source

pub const fn espi_index(self) -> Option<usize>

Returns ESPI index or None if it is not an ESPI interrupt ID.

Source

pub fn private() -> impl Iterator<Item = IntId>

Returns an array of all interrupt Ids that are private to a core, i.e. SGIs and PPIs.

Source

pub fn spis() -> impl Iterator<Item = IntId>

Returns an array of all SPI Ids.

Trait Implementations§

Source§

impl Clone for IntId

Source§

fn clone(&self) -> IntId

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for IntId

Source§

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

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

impl From<IntId> for u32

Source§

fn from(intid: IntId) -> Self

Converts to this type from the input type.
Source§

impl Ord for IntId

Source§

fn cmp(&self, other: &IntId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for IntId

Source§

fn eq(&self, other: &IntId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for IntId

Source§

fn partial_cmp(&self, other: &IntId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for IntId

Source§

impl Eq for IntId

Source§

impl StructuralPartialEq for IntId

Auto Trait Implementations§

§

impl Freeze for IntId

§

impl RefUnwindSafe for IntId

§

impl Send for IntId

§

impl Sync for IntId

§

impl Unpin for IntId

§

impl UnwindSafe for IntId

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.