From nobody Mon May 13 18:14:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+86185+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+86185+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1643413485; cv=none; d=zohomail.com; s=zohoarc; b=AMT9nqAD/E0Yr65kCeDZUbjRPSAuzARPN2MLZGPK9U7reQW9VYYXiyFzniysGRo5wNCmS4GC0SdVnmpl2JqaE2n2JVgDb2Z80UIb8OFP58JsrAf9+8OyEl0yFDF8+r6srMMIbcnUF1UySfpe8dRJLTU72ub89BJitzVTozsXR4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643413485; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=8+I2OrrEGUt1WZ/QvdOrnm8KIJOxTeLo4+ynJsWGH5w=; b=cPSBydYyMlJ7w3h2CPXLe+2Tx2yTkoMlnpyUtERGlB7MUO1XOgEijQorSjkwu4Cm2t4UZ6ldrzlcBZx3d17/rLzW925KE1RCBEH89LolGsnNA2HyxmZEXKY9h+WhAJ9vq/nigqncekP4R6B/f75UIqOoAjA1Z/66Q5n/JDLeOPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+86185+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1643413485123256.21099442322964; Fri, 28 Jan 2022 15:44:45 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id UCctYY1788612xU9BAK9wA7f; Fri, 28 Jan 2022 15:44:44 -0800 X-Received: from smarthost01b.ixn.mail.zen.net.uk (smarthost01b.ixn.mail.zen.net.uk [212.23.1.21]) by mx.groups.io with SMTP id smtpd.web08.4.1643405740648692528 for ; Fri, 28 Jan 2022 13:35:41 -0800 X-Received: from [217.155.46.38] (helo=sean-StarBook.lan) by smarthost01b.ixn.mail.zen.net.uk with esmtp (Exim 4.90_1) (envelope-from ) id 1nDYuB-0006kh-11; Fri, 28 Jan 2022 21:35:39 +0000 From: "Sean Rhodes" To: devel@edk2.groups.io Cc: Matt DeVillier Subject: [edk2-devel] [PATCH] MdeModulePkg/BmBoot: skip secondary eMMC entries Date: Fri, 28 Jan 2022 21:35:36 +0000 Message-Id: MIME-Version: 1.0 X-Originating-smarthost01b-IP: [217.155.46.38] Feedback-ID: 217.155.46.38 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sean@starlabs.systems X-Gm-Message-State: Pe4s3WKDAVEbyGvDvC5ov9WEx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1643413484; bh=UzJYIFS+XdCIU2CYwregnhvbaa+nRKcD3nhUpesm8UM=; h=Cc:Date:From:Reply-To:Subject:To; b=S3XnPg245pRY+MhNEpvYwKgS1dzTA7p4NYWU7GvxzstHoEYKUQAemlVAQGrV6OSLl8/ 4vmVEewBe1UlYK43wAKP75k+Ic0WR+hIQnJ/4cBnn2hzd/V4L12053MhUyf4+Pojxi1fS p/BN1X5tgArxXMq61XpYTVBfmrtJIPO0nQw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1643413487174100005 Content-Type: text/plain; charset="utf-8" From: Matt DeVillier Internal eMMC devices often show multiple entries, so skip any after the initial entry. Signed-off-by: Matt DeVillier --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index 962892d38f..f7da5bcdfc 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; =20 ASSERT (BootOptionCount !=3D NULL); =20 *BootOptionCount =3D 0; BootOptions =3D NULL; + EmmcCount =3D 0; =20 // // Parse removable block io followed by fixed block io @@ -2219,6 +2221,17 @@ BmEnumerateBootOptions ( } =20 Description =3D BmGetBootDescription (Handles[Index]); + + // + // Skip secondary entries for internal eMMC devices + // + if (StrCmp(Description, L"eMMC Device") =3D=3D 0) { + EmmcCount++; + if (EmmcCount > 1) { + continue; + } + } + BootOptions =3D ReallocatePool ( sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOption= Count), sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOption= Count + 1), --=20 2.32.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86185): https://edk2.groups.io/g/devel/message/86185 Mute This Topic: https://groups.io/mt/88757871/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-