[][src]Struct sunrise_ahci::hba::CmdTable

#[repr(C, align(4096))]pub struct CmdTable {
    cfis: Cfis,
    acmd: [Mmio<u8>; 16],
    _rsv: [Mmio<u8>; 48],
    prdt: [PrdtEntry; 248],
}

Command Table.

Each entry in the command list points to a structure called the command table. It can be found at PxCLB[i].CTBA.

See section 4.2.3

Fields

cfis: Cfisacmd: [Mmio<u8>; 16]_rsv: [Mmio<u8>; 48]prdt: [PrdtEntry; 248]

Implementations

impl CmdTable[src]

pub unsafe fn fill_prdt(
    &mut self,
    buffer: *const u8,
    length: usize,
    header: &mut CmdHeader
) -> Result<(), Error>
[src]

Fills a PRDT with the given buffer.

The buffer can be physically scattered, this function will query all its physical regions from the kernel.

When finished, this function will update the PRDTL count in header.

Unsafety

  • buffer must point to valid memory.
  • buffer[0] - buffer[len - 1] must fall in a single mapping.

Error

  • AhciError::BufferTooScattered: buffer is so scattered it overflows PRDT.
  • query_physical_address() failed.

Panics

  • length must be even.
  • buffer[0] must be the very start of the mapping.

Trait Implementations

impl ZeroInitialized for CmdTable[src]

Auto Trait Implementations

impl RefUnwindSafe for CmdTable

impl Send for CmdTable

impl Sync for CmdTable

impl Unpin for CmdTable

impl UnwindSafe for CmdTable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SizedIPCBuffer for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.