]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Virtio10Dxe/Virtio10.h
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Virtio10Dxe / Virtio10.h
CommitLineData
9399f68a
LE
1/** @file\r
2 Private definitions of the VirtIo 1.0 driver.\r
3\r
4 Copyright (C) 2016, Red Hat, Inc.\r
5\r
b26f0cf9 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
9399f68a
LE
7**/\r
8\r
9#ifndef _VIRTIO_1_0_DXE_H_\r
10#define _VIRTIO_1_0_DXE_H_\r
11\r
12#include <Protocol/PciIo.h>\r
13#include <Protocol/VirtioDevice.h>\r
14\r
ac0a286f 15#define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')\r
9399f68a
LE
16\r
17//\r
18// Type of the PCI BAR that contains a VirtIo 1.0 config structure.\r
19//\r
20typedef enum {\r
21 Virtio10BarTypeMem,\r
22 Virtio10BarTypeIo\r
23} VIRTIO_1_0_BAR_TYPE;\r
24\r
25//\r
26// The type below defines the access to a VirtIo 1.0 config structure.\r
27//\r
28typedef struct {\r
ac0a286f
MK
29 BOOLEAN Exists; // The device exposes this structure\r
30 VIRTIO_1_0_BAR_TYPE BarType;\r
31 UINT8 Bar;\r
32 UINT32 Offset; // Offset into BAR where structure starts\r
33 UINT32 Length; // Length of structure in BAR.\r
9399f68a
LE
34} VIRTIO_1_0_CONFIG;\r
35\r
36typedef struct {\r
ac0a286f
MK
37 UINT32 Signature;\r
38 VIRTIO_DEVICE_PROTOCOL VirtIo;\r
39 EFI_PCI_IO_PROTOCOL *PciIo;\r
40 UINT64 OriginalPciAttributes;\r
41 VIRTIO_1_0_CONFIG CommonConfig; // Common settings\r
42 VIRTIO_1_0_CONFIG NotifyConfig; // Notifications\r
43 UINT32 NotifyOffsetMultiplier;\r
44 VIRTIO_1_0_CONFIG SpecificConfig; // Device specific settings\r
9399f68a
LE
45} VIRTIO_1_0_DEV;\r
46\r
47#define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \\r
48 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)\r
49\r
50#endif // _VIRTIO_1_0_DXE_H_\r