pub struct Capability<M>where
    M: Mapper + Clone,{
    pub caplength: ReadWrite<CapabilityRegistersLength, M>,
    pub hciversion: ReadWrite<InterfaceVersionNumber, M>,
    pub hcsparams1: ReadWrite<StructuralParameters1, M>,
    pub hcsparams2: ReadWrite<StructuralParameters2, M>,
    pub hcsparams3: ReadWrite<StructuralParameters3, M>,
    pub hccparams1: ReadWrite<CapabilityParameters1, M>,
    pub dboff: ReadWrite<DoorbellOffset, M>,
    pub rtsoff: ReadWrite<RuntimeRegisterSpaceOffset, M>,
    pub hccparams2: ReadWrite<CapabilityParameters2, M>,
    pub vtiosoff: ReadWrite<VirtualizationBasedTrustedIoRegisterSpaceOffset, M>,
}
Expand description

Host Controller Capability Registers

Fields§

§caplength: ReadWrite<CapabilityRegistersLength, M>

Capability Registers Length

§hciversion: ReadWrite<InterfaceVersionNumber, M>

Host Controller Interface Version Number

§hcsparams1: ReadWrite<StructuralParameters1, M>

Structural Parameters 1

§hcsparams2: ReadWrite<StructuralParameters2, M>

Structural Parameters 2

§hcsparams3: ReadWrite<StructuralParameters3, M>

Structural Parameters 3

§hccparams1: ReadWrite<CapabilityParameters1, M>

Capability Parameters 1

§dboff: ReadWrite<DoorbellOffset, M>

Doorbell Offset

§rtsoff: ReadWrite<RuntimeRegisterSpaceOffset, M>

Runtime Register Space Offset

§hccparams2: ReadWrite<CapabilityParameters2, M>

Capability Parameters 2

§vtiosoff: ReadWrite<VirtualizationBasedTrustedIoRegisterSpaceOffset, M>

Virtualization Based Trusted IO Register Space Offset

Implementations§

source§

impl<M> Capability<M>where M: Mapper + Clone,

source

pub unsafe fn new(mmio_base: usize, mapper: &M) -> Selfwhere M: Mapper,

Creates a new accessor to the Host Controller Capability Registers.

Safety

The caller must ensure that the Host Controller Capability Registers are accessed only through this struct.

Panics

This method panics if mmio_base is not aligned correctly.

Trait Implementations§

source§

impl<M> Debug for Capability<M>where M: Mapper + Clone + Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<M> RefUnwindSafe for Capability<M>where M: RefUnwindSafe,

§

impl<M> Send for Capability<M>where M: Send,

§

impl<M> Sync for Capability<M>where M: Sync,

§

impl<M> Unpin for Capability<M>where M: Unpin,

§

impl<M> UnwindSafe for Capability<M>where M: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.