Is this the generic logic for all eMMC device? If yes, can you point the statement in public spec for eMMC entries?
Thanks Liming > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sean Rhodes > 发送时间: 2022年2月1日 5:01 > 收件人: devel@edk2.groups.io > 抄送: Sean Rhodes <sean@starlabs.systems>; Matt DeVillier > <matt.devill...@gmail.com> > 主题: [edk2-devel] [PATCH 43/43] 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.devill...@gmail.com> > Signed-off-by: Sean Rhodes <sean@starlabs.systems> > --- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > index 962892d38f..e21ac2c510 100644 > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > @@ -2175,12 +2175,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 > > @@ -2219,6 +2221,16 @@ 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), > > -- > 2.32.0 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#86264): https://edk2.groups.io/g/devel/message/86264 > Mute This Topic: https://groups.io/mt/88818205/4905953 > Group Owner: devel+ow...@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaolim...@byosoft.com.cn] > -=-=-=-=-=-= > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86401): https://edk2.groups.io/g/devel/message/86401 Mute This Topic: https://groups.io/mt/88963038/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-