Lines Matching full:mmio

34 /// Raw representation of an MMIO region.
37 /// the represented MMIO region does exist or is properly mapped.
39 /// Instead, the bus specific MMIO implementation must convert this raw representation into an
40 /// `Mmio` instance providing the actual memory accessors. Only by the conversion into an `Mmio`
57 /// Returns the base address of the MMIO region.
63 /// Returns the maximum size of the MMIO region.
89 /// Mmio,
102 /// /// [`paddr`, `paddr` + `SIZE`) must be a valid MMIO region that is mappable into the CPUs
124 /// type Target = Mmio<SIZE>;
128 /// unsafe { Mmio::from_raw(&self.0) }
142 pub struct Mmio<const SIZE: usize = 0>(MmioRaw<SIZE>); struct
162 /// and `IoCapable<u32>`, but not `IoCapable<u64>`, while an MMIO region on a 64-bit
225 /// Types implementing this trait (e.g. MMIO BARs or PCI config regions)
229 /// backends (e.g. MMIO, PCI config space, etc.).
241 /// For MMIO regions, all widths (u8, u16, u32, and u64 on 64-bit systems) are typically
416 /// Mmio,
419 /// fn do_reads(io: &Mmio) -> Result {
450 /// Mmio,
453 /// fn do_writes(io: &Mmio) -> Result {
488 /// Mmio,
504 /// fn do_write_reg(io: &Mmio) -> Result {
533 /// Mmio,
536 /// fn do_update(io: &Mmio<0x1000>) -> Result {
570 /// Mmio,
573 /// fn do_reads(io: &Mmio<0x1000>) {
602 /// Mmio,
605 /// fn do_writes(io: &Mmio<0x1000>) {
636 /// Mmio,
652 /// fn do_write_reg(io: &Mmio<0x1000>) {
680 /// Mmio,
683 /// fn do_update(io: &Mmio<0x1000>) {
729 /// Implements [`IoCapable`] on `$mmio` for `$ty` using `$read_fn` and `$write_fn`.
731 ($mmio:ident, $(#[$attr:meta])* $ty:ty, $read_fn:ident, $write_fn:ident) => {
733 impl<const SIZE: usize> IoCapable<$ty> for $mmio<SIZE> {
735 // SAFETY: By the trait invariant `address` is a valid address for MMIO operations.
740 // SAFETY: By the trait invariant `address` is a valid address for MMIO operations.
747 // MMIO regions support 8, 16, and 32-bit accesses.
748 impl_mmio_io_capable!(Mmio, u8, readb, writeb);
749 impl_mmio_io_capable!(Mmio, u16, readw, writew);
750 impl_mmio_io_capable!(Mmio, u32, readl, writel);
751 // MMIO regions on 64-bit systems also support 64-bit accesses.
753 Mmio,
760 impl<const SIZE: usize> Io for Mmio<SIZE> { implementation
774 impl<const SIZE: usize> IoKnownSize for Mmio<SIZE> { implementation
778 impl<const SIZE: usize> Mmio<SIZE> { impl
779 /// Converts an `MmioRaw` into an `Mmio` instance, providing the accessors to the MMIO mapping.
786 // SAFETY: `Mmio` is a transparent wrapper around `MmioRaw`. in from_raw()
791 /// [`Mmio`] wrapper using relaxed accessors.
793 /// This type provides an implementation of [`Io`] that uses relaxed I/O MMIO operands instead of
796 /// See [`Mmio::relaxed`] for a usage example.
798 pub struct RelaxedMmio<const SIZE: usize = 0>(Mmio<SIZE>);
816 impl<const SIZE: usize> Mmio<SIZE> { implementation
827 /// Mmio,
831 /// fn do_io(io: &Mmio<0x100>) {
838 // SAFETY: `RelaxedMmio` is `#[repr(transparent)]` over `Mmio`, so `Mmio<SIZE>` and in relaxed()
844 // MMIO regions support 8, 16, and 32-bit accesses.
848 // MMIO regions on 64-bit systems also support 64-bit accesses.