public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
@ 2016-08-31  8:19 Liming Gao
  2016-09-01  2:02 ` Ni, Ruiyu
  2016-09-01  2:18 ` Wang, Sunny (HPS SW)
  0 siblings, 2 replies; 6+ messages in thread
From: Liming Gao @ 2016-08-31  8:19 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Eric Dong

BootManagerMenuApp boot option is handled by EfiBootManagerGetBootManagerMenu.
Don't need to handle it again when parse LoadFile protocol.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index ecd0ae3..f8a3988 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
   UINTN                                 Removable;
   UINTN                                 Index;
   CHAR16                                *Description;
-  UINT32                                BootAttributes;
 
   ASSERT (BootOptionCount != NULL);
 
@@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
          &Handles
          );
   for (Index = 0; Index < HandleCount; Index++) {
+    //
+    // Ignore BootMenuApp. its boot option will be created by BmRegisterBootManagerMenu().
+    //
+    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) {
+      continue;
+    }
 
     Description = BmGetBootDescription (Handles[Index]);
     BootOptions = ReallocatePool (
@@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
                     );
     ASSERT (BootOptions != NULL);
 
-    //
-    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP and HIDDEN.
-    //
-    BootAttributes = LOAD_OPTION_ACTIVE;
-    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) {
-      BootAttributes = LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
-    }
-
     Status = EfiBootManagerInitializeLoadOption (
                &BootOptions[(*BootOptionCount)++],
                LoadOptionNumberUnassigned,
                LoadOptionTypeBoot,
-               BootAttributes,
+               LOAD_OPTION_ACTIVE,
                Description,
                DevicePathFromHandle (Handles[Index]),
                NULL,
-- 
2.8.0.windows.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
  2016-08-31  8:19 [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile Liming Gao
@ 2016-09-01  2:02 ` Ni, Ruiyu
  2016-09-01  2:12   ` Gao, Liming
  2016-09-01  2:18 ` Wang, Sunny (HPS SW)
  1 sibling, 1 reply; 6+ messages in thread
From: Ni, Ruiyu @ 2016-09-01  2:02 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Dong, Eric

Liming,
Please use the term "BootManagerMenu" instead of "BootMenuApp", to avoid confusion when reading from future developers.

// Ignore BootMenuApp. its boot option will be created by BmRegisterBootManagerMenu().
-->
// Ignore BootManagerMenu, which will be auto-created by EfiBootManagerGetBootManagerMenu().

BmIsBootMenuAppFilePath
-->
BmIsBootManagerMenuFilePath

With the above two changes, 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

> -----Original Message-----
> From: Gao, Liming
> Sent: Wednesday, August 31, 2016 4:19 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [Patch] MdeModulePkg UefiBootManagerLib: Ignore
> BootManagerMenuApp from LoadFile
> 
> BootManagerMenuApp boot option is handled by
> EfiBootManagerGetBootManagerMenu.
> Don't need to handle it again when parse LoadFile protocol.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++-------
> ---
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index ecd0ae3..f8a3988 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
>    UINTN                                 Removable;
>    UINTN                                 Index;
>    CHAR16                                *Description;
> -  UINT32                                BootAttributes;
> 
>    ASSERT (BootOptionCount != NULL);
> 
> @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
>           &Handles
>           );
>    for (Index = 0; Index < HandleCount; Index++) {
> +    //
> +    // Ignore BootMenuApp. its boot option will be created by
> BmRegisterBootManagerMenu().
> +    //
> +    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index])))
> {
> +      continue;
> +    }
> 
>      Description = BmGetBootDescription (Handles[Index]);
>      BootOptions = ReallocatePool (
> @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
>                      );
>      ASSERT (BootOptions != NULL);
> 
> -    //
> -    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP
> and HIDDEN.
> -    //
> -    BootAttributes = LOAD_OPTION_ACTIVE;
> -    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index])))
> {
> -      BootAttributes = LOAD_OPTION_CATEGORY_APP |
> LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
> -    }
> -
>      Status = EfiBootManagerInitializeLoadOption (
>                 &BootOptions[(*BootOptionCount)++],
>                 LoadOptionNumberUnassigned,
>                 LoadOptionTypeBoot,
> -               BootAttributes,
> +               LOAD_OPTION_ACTIVE,
>                 Description,
>                 DevicePathFromHandle (Handles[Index]),
>                 NULL,
> --
> 2.8.0.windows.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
  2016-09-01  2:02 ` Ni, Ruiyu
@ 2016-09-01  2:12   ` Gao, Liming
  0 siblings, 0 replies; 6+ messages in thread
From: Gao, Liming @ 2016-09-01  2:12 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Dong, Eric

Ok. Got your comments. This patch just ignores BootManagerMenu from LoadFile. Next patch will rename BootMenuApp to BootManagerMenu. I will update them. 

Thanks
Liming
> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Thursday, September 01, 2016 10:02 AM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: Dong, Eric <eric.dong@intel.com>
> Subject: RE: [Patch] MdeModulePkg UefiBootManagerLib: Ignore
> BootManagerMenuApp from LoadFile
> 
> Liming,
> Please use the term "BootManagerMenu" instead of "BootMenuApp", to
> avoid confusion when reading from future developers.
> 
> // Ignore BootMenuApp. its boot option will be created by
> BmRegisterBootManagerMenu().
> -->
> // Ignore BootManagerMenu, which will be auto-created by
> EfiBootManagerGetBootManagerMenu().
> 
> BmIsBootMenuAppFilePath
> -->
> BmIsBootManagerMenuFilePath
> 
> With the above two changes,
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> 
> > -----Original Message-----
> > From: Gao, Liming
> > Sent: Wednesday, August 31, 2016 4:19 PM
> > To: edk2-devel@lists.01.org
> > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
> > Subject: [Patch] MdeModulePkg UefiBootManagerLib: Ignore
> > BootManagerMenuApp from LoadFile
> >
> > BootManagerMenuApp boot option is handled by
> > EfiBootManagerGetBootManagerMenu.
> > Don't need to handle it again when parse LoadFile protocol.
> >
> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Liming Gao <liming.gao@intel.com>
> > ---
> >  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++-----
> --
> > ---
> >  1 file changed, 7 insertions(+), 10 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > index ecd0ae3..f8a3988 100644
> > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > @@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
> >    UINTN                                 Removable;
> >    UINTN                                 Index;
> >    CHAR16                                *Description;
> > -  UINT32                                BootAttributes;
> >
> >    ASSERT (BootOptionCount != NULL);
> >
> > @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
> >           &Handles
> >           );
> >    for (Index = 0; Index < HandleCount; Index++) {
> > +    //
> > +    // Ignore BootMenuApp. its boot option will be created by
> > BmRegisterBootManagerMenu().
> > +    //
> > +    if (BmIsBootMenuAppFilePath (DevicePathFromHandle
> (Handles[Index])))
> > {
> > +      continue;
> > +    }
> >
> >      Description = BmGetBootDescription (Handles[Index]);
> >      BootOptions = ReallocatePool (
> > @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
> >                      );
> >      ASSERT (BootOptions != NULL);
> >
> > -    //
> > -    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP
> > and HIDDEN.
> > -    //
> > -    BootAttributes = LOAD_OPTION_ACTIVE;
> > -    if (BmIsBootMenuAppFilePath (DevicePathFromHandle
> (Handles[Index])))
> > {
> > -      BootAttributes = LOAD_OPTION_CATEGORY_APP |
> > LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
> > -    }
> > -
> >      Status = EfiBootManagerInitializeLoadOption (
> >                 &BootOptions[(*BootOptionCount)++],
> >                 LoadOptionNumberUnassigned,
> >                 LoadOptionTypeBoot,
> > -               BootAttributes,
> > +               LOAD_OPTION_ACTIVE,
> >                 Description,
> >                 DevicePathFromHandle (Handles[Index]),
> >                 NULL,
> > --
> > 2.8.0.windows.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
  2016-08-31  8:19 [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile Liming Gao
  2016-09-01  2:02 ` Ni, Ruiyu
@ 2016-09-01  2:18 ` Wang, Sunny (HPS SW)
  2016-09-01  2:20   ` Gao, Liming
  1 sibling, 1 reply; 6+ messages in thread
From: Wang, Sunny (HPS SW) @ 2016-09-01  2:18 UTC (permalink / raw)
  To: Liming Gao, edk2-devel@lists.01.org
  Cc: Ruiyu Ni, Eric Dong, Wang, Sunny (HPS SW)

Hi Liming, 
Except Ray's comment, others Look good to me. 
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

Hi Ray and Eric, 
It looks like this code change is used for replacing the one which we offline discussed to fix the duplicated Boot Manager menu issue, isn't it?  
 - [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Add OptioalData for boot option.

Regards,
Sunny Wang

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
Sent: Wednesday, August 31, 2016 4:19 PM
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>; Eric Dong <eric.dong@intel.com>
Subject: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile

BootManagerMenuApp boot option is handled by EfiBootManagerGetBootManagerMenu.
Don't need to handle it again when parse LoadFile protocol.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index ecd0ae3..f8a3988 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
   UINTN                                 Removable;
   UINTN                                 Index;
   CHAR16                                *Description;
-  UINT32                                BootAttributes;
 
   ASSERT (BootOptionCount != NULL);
 
@@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
          &Handles
          );
   for (Index = 0; Index < HandleCount; Index++) {
+    //
+    // Ignore BootMenuApp. its boot option will be created by BmRegisterBootManagerMenu().
+    //
+    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) {
+      continue;
+    }
 
     Description = BmGetBootDescription (Handles[Index]);
     BootOptions = ReallocatePool (
@@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
                     );
     ASSERT (BootOptions != NULL);
 
-    //
-    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP and HIDDEN.
-    //
-    BootAttributes = LOAD_OPTION_ACTIVE;
-    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) {
-      BootAttributes = LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
-    }
-
     Status = EfiBootManagerInitializeLoadOption (
                &BootOptions[(*BootOptionCount)++],
                LoadOptionNumberUnassigned,
                LoadOptionTypeBoot,
-               BootAttributes,
+               LOAD_OPTION_ACTIVE,
                Description,
                DevicePathFromHandle (Handles[Index]),
                NULL,
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
  2016-09-01  2:18 ` Wang, Sunny (HPS SW)
@ 2016-09-01  2:20   ` Gao, Liming
  2016-09-01  2:22     ` Wang, Sunny (HPS SW)
  0 siblings, 1 reply; 6+ messages in thread
From: Gao, Liming @ 2016-09-01  2:20 UTC (permalink / raw)
  To: Wang, Sunny (HPS SW), edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Dong, Eric

Sunny:
  Yes. This is the replacement of Eric patch. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Wang, Sunny (HPS SW)
> Sent: Thursday, September 01, 2016 10:18 AM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: Re: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore
> BootManagerMenuApp from LoadFile
> 
> Hi Liming,
> Except Ray's comment, others Look good to me.
> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
> 
> Hi Ray and Eric,
> It looks like this code change is used for replacing the one which we offline
> discussed to fix the duplicated Boot Manager menu issue, isn't it?
>  - [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Add OptioalData for
> boot option.
> 
> Regards,
> Sunny Wang
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Wednesday, August 31, 2016 4:19 PM
> To: edk2-devel@lists.01.org
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>; Eric Dong <eric.dong@intel.com>
> Subject: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore
> BootManagerMenuApp from LoadFile
> 
> BootManagerMenuApp boot option is handled by
> EfiBootManagerGetBootManagerMenu.
> Don't need to handle it again when parse LoadFile protocol.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++-------
> ---
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index ecd0ae3..f8a3988 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
>    UINTN                                 Removable;
>    UINTN                                 Index;
>    CHAR16                                *Description;
> -  UINT32                                BootAttributes;
> 
>    ASSERT (BootOptionCount != NULL);
> 
> @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
>           &Handles
>           );
>    for (Index = 0; Index < HandleCount; Index++) {
> +    //
> +    // Ignore BootMenuApp. its boot option will be created by
> BmRegisterBootManagerMenu().
> +    //
> +    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index])))
> {
> +      continue;
> +    }
> 
>      Description = BmGetBootDescription (Handles[Index]);
>      BootOptions = ReallocatePool (
> @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
>                      );
>      ASSERT (BootOptions != NULL);
> 
> -    //
> -    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP
> and HIDDEN.
> -    //
> -    BootAttributes = LOAD_OPTION_ACTIVE;
> -    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index])))
> {
> -      BootAttributes = LOAD_OPTION_CATEGORY_APP |
> LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
> -    }
> -
>      Status = EfiBootManagerInitializeLoadOption (
>                 &BootOptions[(*BootOptionCount)++],
>                 LoadOptionNumberUnassigned,
>                 LoadOptionTypeBoot,
> -               BootAttributes,
> +               LOAD_OPTION_ACTIVE,
>                 Description,
>                 DevicePathFromHandle (Handles[Index]),
>                 NULL,
> --
> 2.8.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
  2016-09-01  2:20   ` Gao, Liming
@ 2016-09-01  2:22     ` Wang, Sunny (HPS SW)
  0 siblings, 0 replies; 6+ messages in thread
From: Wang, Sunny (HPS SW) @ 2016-09-01  2:22 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org
  Cc: Ni, Ruiyu, Dong, Eric, Wang, Sunny (HPS SW)

Got it. Thanks for confirming this and working on the replacement.

Regards,
Sunny Wang

-----Original Message-----
From: Gao, Liming [mailto:liming.gao@intel.com] 
Sent: Thursday, September 01, 2016 10:20 AM
To: Wang, Sunny (HPS SW) <sunnywang@hpe.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: RE: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile
Importance: High

Sunny:
  Yes. This is the replacement of Eric patch. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of 
> Wang, Sunny (HPS SW)
> Sent: Thursday, September 01, 2016 10:18 AM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: Re: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore 
> BootManagerMenuApp from LoadFile
> 
> Hi Liming,
> Except Ray's comment, others Look good to me.
> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
> 
> Hi Ray and Eric,
> It looks like this code change is used for replacing the one which we 
> offline discussed to fix the duplicated Boot Manager menu issue, isn't it?
>  - [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Add OptioalData for 
> boot option.
> 
> Regards,
> Sunny Wang
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of 
> Liming Gao
> Sent: Wednesday, August 31, 2016 4:19 PM
> To: edk2-devel@lists.01.org
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>; Eric Dong <eric.dong@intel.com>
> Subject: [edk2] [Patch] MdeModulePkg UefiBootManagerLib: Ignore 
> BootManagerMenuApp from LoadFile
> 
> BootManagerMenuApp boot option is handled by 
> EfiBootManagerGetBootManagerMenu.
> Don't need to handle it again when parse LoadFile protocol.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++-------
> ---
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index ecd0ae3..f8a3988 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
>    UINTN                                 Removable;
>    UINTN                                 Index;
>    CHAR16                                *Description;
> -  UINT32                                BootAttributes;
> 
>    ASSERT (BootOptionCount != NULL);
> 
> @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
>           &Handles
>           );
>    for (Index = 0; Index < HandleCount; Index++) {
> +    //
> +    // Ignore BootMenuApp. its boot option will be created by
> BmRegisterBootManagerMenu().
> +    //
> +    if (BmIsBootMenuAppFilePath (DevicePathFromHandle 
> + (Handles[Index])))
> {
> +      continue;
> +    }
> 
>      Description = BmGetBootDescription (Handles[Index]);
>      BootOptions = ReallocatePool (
> @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
>                      );
>      ASSERT (BootOptions != NULL);
> 
> -    //
> -    // If LoadFile includes BootMenuApp, its boot attribue will be set to APP
> and HIDDEN.
> -    //
> -    BootAttributes = LOAD_OPTION_ACTIVE;
> -    if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index])))
> {
> -      BootAttributes = LOAD_OPTION_CATEGORY_APP |
> LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
> -    }
> -
>      Status = EfiBootManagerInitializeLoadOption (
>                 &BootOptions[(*BootOptionCount)++],
>                 LoadOptionNumberUnassigned,
>                 LoadOptionTypeBoot,
> -               BootAttributes,
> +               LOAD_OPTION_ACTIVE,
>                 Description,
>                 DevicePathFromHandle (Handles[Index]),
>                 NULL,
> --
> 2.8.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-01  2:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31  8:19 [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile Liming Gao
2016-09-01  2:02 ` Ni, Ruiyu
2016-09-01  2:12   ` Gao, Liming
2016-09-01  2:18 ` Wang, Sunny (HPS SW)
2016-09-01  2:20   ` Gao, Liming
2016-09-01  2:22     ` Wang, Sunny (HPS SW)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox