[−][src]Trait sunrise_libuser::ahci::IDisk
Interface to an AHCI device.
It can:
- get the number of addressable 512-octet sectors on this disk,
- read a range of consecutive sectors.
- write a range of consecutive sectors.
Required methods
fn sector_count(&mut self, manager: WorkQueue<'static>) -> Result<u64, Error>
Retrieves the number of addressable 512-octet sectors on this disk.
fn read_dma(
&mut self,
manager: WorkQueue<'static>,
address: u64,
unknown_1: &mut [Block]
) -> Result<(), Error>
&mut self,
manager: WorkQueue<'static>,
address: u64,
unknown_1: &mut [Block]
) -> Result<(), Error>
Reads sectors from the disk.
This IPC call will invoke the AHCI driver and make it copy sector_count
sectors from the disk
to the memory pointed to by the output buffer.
Error
address..address+sector_count
should be in the range0..IDisk.sector_count()
.
fn write_dma(
&mut self,
manager: WorkQueue<'static>,
address: u64,
blocks: &[Block]
) -> Result<(), Error>
&mut self,
manager: WorkQueue<'static>,
address: u64,
blocks: &[Block]
) -> Result<(), Error>
Writes sectors to the disk.
This IPC call will invoke the AHCI driver and make it copy sector_count
sectors to the disk
from the memory pointed to by the input buffer.
Error
address..address+sector_count
should be in the range0..IDisk.sector_count()
.
Provided methods
fn dispatch<'a>(
&'a mut self,
manager: WorkQueue<'static>,
cmdid: u32,
buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>
&'a mut self,
manager: WorkQueue<'static>,
cmdid: u32,
buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>
Handle an incoming IPC request.