]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Virtio10Dxe/Virtio10.h
BaseTools/Capsule: Do not support -o with --dump-info
[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
6 This program and the accompanying materials are licensed and made available\r
7 under the terms and conditions of the BSD License which accompanies this\r
8 distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
12 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13**/\r
14\r
15#ifndef _VIRTIO_1_0_DXE_H_\r
16#define _VIRTIO_1_0_DXE_H_\r
17\r
18#include <Protocol/PciIo.h>\r
19#include <Protocol/VirtioDevice.h>\r
20\r
21#define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')\r
22\r
23//\r
24// Type of the PCI BAR that contains a VirtIo 1.0 config structure.\r
25//\r
26typedef enum {\r
27 Virtio10BarTypeMem,\r
28 Virtio10BarTypeIo\r
29} VIRTIO_1_0_BAR_TYPE;\r
30\r
31//\r
32// The type below defines the access to a VirtIo 1.0 config structure.\r
33//\r
34typedef struct {\r
35 BOOLEAN Exists; // The device exposes this structure\r
36 VIRTIO_1_0_BAR_TYPE BarType;\r
37 UINT8 Bar;\r
38 UINT32 Offset; // Offset into BAR where structure starts\r
39 UINT32 Length; // Length of structure in BAR.\r
40} VIRTIO_1_0_CONFIG;\r
41\r
42typedef struct {\r
43 UINT32 Signature;\r
44 VIRTIO_DEVICE_PROTOCOL VirtIo;\r
45 EFI_PCI_IO_PROTOCOL *PciIo;\r
46 UINT64 OriginalPciAttributes;\r
47 VIRTIO_1_0_CONFIG CommonConfig; // Common settings\r
48 VIRTIO_1_0_CONFIG NotifyConfig; // Notifications\r
49 UINT32 NotifyOffsetMultiplier;\r
50 VIRTIO_1_0_CONFIG SpecificConfig; // Device specific settings\r
51} VIRTIO_1_0_DEV;\r
52\r
53#define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \\r
54 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)\r
55\r
56#endif // _VIRTIO_1_0_DXE_H_\r