[−][src]Trait sunrise_libuser::ahci::IDiskAsync
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<'a>(
&'a mut self,
work_queue: WorkQueue<'static>
) -> FutureObj<'a, Result<u64, Error>>
&'a mut self,
work_queue: WorkQueue<'static>
) -> FutureObj<'a, Result<u64, Error>>
Retrieves the number of addressable 512-octet sectors on this disk.
fn read_dma<'a>(
&'a mut self,
work_queue: WorkQueue<'static>,
address: u64,
unknown_1: &'a mut [Block]
) -> FutureObj<'a, Result<(), Error>>
&'a mut self,
work_queue: WorkQueue<'static>,
address: u64,
unknown_1: &'a mut [Block]
) -> FutureObj<'a, 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<'a>(
&'a mut self,
work_queue: WorkQueue<'static>,
address: u64,
blocks: &'a [Block]
) -> FutureObj<'a, Result<(), Error>>
&'a mut self,
work_queue: WorkQueue<'static>,
address: u64,
blocks: &'a [Block]
) -> FutureObj<'a, 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,
work_queue: WorkQueue<'static>,
cmdid: u32,
buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>
&'a mut self,
work_queue: WorkQueue<'static>,
cmdid: u32,
buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>
Handle an incoming IPC request.