diff options
Diffstat (limited to 'src/hw/virtio/mod.rs')
-rw-r--r-- | src/hw/virtio/mod.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hw/virtio/mod.rs b/src/hw/virtio/mod.rs index 51af2b3..cfb22e3 100644 --- a/src/hw/virtio/mod.rs +++ b/src/hw/virtio/mod.rs @@ -5,5 +5,21 @@ //! Implements virtio devices, queues, and transport mechanisms. mod queue; +mod mmio; pub use self::queue::*; +pub use self::mmio::*; + +const DEVICE_ACKNOWLEDGE: u32 = 0x01; +const DEVICE_DRIVER: u32 = 0x02; +const DEVICE_DRIVER_OK: u32 = 0x04; +const DEVICE_FEATURES_OK: u32 = 0x08; +const DEVICE_FAILED: u32 = 0x80; + +const TYPE_BLOCK: u32 = 2; + +const INTERRUPT_STATUS_USED_RING: u32 = 0x1; + +/// Offset from the base MMIO address of a virtio device used by the guest to notify the device of +/// queue events. +pub const NOITFY_REG_OFFSET: u32 = 0x50; |