Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 02021d2ea4f64be3f29d4a0d9707a60889f3f71b
https://github.com/tianocore/edk2/commit/02021d2ea4f64be3f29d4a0d9707a60889f3f71b
Author: Gary Lin <[email protected]>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
Log Message:
-----------
MdeModulePkg/UefiBootManagerLib: Match the nested partitions
In some cases, such as MD RAID1 in Linux, the bootloader may be in a
nested EFI system partition partition. For example, sda1 and sdb1 are
combined as md0 and the first partition of md0, md0p1, is an EFI system
partition. Then, the bootloader can be located by the following device
paths:
PCI()/SATA(sda)/Partition(sda1)/Partition(md0p1)/File(bootloader.efi)
PCI()/SATA(sdb)/Partition(sdb1)/Partition(md0p1)/File(bootloader.efi)
To make the boot option more resilient, we may create a boot option with
the short-form device path like "Partition(md0p1)/File(bootloader.efi)".
However, BmMatchPartitionDevicePathNode() only matched the first
partition node and ignored the nested partitions, so the firmware would
refuse to load bootloader.efi since "Partition(md0p1)" doesn't match
either "Partition(sda1)" or "Partition(sda2)".
This commit modifies BmMatchPartitionDevicePathNode() to iterate all
nested partitions so that the above boot option could work.
v2 - Simplify the node matching logic
Cc: Ruiyu Ni <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: Jian J Wang <[email protected]>
Cc: Hao Wu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Gary Lin <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits