2 Private definitions of the VirtIo 1.0 driver.
4 Copyright (C) 2016, Red Hat, Inc.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _VIRTIO_1_0_DXE_H_
10 #define _VIRTIO_1_0_DXE_H_
12 #include <Protocol/PciIo.h>
13 #include <Protocol/VirtioDevice.h>
15 #define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')
18 // Type of the PCI BAR that contains a VirtIo 1.0 config structure.
23 } VIRTIO_1_0_BAR_TYPE
;
26 // The type below defines the access to a VirtIo 1.0 config structure.
29 BOOLEAN Exists
; // The device exposes this structure
30 VIRTIO_1_0_BAR_TYPE BarType
;
32 UINT32 Offset
; // Offset into BAR where structure starts
33 UINT32 Length
; // Length of structure in BAR.
38 VIRTIO_DEVICE_PROTOCOL VirtIo
;
39 EFI_PCI_IO_PROTOCOL
*PciIo
;
40 UINT64 OriginalPciAttributes
;
41 VIRTIO_1_0_CONFIG CommonConfig
; // Common settings
42 VIRTIO_1_0_CONFIG NotifyConfig
; // Notifications
43 UINT32 NotifyOffsetMultiplier
;
44 VIRTIO_1_0_CONFIG SpecificConfig
; // Device specific settings
47 #define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \
48 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)
50 #endif // _VIRTIO_1_0_DXE_H_