MdeModulePkg/BmBoot: skip secondary eMMC entries
Internal eMMC devices often show multiple entries, so skip any after the initial entry. Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
committed by
Tim Crawford
parent
530cc53f96
commit
a363907bc9
@ -2116,12 +2116,14 @@ BmEnumerateBootOptions (
|
||||
EFI_BLOCK_IO_PROTOCOL *BlkIo;
|
||||
UINTN Removable;
|
||||
UINTN Index;
|
||||
UINTN EmmcCount;
|
||||
CHAR16 *Description;
|
||||
|
||||
ASSERT (BootOptionCount != NULL);
|
||||
|
||||
*BootOptionCount = 0;
|
||||
BootOptions = NULL;
|
||||
EmmcCount = 0;
|
||||
|
||||
//
|
||||
// Parse removable block io followed by fixed block io
|
||||
@ -2160,6 +2162,17 @@ BmEnumerateBootOptions (
|
||||
}
|
||||
|
||||
Description = BmGetBootDescription (Handles[Index]);
|
||||
|
||||
//
|
||||
// Skip secondary entries for internal eMMC devices
|
||||
//
|
||||
if (StrCmp(Description, L"eMMC Device") == 0) {
|
||||
EmmcCount++;
|
||||
if (EmmcCount > 1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
BootOptions = ReallocatePool (
|
||||
sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOptionCount),
|
||||
sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOptionCount + 1),
|
||||
|
Reference in New Issue
Block a user