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 // Subsystem Device IDs (to be) introduced in VirtIo 1.0
23 #define VIRTIO_SUBSYSTEM_GPU_DEVICE 16
26 // Structures for parsing the VirtIo 1.0 specific PCI capabilities from the
31 UINT8 CapId
; // Capability identifier (generic)
32 UINT8 CapNext
; // Link to next capability (generic)
33 } VIRTIO_PCI_CAP_LINK
;
36 UINT8 ConfigType
; // Identifies the specific VirtIo 1.0 config structure
37 UINT8 Bar
; // The BAR that contains the structure
39 UINT32 Offset
; // Offset within Bar until the start of the structure
40 UINT32 Length
; // Length of the structure
45 // Values for the VIRTIO_PCI_CAP.ConfigType field
47 #define VIRTIO_PCI_CAP_COMMON_CFG 1 // Common configuration
48 #define VIRTIO_PCI_CAP_NOTIFY_CFG 2 // Notifications
49 #define VIRTIO_PCI_CAP_DEVICE_CFG 4 // Device specific configuration
52 // Structure pointed-to by Bar and Offset in VIRTIO_PCI_CAP when ConfigType is
53 // VIRTIO_PCI_CAP_COMMON_CFG
57 UINT32 DeviceFeatureSelect
;
59 UINT32 DriverFeatureSelect
;
64 UINT8 ConfigGeneration
;
67 UINT16 QueueMsixVector
;
69 UINT16 QueueNotifyOff
;
73 } VIRTIO_PCI_COMMON_CFG
;
77 // VirtIo 1.0 device status bits
79 #define VSTAT_FEATURES_OK BIT3
82 // VirtIo 1.0 reserved (device-independent) feature bits
84 #define VIRTIO_F_VERSION_1 BIT32
86 #endif // _VIRTIO_1_0_H_