Expand description
BlockIo adapter for VirtIO-blk driver.
This module provides a gpt_disk_io::BlockIo implementation that wraps
our VirtIO-blk driver. This allows using the FAT32 and ISO9660 filesystem
implementations post-ExitBootServices.
§Architecture
┌────────────────────────────────────────┐
│ FAT32 / ISO9660 Filesystem │
│ (uses BlockIo trait) │
└───────────────────┬────────────────────┘
│ gpt_disk_io::BlockIo
▼
┌────────────────────────────────────────┐
│ VirtioBlkBlockIo (this) │
│ Synchronous wrapper with DMA buffer │
└───────────────────┬────────────────────┘
│ BlockDriver trait
▼
┌────────────────────────────────────────┐
│ VirtioBlkDriver │
│ (async submit/poll interface) │
└────────────────────────────────────────┘§Usage
ⓘ
let mut blk_driver = VirtioBlkDriver::new(mmio_base, config)?;
let mut adapter = VirtioBlkBlockIo::new(&mut blk_driver, dma_buffer)?;
// Now use with FAT32
fat32_ops::read_file(&mut adapter, partition_start, "/vmlinuz")?;Structs§
- BlockIo adapter for VirtIO-blk driver.
Enums§
- Error type for BlockIo operations.