pub struct AhciBlockDevice { /* private fields */ }Expand description
Wrapper around an AhciPort for the BlockDevice trait.
In a production system, this would hold references to DMA-allocated command list and received FIS areas. For now, it provides the structural interface.
Implementations§
Trait Implementations§
Source§impl BlockDevice for AhciBlockDevice
Available on crate feature alloc only.
impl BlockDevice for AhciBlockDevice
Available on crate feature
alloc only.Source§fn block_size(&self) -> usize
fn block_size(&self) -> usize
Get block size in bytes
Source§fn block_count(&self) -> u64
fn block_count(&self) -> u64
Get total number of blocks
Source§fn read_blocks(
&self,
start_block: u64,
buffer: &mut [u8],
) -> Result<(), KernelError>
fn read_blocks( &self, start_block: u64, buffer: &mut [u8], ) -> Result<(), KernelError>
Read blocks from device
Source§fn write_blocks(
&mut self,
start_block: u64,
buffer: &[u8],
) -> Result<(), KernelError>
fn write_blocks( &mut self, start_block: u64, buffer: &[u8], ) -> Result<(), KernelError>
Write blocks to device
Source§fn flush(&mut self) -> Result<(), KernelError>
fn flush(&mut self) -> Result<(), KernelError>
Flush any cached writes