2 Definitions from the VirtIo 1.0 specification (csprd05).
4 Copyright (C) 2016, Red Hat, Inc.
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
12 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _VIRTIO_1_0_H_
16 #define _VIRTIO_1_0_H_
18 #include <IndustryStandard/Virtio095.h>
21 // Structures for parsing the VirtIo 1.0 specific PCI capabilities from the
26 UINT8 CapId
; // Capability identifier (generic)
27 UINT8 CapNext
; // Link to next capability (generic)
28 } VIRTIO_PCI_CAP_LINK
;
31 UINT8 ConfigType
; // Identifies the specific VirtIo 1.0 config structure
32 UINT8 Bar
; // The BAR that contains the structure
34 UINT32 Offset
; // Offset within Bar until the start of the structure
35 UINT32 Length
; // Length of the structure
40 // Values for the VIRTIO_PCI_CAP.ConfigType field
42 #define VIRTIO_PCI_CAP_COMMON_CFG 1 // Common configuration
43 #define VIRTIO_PCI_CAP_NOTIFY_CFG 2 // Notifications
44 #define VIRTIO_PCI_CAP_DEVICE_CFG 4 // Device specific configuration
47 // Structure pointed-to by Bar and Offset in VIRTIO_PCI_CAP when ConfigType is
48 // VIRTIO_PCI_CAP_COMMON_CFG
52 UINT32 DeviceFeatureSelect
;
54 UINT32 DriverFeatureSelect
;
59 UINT8 ConfigGeneration
;
62 UINT16 QueueMsixVector
;
64 UINT16 QueueNotifyOff
;
68 } VIRTIO_PCI_COMMON_CFG
;
72 // VirtIo 1.0 device status bits
74 #define VSTAT_FEATURES_OK BIT3
77 // VirtIo 1.0 reserved (device-independent) feature bits
79 #define VIRTIO_F_VERSION_1 BIT32
81 #endif // _VIRTIO_1_0_H_