[][src]Struct kernel::virtio::VirtIO

pub struct VirtIO(Mutex<VirtIOData>);

Implementations

impl VirtIO[src]

pub const fn new() -> Self[src]

pub unsafe fn init(&mut self)[src]

Initialize VIRTIO driver.

Should be called in booting hart.

fn rw(&mut self, b: Box<Buf>, write: bool) -> Box<Buf>[src]

Read-write operation

pub fn read(&mut self, dev: u32, blockno: u32) -> Box<Buf>[src]

Read from device and block number

pub fn write(&mut self, buf: Box<Buf>)[src]

Write buffer to disk