public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <sean@starlabs.systems>
Cc: "'Matt DeVillier'" <matt.devillier@gmail.com>
Subject: 回复: [edk2-devel] [PATCH 43/43] MdeModulePkg/BmBoot: skip secondary eMMC entries
Date: Mon, 7 Feb 2022 09:47:05 +0800	[thread overview]
Message-ID: <004f01d81bc4$9c7876b0$d5696410$@byosoft.com.cn> (raw)
In-Reply-To: <d379831c0a96c87795cba419c09e639db145a307.1643662841.git.sean@starlabs.systems>

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.devillier@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.devillier@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+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
> 




  reply	other threads:[~2022-02-07  1:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9dd14fc91c174eae87fd122c7ac70073a363527f.1643662841.git.sean@starlabs.systems>
2022-01-31 21:00 ` [PATCH 43/43] MdeModulePkg/BmBoot: skip secondary eMMC entries Sean Rhodes
2022-02-07  1:47   ` gaoliming [this message]
2022-02-10 21:35     ` [edk2-devel] 回复: [edk2-devel] " Sean Rhodes
2022-03-21  9:41       ` Sean Rhodes
2022-04-01  2:08         ` 回复: " gaoliming
2022-04-01  2:18           ` Ni, Ray
2022-05-17 12:19         ` Sheng Lean Tan
2022-05-17 13:58           ` Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004f01d81bc4$9c7876b0$d5696410$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox