Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek a0e761b153 OvmfPkg/QemuBootOrderLib: skip already matched / appended UEFI boot opts
The SetBootOrderFromQemu() function implements a nested loop where

- the outer loop iterates over all OpenFirmware (OFW) device paths in the
  QEMU boot order, and translates each to a UEFI device path prefix;

- the inner loop matches the current (translated) prefix against all
  active UEFI boot options in turn;

- if the UEFI boot option is matched by the translated prefix, the UEFI
  boot option is appended to the "new" UEFI boot order, and marked as
  "has been appended".

This patch adds a micro-optimization where already matched / appended UEFI
boot options are skipped in the inner loop. This is not a functional
change. A functional change would be if, as a consequence of the patch,
some UEFI boot options would no longer be *doubly* matched.

For a UEFI boot option to be matched by two translated prefixes, one of
those prefixes would have to be a (proper, or equal) prefix of the other
prefix. The PCI and MMIO OFW translation routines output such only in the
following cases:

- When the original OFW device paths are prefixes of each other. This is
  not possible from the QEMU side. (Only leaf devices are bootable.)

- When the translation rules in the routines are incomplete, and don't
  look at the OFW device paths for sufficient length (i.e., at nodes where
  they would already differ, and the difference would show up in the
  translation output).

  This would be a shortcoming of the translation routines and should be
  fixed in TranslatePciOfwNodes() and TranslateMmioOfwNodes(), whenever
  identified.

Even in the second case, this patch would replace the double appending of
a single UEFI boot option (matched by two different OFW device paths) with
a correct, or cross-, matching of two different UEFI boot options. Again,
this is not expected, but arguably it would be more correct than duplicate
boot option appending, should it occur due to any (unexpected, unknown)
lack of detail in the translation routines.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-11-28 21:36:53 +01:00
AppPkg AppPkg/WebServer: Fix build failure. 2017-09-14 08:55:09 +08:00
ArmPkg ArmPkg: remove BdsLib and remaining ARM BDS related PCDs 2017-11-26 10:58:33 +00:00
ArmPlatformPkg ArmPlatformPkg: remove EblCmdLib implementation 2017-11-26 10:58:32 +00:00
ArmVirtPkg ArmVirtPkg/PrePi: don't export PE/COFF and LZMA libraries via HOBs 2017-11-27 18:22:35 +00:00
BaseTools BaseTools/tools_def AARCH64 ARM: suppres PIE sections via linker script 2017-11-23 10:44:53 +00:00
BeagleBoardPkg ArmPkg: remove BdsLib and remaining ARM BDS related PCDs 2017-11-26 10:58:33 +00:00
Conf
CorebootModulePkg CorebootModulePkg/CbSupportDxe: Remove duplicated IO Space addition 2017-11-16 10:52:00 +08:00
CorebootPayloadPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
CryptoPkg CryptoPkg/IntrinsicLib: Fix the warning on memset 2017-11-24 16:36:29 +08:00
DuetPkg DuetPkg: Fix Xcode 9 Beta treating 32-bit left shift as undefined 2017-08-11 08:44:54 +08:00
EdkCompatibilityPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellBinPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EmbeddedPkg ArmPkg: remove BdsLib and remaining ARM BDS related PCDs 2017-11-26 10:58:33 +00:00
EmulatorPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
FatBinPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
FatPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Fix MSFT C4255 warning 2017-11-14 18:18:36 +08:00
IntelFrameworkPkg IntelFrameworkPkg PeiHobLibFramework: Implement BuildFv3Hob 2017-10-10 20:54:37 +08:00
IntelFsp2Pkg IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name 2017-11-08 20:44:29 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Update Protocol/Guid usage in INF files 2017-10-10 18:10:24 +08:00
IntelFspPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFspWrapperPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelSiliconPkg IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again 2017-11-23 10:43:43 +08:00
MdeModulePkg MdeModulePkg/Core: Merge memory map after filtering paging capability 2017-11-28 09:25:32 +08:00
MdePkg MdePkg: Fix MSFT C4255 warning 2017-11-14 18:18:48 +08:00
NetworkPkg NetworkPkg/HttpDxe: Fix the incorrect SizeofHeaders in HttpTcpReceiveHeader(). 2017-11-24 08:24:26 +08:00
Nt32Pkg Nt32Pkg: Update SecMain consumes PCD to get the init value in temp stack 2017-11-03 17:45:51 +08:00
Omap35xxPkg EmbeddedPkg Omap35xxPkg: remove EBL and associated libraries 2017-11-26 10:58:33 +00:00
OptionRomPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
OvmfPkg OvmfPkg/QemuBootOrderLib: skip already matched / appended UEFI boot opts 2017-11-28 21:36:53 +01:00
PcAtChipsetPkg PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: Replace RTC macros 2017-11-23 11:30:20 +08:00
PerformancePkg PerformancePkg DP: Init CustomCumulativeData.MinDur 2017-08-14 16:55:44 +08:00
QuarkPlatformPkg QuarkPlatformPkg/PlatformBootManagerLib: Update boot mode handling 2017-11-14 16:47:35 -08:00
QuarkSocPkg QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2 2017-08-16 19:42:17 -07:00
SecurityPkg SecurityPkg/SecureBootConfigDxe: Fix deleting signature data issue. 2017-11-27 10:25:21 +08:00
ShellBinPkg ShellBinPkg: AARCH64/ARM Shell binary update. 2017-08-31 15:41:59 +01:00
ShellPkg ShellPkg/dp: Convert from NULL class library to Dynamic Command 2017-11-28 13:22:35 +08:00
SignedCapsulePkg SignedCapsulePkg: Update Guid usage in INF file to match source code logic 2017-10-10 18:10:21 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg: Update SmmDebugAgentLib to restore APIC timer 2017-10-16 11:23:16 +08:00
StdLib StdLib/BsdSocketLib: Remove unused variables 2017-11-13 07:39:06 -08:00
StdLibPrivateInternalFiles edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
UefiCpuPkg UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map 2017-11-24 09:43:10 +08:00
UnixPkg
Vlv2DeviceRefCodePkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Remove reference deprecated macro. 2017-08-07 15:28:13 +08:00
.gitignore edk2: Add .DS_Store to .gitignore for macOS 2017-05-19 15:14:34 -07:00
BuildNotes2.txt
Contributions.txt edk2: Fix typo in Contributions.txt 2017-08-16 17:50:44 +08:00
Edk2Setup.bat Edk2Setup.bat: Fix build errors from VS tools PREFIX ENV missing 2016-11-05 09:10:58 +08:00
License.txt edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Maintainers.txt Add NetworkPkg maintainer as MdeModulePkg/Universal/Network maintainer 2017-11-24 09:31:08 +08:00
Readme.md edk2: Add Readme.md to root of edk2 repository 2017-08-03 11:02:25 -07:00
edksetup.bat BaseTools: suppress usage instructions with rebuild options 2017-07-04 10:16:13 +08:00
edksetup.sh BaseTools/edksetup.sh: fix invalid test for current working directory 2017-08-10 12:54:58 +08:00

Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources