[−][src]Struct sunrise_ahci::hba::CmdTable
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: Cfis
acmd: [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]
&mut self,
buffer: *const u8,
length: usize,
header: &mut CmdHeader
) -> Result<(), Error>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,