[][src]Trait sunrise_libuser::ahci::IDiskAsync

pub trait IDiskAsync {
    fn sector_count<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>
    ) -> FutureObj<'a, Result<u64, Error>>;
fn read_dma<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        address: u64,
        unknown_1: &'a mut [Block]
    ) -> FutureObj<'a, Result<(), Error>>;
fn write_dma<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        address: u64,
        blocks: &'a [Block]
    ) -> FutureObj<'a, Result<(), Error>>; fn dispatch<'a>(
        &'a mut self,
        work_queue: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

Interface to an AHCI device.

It can:

Required methods

fn sector_count<'a>(
    &'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>>

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 range 0..IDisk.sector_count().

fn write_dma<'a>(
    &'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 range 0..IDisk.sector_count().
Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    work_queue: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...