]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: implement QEMU loader library for X86 with legacy fallback
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 29 Feb 2020 00:28:45 +0000 (01:28 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 5 Mar 2020 19:45:05 +0000 (19:45 +0000)
commit7c47d89003a6f8f7f6f0ce8ca7d3e87c630d14cc
treed0a8ec1fa3486d5e6e057b31ef9c7da15e0a84e0
parent1dc875a7d5564c754fa1ddb33ac454325abb923d
OvmfPkg: implement QEMU loader library for X86 with legacy fallback

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>
OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c [new file with mode: 0644]
OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.inf [new file with mode: 0644]