]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/VirtioGpuDxe/VirtioGpu.h
ca5805df8442c1bc3d119ae884106969da0d5e94
3 Internal type and macro definitions for the Virtio GPU hybrid driver.
5 Copyright (C) 2016, Red Hat, Inc.
7 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef _VIRTIO_GPU_DXE_H_
18 #define _VIRTIO_GPU_DXE_H_
20 #include <Library/DebugLib.h>
21 #include <Library/UefiLib.h>
22 #include <Protocol/VirtioDevice.h>
25 // Forward declaration of VGPU_GOP.
27 typedef struct VGPU_GOP_STRUCT VGPU_GOP
;
30 // The abstraction that directly corresponds to a Virtio GPU device.
32 // This structure will be installed on the handle that has the VirtIo Device
33 // Protocol interface, with GUID gEfiCallerIdGuid. A similar trick is employed
34 // in TerminalDxe, and it is necessary so that we can look up VGPU_DEV just
35 // from the VirtIo Device Protocol handle in the Component Name 2 Protocol
40 // VirtIo represents access to the Virtio GPU device. Never NULL.
42 VIRTIO_DEVICE_PROTOCOL
*VirtIo
;
45 // BusName carries a customized name for
46 // EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName(). It is expressed in table
47 // form because it can theoretically support several languages. Never NULL.
49 EFI_UNICODE_STRING_TABLE
*BusName
;
52 // The Child field references the GOP wrapper structure. If this pointer is
53 // NULL, then the hybrid driver has bound (i.e., started) the
54 // VIRTIO_DEVICE_PROTOCOL controller without producing the child GOP
55 // controller (that is, after Start() was called with RemainingDevicePath
56 // pointing to and End of Device Path node). Child can be created and
57 // destroyed, even repeatedly, independently of VGPU_DEV.
59 // In practice, this field represents the single head (scanout) that we
66 // The Graphics Output Protocol wrapper structure.
68 #define VGPU_GOP_SIG SIGNATURE_64 ('V', 'G', 'P', 'U', '_', 'G', 'O', 'P')
70 struct VGPU_GOP_STRUCT
{
74 // ParentBus points to the parent VGPU_DEV object. Never NULL.
79 // GopName carries a customized name for
80 // EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName(). It is expressed in table
81 // form because it can theoretically support several languages. Never NULL.
83 EFI_UNICODE_STRING_TABLE
*GopName
;
86 // GopHandle is the UEFI child handle that carries the device path ending
87 // with the ACPI ADR node, and the Graphics Output Protocol. Never NULL.
92 // The GopDevicePath field is the device path installed on GopHandle,
93 // ending with an ACPI ADR node. Never NULL.
95 EFI_DEVICE_PATH_PROTOCOL
*GopDevicePath
;
98 // The Gop field is installed on the child handle as Graphics Output Protocol
101 // For now it is just a placeholder.
106 #endif // _VIRTIO_GPU_DXE_H_