1#ifndef __HAL__VIRTIO__VIRTIO_H__
2#define __HAL__VIRTIO__VIRTIO_H__
6#define VIRTIO_PCI_CAP 0x09
8#define VIRTIO_PCI_CAP_COMMON_CFG 1
9#define VIRTIO_PCI_CAP_NOTIFY_CFG 2
10#define VIRTIO_PCI_CAP_ISR_CFG 3
11#define VIRTIO_PCI_CAP_DEVICE_CFG 4
12#define VIRTIO_PCI_CAP_PCI_CFG 5
15#define VIRTIO_STATUS_ACKNOWLEDGE (1 << 0)
16#define VIRTIO_STATUS_DRIVER (1 << 1)
17#define VIRTIO_STATUS_DRIVER_OK (1 << 2)
18#define VIRTIO_STATUS_FEATURES_OK (1 << 3)
19#define VIRTIO_STATUS_DEVICE_NEEDS_RESET (1 << 6)
20#define VIRTIO_STATUS_FAILED (1 << 7)
uint32_t device_feature_select
uint32_t driver_feature_select
uint8_t config_generation
uint16_t queue_msix_vector
uint16_t queue_notify_off
virtio_pci_common_cfg_t * common_cfg
volatile uint32_t * notify_base
uintptr_t notify_multiplier
struct virtq_avail * avail
struct ioforge_virtio_device * find_virtio_device_by_id(uint16_t vendor_id, uint16_t device_id)