OvmfPkg: export abstract QEMU blob filesystem in standalone driver

Expose the existing implementation of an abstract filesystem exposing
the blobs passed to QEMU via the command line via a standalone DXE
driver.

Notable difference with the original code is the switch to a new vendor
GUIDed media device path, as opposed to a vendor GUID hardware device
path, which is not entirely appropriate for pure software constructs.

Since we are using the GetTime() runtime service in a DXE_DRIVER type
module, we need to DEPEX explicitly on gEfiRealTimeClockArchProtocolGuid.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2566
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ard Biesheuvel
2020-02-28 14:58:14 +01:00
committed by mergify[bot]
parent 6ae2d31ca2
commit 57f9b7f89e
2 changed files with 1027 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
## @file
# DXE driver to expose the 'kernel', 'initrd' and 'cmdline' blobs
# provided by QEMU as files in an abstract file system
#
# Copyright (C) 2014-2016, Red Hat, Inc.
# Copyright (C) 2020, Arm, Limited.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 1.27
BASE_NAME = QemuKernelLoaderFsDxe
FILE_GUID = 806040ca-dad9-4978-a3b4-2d2ab0c8a48f
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = QemuKernelLoaderFsDxeEntrypoint
[Sources]
QemuKernelLoaderFsDxe.c
[Packages]
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MemoryAllocationLib
QemuFwCfgLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiRuntimeServicesTableLib
[Guids]
gEfiFileInfoGuid
gEfiFileSystemInfoGuid
gEfiFileSystemVolumeLabelInfoIdGuid
gQemuKernelLoaderFsMediaGuid
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
gEfiSimpleFileSystemProtocolGuid ## PRODUCES
[Depex]
gEfiRealTimeClockArchProtocolGuid