[edk2-devel] [PATCH 02/13] OvmfPkg: export abstract QEMU blob filesystem in standalone driver
Laszlo Ersek
lersek at redhat.com
Mon Mar 2 13:45:05 UTC 2020
On 03/02/20 08:29, Ard Biesheuvel wrote:
> Expose the existing implementation of an abstract filesystem exposing
> the blobs passed to QEMU via the command line via a standalone DXE
> driver.
"git show --find-copies-harder" works wonders while reviewing this patch :)
>
> 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.
Good point!
>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2566
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> ---
> OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 979 ++++++++++++++++++++
> OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf | 48 +
> 2 files changed, 1027 insertions(+)
>
> diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> new file mode 100644
> index 000000000000..efecbd817da1
> --- /dev/null
> +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> @@ -0,0 +1,979 @@
> +/** @file
> + DXE driver to expose the 'kernel', 'initrd' and 'cmdline' blobs
> + provided by QEMU as file in an abstract file system
(1) s/file/files/
[...]
> diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
> new file mode 100644
> index 000000000000..f4b50c265027
> --- /dev/null
> +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
> @@ -0,0 +1,48 @@
> +## @file
> +# DXE driver to expose the 'kernel', 'initrd' and 'cmdline' blobs
> +# provided by QEMU as file in an abstract file system
(2) same as (1)
> +#
> +# 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
> + UefiBootServicesTableLib
> + QemuFwCfgLib
(3) slight disorder
> + UefiDriverEntryPoint
> + UefiRuntimeServicesTableLib
> +
> +[Guids]
> + gEfiFileInfoGuid
> + gEfiFileSystemInfoGuid
> + gEfiFileSystemVolumeLabelInfoIdGuid
> + gQemuKernelLoaderFsMediaGuid
> +
> +[Protocols]
> + gEfiDevicePathProtocolGuid ## PRODUCES
> + gEfiSimpleFileSystemProtocolGuid ## PRODUCES
> +
> +[Depex]
> + gEfiRealTimeClockArchProtocolGuid
>
Good point about the depex; per PI vol 2, 12.6 Real Time Clock
Architectural Protocol, we need this for gRT->GetTime(). The previous
implementation can tage GetTime for granted, because it is linked into
BdsDxe, which ensures that all the architectural protocols have been
installed.
(4) Can you please add a short note about this (the depex) in the commit
message?
With (1) to (4) addressed:
Reviewed-by: Laszlo Ersek <lersek at redhat.com>
Thanks!
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#55197): https://edk2.groups.io/g/devel/message/55197
Mute This Topic: https://groups.io/mt/71669014/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list