]> git.proxmox.com Git - mirror_edk2.git/commit - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
ArmVirtPkg/PlatformBootManagerLib: remove stale FvFile boot options
authorLaszlo Ersek <lersek@redhat.com>
Wed, 13 Jul 2016 15:40:15 +0000 (17:40 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 13 Jul 2016 20:44:34 +0000 (22:44 +0200)
commit0e2c6c552990edcd6352c2395860cb0df62b158d
treee7b108983b242e4c548288f83db8ee6ce70a1ed6
parent7ffced92a7b6e5a0eb4433123b3973c635da7355
ArmVirtPkg/PlatformBootManagerLib: remove stale FvFile boot options

(This patch ports OvmfPkg commit 2eb358986052 to ArmVirtPkg. That
functionality was not added to QemuBootOrderLib, because it was (and is)
independent from QEMU and fw_cfg.)

Remove any boot options that point to binaries built into the firmware and
have become stale due to any of the following:
- FvMain's base address or size changed (historical -- see commit
  e191a3114f4c),
- FvMain's FvNameGuid changed,
- the FILE_GUID of the pointed-to binary changed,
- the referenced binary is no longer built into the firmware.

For example, multiple such "EFI Internal Shell" boot options can coexist.
They technically differ from each other, but may not describe any built-in
shell binary exactly. Such options can accumulate in a varstore over time,
and while they remain generally bootable (thanks to the efforts of
BmGetFileBufferByFvFilePath()), they look bad.

Filter out any stale options.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Fixes: https://github.com/tianocore/edk2/issues/107
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf