Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek a2a4fa6670 OvmfPkg/VirtioGpuDxe: introduce with Component Name 2 and Driver Binding
This patch adds the skeleton of the driver: it implements the Component
Name 2 Protocol and the Driver  Binding Protocol, in accordance with the
generic and GOP-specific requirements set forth in the UEFI spec and the
Driver Writers' Guide.

The basic idea is that VGPU_DEV abstracts the virtio GPU device, while the
single VGPU_GOP that we intend to support at this point stands for "head"
(aka "scanout") #0.

For now, the Virtio Device Protocol is only used for driver binding; no
actual virtio operations are done yet. Similarly, we use a "dummy" GOP
GUID and protocol structure (a plain UINT8 object) for now, so that
GOP-consuming drivers don't look at what we produce just yet.

The driver is a bit different from the other virtio device drivers written
thus far:

- It implements the GetControllerName() member of the Component Name 2
  Protocol. (Formatting helpful names is recommended by UEFI.) As a "best
  effort", we format the PCI BDF into the name (a PCI backend is not
  guaranteed by VIRTIO_DEVICE_PROTOCOL). It should provide a more friendly
  experience in the shell and elsewhere.

- This driver seeks to support all RemainingDevicePath cases:
  - NULL: produce all (= one) child handles (= VGPU_GOP heads) at once,
  - End of Device Path Node: produce no child handles,
  - specific ACPI ADR Node: check if it's supportable, and produce it
    (only one specific child controller is supported).
  This is one of the reasons for separating VGPU_GOP from VGPU_DEV.

The driver is a hybrid driver: it produces both child handles (one, to be
exact), but also installs a structure (VGPU_DEV) directly on the VirtIo
controller handle, using gEfiCallerIdGuid as protocol GUID. This is a
trick I've seen elsewhere in edk2 (for example, TerminalDxe), and it is
necessary for the following reason:

In EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName(), we must be able to
"cast down" a VirtIo ControllerHandle to our own private data structure
(VGPU_DEV). That's only possible if we install the structure directly on
the VirtIo ControllerHandle (thereby rendering the driver a hybrid
driver), because a child controller with our GOP implementation on it may
not exist / be passed in there.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=66
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-09-01 22:54:55 +02:00
AppPkg AppPkg/.../Python: Clean up and document how to escape the -# option. 2016-01-06 01:00:19 +00:00
ArmPkg ArmPkg: remove BaseMemoryLibVstm implementation of BaseMemoryLib 2016-09-01 15:03:00 +01:00
ArmPlatformPkg ArmPlatformPkg/ArmPlatformStackLib: switch to ASM_FUNC() asm macro 2016-08-11 13:25:06 +02:00
ArmVirtPkg ArmVirtPkg: enable EBC interpreter for AArch64 2016-08-26 11:53:48 +01:00
BaseTools BaseTools: UpdateImageSize include Image auth info for FMP Auth capsule 2016-08-30 15:56:21 +08:00
BeagleBoardPkg BeagleBoardPkg: add missing ArmMmuLib resolution 2016-08-11 13:25:04 +02:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg/SecCore: Adding NASM files in SecCore module 2016-08-03 17:20:17 -07:00
CorebootPayloadPkg CorebootPayloadPkg: fixed GCC49 and GCC5 hang in PeiCore 2016-08-17 23:38:12 -07:00
CryptoPkg CryptoPkg: Fix "responsiblity" typos 2016-08-11 15:21:49 +08:00
DuetPkg DuetPkg: Add DxeMpInitLib instance reference 2016-08-19 15:09:26 +08:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix GCC build failure 2016-08-01 12:44:44 +08:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg: make PrePiMemoryAllocationLib a SEC type library 2016-08-03 15:45:23 +02:00
EmulatorPkg BaseTools GCC: use 'gcc' as the linker command for GCC44 and later 2016-08-02 08:40:43 +02:00
FatBinPkg FatBinPkg: Change to 2-clause BSD license 2016-04-22 00:55:21 -07:00
FatPkg FatPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:03 +08:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Use IsZeroGuid API for zero GUID checking 2016-08-31 11:13:49 +08:00
IntelFrameworkPkg IntelFrameworkPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:04 +08:00
IntelFsp2Pkg IntelFsp2Pkg: Fix typo and comments 2016-08-31 14:27:54 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:05 +08:00
IntelFspPkg IntelFspPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:06 +08:00
IntelFspWrapperPkg IntelFspWrapperPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:06 +08:00
IntelSiliconPkg IntelSiliconPkg: Add Firmware Interface Table (FIT) definitions 2016-08-30 09:30:27 +08:00
MdeModulePkg MdeModulePkg VarCheck: #### in L"Boot####" are upper case hex 2016-08-31 15:23:42 +08:00
MdePkg MdePkg BaseMemoryLibSse2: Add SSE2 implementation of API IsZeroBuffer() 2016-08-22 18:54:31 +08:00
NetworkPkg NetworkPkg/IpSecDxe: Fix wrong IKE header "FLAG" update 2016-08-18 16:53:28 +08:00
Nt32Pkg Nt32Pkg: Make Shell as the first boot option 2016-08-01 12:58:43 +08:00
Omap35xxPkg Omap35xxPkg: drop CpuExceptionHandlerLib library class resolution 2016-03-17 09:15:11 +01:00
OptionRomPkg OptionRomPkg: Fix typos in comments 2016-07-11 10:29:47 +08:00
OvmfPkg OvmfPkg/VirtioGpuDxe: introduce with Component Name 2 and Driver Binding 2016-09-01 22:54:55 +02:00
PcAtChipsetPkg PcAtChipsetPkg AcpiTimerLib: Wait 363 ACPI timer counts to get TSC Freq 2016-08-18 11:01:54 +08:00
PerformancePkg PerformancePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:09 +08:00
QuarkPlatformPkg QuarkPlatformPkg: Add MpInitLib reference in DSC files. 2016-08-17 20:05:21 +08:00
QuarkSocPkg QuarkSocPkg/SmmCpuFeaturesLib: Add SMRR PhysBase/PhysMask fields check 2016-05-19 10:04:34 -07:00
SecurityPkg SecurityPkg: TPM12CommandLib: Add Response returnCode Check 2016-09-01 14:50:44 +08:00
ShellBinPkg ShellBinPkg Arm/AArch64 Shell binary update 2016-08-02 12:25:13 +02:00
ShellPkg ShellPkg: Fix the incorrect return status in function FindFiles() 2016-09-01 16:38:07 +08:00
SourceLevelDebugPkg UefiCpuPkg/LocalApic.h: Remove duplicated/conflicted definitions 2016-08-17 19:54:41 +08:00
StdLib StdLib/LibC ARM AARCH64: do not redefine compiler intrinsics 2016-08-09 10:10:12 +02:00
StdLibPrivateInternalFiles StdLib: Clarify and improve comments. 2016-01-06 00:31:42 +00:00
UefiCpuPkg UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdAcpiS3Enable to control the code 2016-09-01 08:18:59 -07:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2DeviceRefCodePkg/ValleyView2Soc: Remove the unused code 2016-08-03 11:02:19 +08:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Add RAW file type to Rule.Common.SEC.BINARY 2016-08-17 17:49:30 +08:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt BaseTools: Updated BuildNotes URLs 2016-03-25 09:46:44 +08:00
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 2015-10-08 09:29:36 +00:00
Maintainers.txt Maintainers.txt: Add IntelFsp2Pkg, IntelFsp2WrapperPkg and IntelSiliconPkg. 2016-08-30 09:31:29 +08:00
edksetup.bat Update edksetup.bat to check NASM system environment variable 2016-07-26 10:16:48 +08:00
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00