From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.16965.1644198426130629108 for ; Sun, 06 Feb 2022 17:47:06 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 07 Feb 2022 09:47:03 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Matt DeVillier'" References: <9dd14fc91c174eae87fd122c7ac70073a363527f.1643662841.git.sean@starlabs.systems> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDQzLzQzXSBNZGVNb2R1bGVQa2cvQm1Cb290OiBza2lwIHNlY29uZGFyeSBlTU1DIGVudHJpZXM=?= Date: Mon, 7 Feb 2022 09:47:05 +0800 Message-ID: <004f01d81bc4$9c7876b0$d5696410$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFc9nw/YcFCJO8DXWUlod4686nwYgGMCQdirXE7HaA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Is this the generic logic for all eMMC device? If yes, can you point the statement in public spec for eMMC entries? Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io = =B4=FA=B1=ED Sean Rhodes > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA2=D4=C21=C8=D5 5:01 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Sean Rhodes ; Matt DeVillier > > =D6=F7=CC=E2: [edk2-devel] [PATCH 43/43] MdeModulePkg/BmBoot: skip = secondary > eMMC entries >=20 > Internal eMMC devices often show multiple entries, so skip > any after the initial entry. >=20 > Signed-off-by: Matt DeVillier > Signed-off-by: Sean Rhodes > --- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > 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; >=20 > UINTN Removable; >=20 > UINTN Index; >=20 > + UINTN EmmcCount; >=20 > CHAR16 *Description; >=20 >=20 >=20 > ASSERT (BootOptionCount !=3D NULL); >=20 >=20 >=20 > *BootOptionCount =3D 0; >=20 > BootOptions =3D NULL; >=20 > + EmmcCount =3D 0; >=20 >=20 >=20 > // >=20 > // Parse removable block io followed by fixed block io >=20 > @@ -2219,6 +2221,16 @@ BmEnumerateBootOptions ( > } >=20 >=20 >=20 > Description =3D BmGetBootDescription (Handles[Index]); >=20 > + // >=20 > + // Skip secondary entries for internal eMMC devices >=20 > + // >=20 > + if (StrCmp(Description, L"eMMC Device") =3D=3D 0) { >=20 > + EmmcCount++; >=20 > + if (EmmcCount > 1) { >=20 > + continue; >=20 > + } >=20 > + } >=20 > + >=20 > BootOptions =3D ReallocatePool ( >=20 > sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * > (*BootOptionCount), >=20 > sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * > (*BootOptionCount + 1), >=20 > -- > 2.32.0 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > 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+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=3D-=3D-=3D-=3D-=3D-=3D >=20