2 Private definitions of the VirtIo 1.0 driver.
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_DXE_H_
16 #define _VIRTIO_1_0_DXE_H_
18 #include <Protocol/PciIo.h>
19 #include <Protocol/VirtioDevice.h>
21 #define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')
24 // Type of the PCI BAR that contains a VirtIo 1.0 config structure.
29 } VIRTIO_1_0_BAR_TYPE
;
32 // The type below defines the access to a VirtIo 1.0 config structure.
35 BOOLEAN Exists
; // The device exposes this structure
36 VIRTIO_1_0_BAR_TYPE BarType
;
38 UINT32 Offset
; // Offset into BAR where structure starts
39 UINT32 Length
; // Length of structure in BAR.
44 VIRTIO_DEVICE_PROTOCOL VirtIo
;
45 EFI_PCI_IO_PROTOCOL
*PciIo
;
46 UINT64 OriginalPciAttributes
;
47 VIRTIO_1_0_CONFIG CommonConfig
; // Common settings
48 VIRTIO_1_0_CONFIG NotifyConfig
; // Notifications
49 UINT32 NotifyOffsetMultiplier
;
50 VIRTIO_1_0_CONFIG SpecificConfig
; // Device specific settings
53 #define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \
54 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)
56 #endif // _VIRTIO_1_0_DXE_H_