Skip to main content

DcfgArmSmmuDriver

Struct DcfgArmSmmuDriver 

Source
#[repr(C)]
pub struct DcfgArmSmmuDriver { pub mmio_phys: u64, pub num_context_banks_override: u32, pub num_smr_override: u32, pub irq_cnt: u32, pub global_irq_cnt: u32, pub irqs: [DcfgArmSmmuIrq; 128], pub handoff_smr_cnt: u32, pub handoff_smrs: [u32; 16], }

Fields§

§mmio_phys: u64

Base physical address of the SMMU address space. This is also the start of Global Register Space 0 in the SMMU. The effective size of these registers will be determined at runtime from the ID registers present in this first page, specifically the number of context banks in IDR1.NUMCB.

See:

ARM System Memory Management Unit Architecture Specification SMMU architecture version 2.0 ARM IHI 0062D.c

for more details.

§num_context_banks_override: u32

The number of context banks that a driver should limit itself to using, or 0 if all discovered context banks are available for use.

§num_smr_override: u32

The number of stream match registers that a driver should limit itself to using, or 0 if all discovered SMRs are available for use.

§irq_cnt: u32

An array of context bank interrupt definitions discovered during device enumeration. |irq_cnt| reports the total number of valid members while |irqs|, while |global_irq_cnt| reports the total number of global interrupts in |irqs|, with the rest of the interrupts being context bank interrupts. So:

  • IRQs [0, global_irq_cnt) are global interrupts
  • IRQs [global_irq_cnt, irq_cnt) are context bank interrupts corresponding to context banks [0, irq_cnt - global_irq_cnt)
§global_irq_cnt: u32§irqs: [DcfgArmSmmuIrq; 128]§handoff_smr_cnt: u32

An array of stream IDs (defined using SMR value/mask encoding) which are being “handed off” from the bootloader to the HLOS. Downstream drivers should take care to preserve the existing configuration for these stream ids. |handoff_smr_cnt| reports the number of members of |handoff_smrs| which are valid.

Note: Stream ID ranges in SMRs are encoded using two 16 bit fields, a value field and a mask field. These two fields are packed into a single 32-bit integer, with the mask packed into the upper 16 bits, and the value packed into the lower 16 bits.

§handoff_smrs: [u32; 16]

Trait Implementations§

Source§

impl Clone for DcfgArmSmmuDriver

Source§

fn clone(&self) -> DcfgArmSmmuDriver

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 DcfgArmSmmuDriver

Source§

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

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

impl PartialEq for DcfgArmSmmuDriver

Source§

fn eq(&self, other: &DcfgArmSmmuDriver) -> 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 Copy for DcfgArmSmmuDriver

Source§

impl Eq for DcfgArmSmmuDriver

Source§

impl StructuralPartialEq for DcfgArmSmmuDriver

Auto Trait Implementations§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

Uses borrowed data to replace owned data, usually by cloning. Read more
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.