VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Virtio10Dxe/Virtio10.h@ 80820

Last change on this file since 80820 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/** @file
2 Private definitions of the VirtIo 1.0 driver.
3
4 Copyright (C) 2016, Red Hat, Inc.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7**/
8
9#ifndef _VIRTIO_1_0_DXE_H_
10#define _VIRTIO_1_0_DXE_H_
11
12#include <Protocol/PciIo.h>
13#include <Protocol/VirtioDevice.h>
14
15#define VIRTIO_1_0_SIGNATURE SIGNATURE_32 ('V', 'I', 'O', '1')
16
17//
18// Type of the PCI BAR that contains a VirtIo 1.0 config structure.
19//
20typedef enum {
21 Virtio10BarTypeMem,
22 Virtio10BarTypeIo
23} VIRTIO_1_0_BAR_TYPE;
24
25//
26// The type below defines the access to a VirtIo 1.0 config structure.
27//
28typedef struct {
29 BOOLEAN Exists; // The device exposes this structure
30 VIRTIO_1_0_BAR_TYPE BarType;
31 UINT8 Bar;
32 UINT32 Offset; // Offset into BAR where structure starts
33 UINT32 Length; // Length of structure in BAR.
34} VIRTIO_1_0_CONFIG;
35
36typedef struct {
37 UINT32 Signature;
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
45} VIRTIO_1_0_DEV;
46
47#define VIRTIO_1_0_FROM_VIRTIO_DEVICE(Device) \
48 CR (Device, VIRTIO_1_0_DEV, VirtIo, VIRTIO_1_0_SIGNATURE)
49
50#endif // _VIRTIO_1_0_DXE_H_
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette