TianoCore EDK2 master
Loading...
Searching...
No Matches
Virtio10.h
Go to the documentation of this file.
1
9#ifndef _VIRTIO_1_0_DXE_H_
10#define _VIRTIO_1_0_DXE_H_
11
12#include <Protocol/PciIo.h>
14
15#define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')
16
17//
18// Type of the PCI BAR that contains a VirtIo 1.0 config structure.
19//
20typedef enum {
21 Virtio10BarTypeMem,
22 Virtio10BarTypeIo
23} VIRTIO_1_0_BAR_TYPE;
24
25//
26// The type below defines the access to a VirtIo 1.0 config structure.
27//
28typedef struct {
29 BOOLEAN Exists; // The device exposes this structure
30 VIRTIO_1_0_BAR_TYPE BarType;
31 UINT8 Bar;
32 UINT32 Offset; // Offset into BAR where structure starts
33 UINT32 Length; // Length of structure in BAR.
35
36typedef struct {
37 UINT32 Signature;
40 UINT64 OriginalPciAttributes;
41 VIRTIO_1_0_CONFIG CommonConfig; // Common settings
42 VIRTIO_1_0_CONFIG NotifyConfig; // Notifications
43 UINT32 NotifyOffsetMultiplier;
44 VIRTIO_1_0_CONFIG SpecificConfig; // Device specific settings
46
47#define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \
48 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)
49
50#endif // _VIRTIO_1_0_DXE_H_