diff options
author | Gary Lin <glin@suse.com> | 2019-01-23 12:40:04 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2019-01-31 12:25:36 +0800 |
commit | 02021d2ea4f64be3f29d4a0d9707a60889f3f71b (patch) | |
tree | 1ccf0d5659c6af310eb8c86de5d5f17258e8676d /MdePkg/Include/Uefi | |
parent | a824c7ebde0a431413329049252b8c1d3770de82 (diff) | |
download | edk2-02021d2ea4f64be3f29d4a0d9707a60889f3f71b.zip edk2-02021d2ea4f64be3f29d4a0d9707a60889f3f71b.tar.gz edk2-02021d2ea4f64be3f29d4a0d9707a60889f3f71b.tar.bz2 |
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 <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdePkg/Include/Uefi')
0 files changed, 0 insertions, 0 deletions