OvmfPkg/VirtioSerialDxe: add driver

Add a driver for the virtio serial device.

The virtio serial device also known as virtio console device because
initially it had only support for a single tty, intended to be used as
console.  Support for multiple streams and named data ports has been
added later on.

The driver supports tty ports only, they are registered as SerialIo
UART in the system.

Named ports are detected and logged, but not exposed as devices.  They
are usually used by guest agents to communicate with the host.  It's not
clear whenever it makes sense for the firmware to run such agents and if
so which efi protocol could be to expose the ports.  So leaving that for
another day.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann
2023-05-04 15:11:59 +02:00
committed by mergify[bot]
parent 1694b00511
commit 4d1452c599
5 changed files with 1884 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
## @file
# This driver produces FIXME instances for virtio-serial devices.
#
# Copyright (C) 2016, Linaro Ltd.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = VirtioSerialDxe
FILE_GUID = 23CACE14-EBA4-49F6-9681-C697FF0B649E
MODULE_TYPE = UEFI_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = VirtioSerialEntryPoint
[Sources]
VirtioSerial.h
VirtioSerial.c
VirtioSerialPort.c
VirtioSerialRing.c
[Packages]
MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseMemoryLib
DebugLib
DevicePathLib
MemoryAllocationLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiLib
VirtioLib
[Protocols]
gVirtioDeviceProtocolGuid ## TO_START
gEfiSerialIoProtocolGuid