Implement another version of QemuLoadImageLib that uses LoadImage and StartImage, but falls back to the legacy Linux loader code if that fails. The logic in the legacy fallback routines is identical to the current QEMU linux loader for X64 and IA32. Note the use of the OVMF_LOADED_X86_LINUX_KERNEL protocol for the legacy loaded image: this makes it possible to expose the LoadImage/StartImage abstraction for the legacy loader, using the EFI paradigm of identifying a loaded image solely by a handle. 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>
43 lines
1.0 KiB
INI
43 lines
1.0 KiB
INI
## @file
|
|
# X86 specific implementation of QemuLoadImageLib library class interface
|
|
# with support for loading mixed mode images and non-EFI stub images
|
|
#
|
|
# Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 1.27
|
|
BASE_NAME = X86QemuLoadImageLib
|
|
FILE_GUID = 2304df80-e21d-4170-9c3c-113c878f7ac0
|
|
MODULE_TYPE = BASE
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = QemuLoadImageLib|DXE_DRIVER
|
|
|
|
[Sources]
|
|
X86QemuLoadImageLib.c
|
|
|
|
[Packages]
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
DebugLib
|
|
MemoryAllocationLib
|
|
LoadLinuxLib
|
|
PrintLib
|
|
QemuFwCfgLib
|
|
ReportStatusCodeLib
|
|
UefiBootServicesTableLib
|
|
|
|
[Protocols]
|
|
gEfiDevicePathProtocolGuid
|
|
gEfiLoadedImageProtocolGuid
|
|
gOvmfLoadedX86LinuxKernelProtocolGuid
|
|
|
|
[Guids]
|
|
gQemuKernelLoaderFsMediaGuid
|