On 03/02/20 18:12, Laszlo Ersek wrote: > On 03/02/20 08:29, Ard Biesheuvel wrote: >> Implement QemuLoadImageLib, and make it load the image provided by the >> QEMU_EFI_LOADER_FS_MEDIA_GUID/kernel device path that we implemented >> in a preceding patch in a separate DXE driver, using only the standard >> LoadImage and StartImage boot services. >> >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2566 >> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> >> --- >> OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 253 >> ++++++++++++++++++++ >> OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf | 39 >> +++ >> 2 files changed, 292 insertions(+) >> >> diff --git >> a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c >> b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c >> new file mode 100644 >> index 000000000000..c48c7a88dd91 >> --- /dev/null >> +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c >> @@ -0,0 +1,253 @@ >> +/** @file >> + Generic implementation of QemuLoadImageLib library class interface. >> + >> + Copyright (c) 2020, ARM Ltd. All rights reserved.<BR> >> + >> + SPDX-License-Identifier: BSD-2-Clause-Patent >> +**/ >> + >> +#include <Uefi.h> >> + >> +#include <Guid/QemuKernelLoaderFsMedia.h> >> +#include <Library/DebugLib.h> >> +#include <Library/MemoryAllocationLib.h> >> +#include <Library/PrintLib.h> >> +#include <Library/QemuFwCfgLib.h> > > (1) I think it would be nicer if, in this patch, we didn't access fw_cfg > at all. The filesystem already exposes "cmdline", we could use that. > > ... Except, I can see you are removing that in patch #7... OK, I guess. > >> +#include <Library/UefiBootServicesTableLib.h> >> +#include <Protocol/DevicePath.h> >> +#include <Protocol/LoadedImage.h>
(10) Sorry, just noticed, from comparing the x86 instance: please include the lib class header here. Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55292): https://edk2.groups.io/g/devel/message/55292 Mute This Topic: https://groups.io/mt/71669017/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-