public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
@ 2021-02-19  9:39 Li, Walon
  2021-02-19 16:49 ` Laszlo Ersek
  2021-02-22  9:29 ` Wang, Sunny (HPS SW)
  0 siblings, 2 replies; 5+ messages in thread
From: Li, Walon @ 2021-02-19  9:39 UTC (permalink / raw)
  To: devel; +Cc: walon.li, sunnywang, lersek, ray.ni, hao.a.wu, gaoliming

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135

When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu
will create one into list. However, it should be put at the "end" of
BootOrder instead of "start" of BootOrder. Replace 0 by -1 to adjust
order of load options.

Signed-off-by: Walon Li <walon.li@hpe.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index aff620ad52..6cc34d29c0 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -3,7 +3,7 @@
 
 Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
 Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu (
     EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
     );
 
-  return EfiBootManagerAddLoadOptionVariable (BootOption, 0);
+  return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1);
 }
 
 /**
-- 
2.23.0.windows.1


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

* Re: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
  2021-02-19  9:39 [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Li, Walon
@ 2021-02-19 16:49 ` Laszlo Ersek
  2021-02-22  9:29 ` Wang, Sunny (HPS SW)
  1 sibling, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2021-02-19 16:49 UTC (permalink / raw)
  To: Walon Li, devel; +Cc: sunnywang, ray.ni, hao.a.wu, gaoliming

On 02/19/21 10:39, Walon Li wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135
> 
> When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu
> will create one into list. However, it should be put at the "end" of
> BootOrder instead of "start" of BootOrder. Replace 0 by -1 to adjust
> order of load options.
> 
> Signed-off-by: Walon Li <walon.li@hpe.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index aff620ad52..6cc34d29c0 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -3,7 +3,7 @@
>  
>  Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
>  Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.<BR>
> -(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
> +(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
>  
>  **/
> @@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu (
>      EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
>      );
>  
> -  return EfiBootManagerAddLoadOptionVariable (BootOption, 0);
> +  return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1);
>  }
>  
>  /**
> 

Acked-by: Laszlo Ersek <lersek@redhat.com>


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

* Re: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
  2021-02-19  9:39 [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Li, Walon
  2021-02-19 16:49 ` Laszlo Ersek
@ 2021-02-22  9:29 ` Wang, Sunny (HPS SW)
  2021-02-22 10:00   ` 回复: [edk2-devel] " gaoliming
       [not found]   ` <1666098D782F198A.19946@groups.io>
  1 sibling, 2 replies; 5+ messages in thread
From: Wang, Sunny (HPS SW) @ 2021-02-22  9:29 UTC (permalink / raw)
  To: Li, Walon, devel@edk2.groups.io
  Cc: lersek@redhat.com, ray.ni@intel.com, hao.a.wu@intel.com,
	gaoliming@byosoft.com.cn, Wang, Sunny (HPS SW)

Yeah, the problem is that always adding the Boot Menu to the top of BootOrder causes confusion to the users who manipulate the Boot Order under OS. Also, we can't find any reason why the Boot Menu needs to be always added to the top of the Boot Order even if we check the change history and emails. 
 
Reviewed-by: Sunny Wang <sunnywang@hpe.com>


-----Original Message-----
From: Li, Walon <walon.li@hpe.com> 
Sent: Friday, February 19, 2021 5:40 PM
To: devel@edk2.groups.io
Cc: Li, Walon <walon.li@hpe.com>; Wang, Sunny (HPS SW) <sunnywang@hpe.com>; lersek@redhat.com; ray.ni@intel.com; hao.a.wu@intel.com; gaoliming@byosoft.com.cn
Subject: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135

When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu will create one into list. However, it should be put at the "end" of BootOrder instead of "start" of BootOrder. Replace 0 by -1 to adjust order of load options.

Signed-off-by: Walon Li <walon.li@hpe.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index aff620ad52..6cc34d29c0 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -3,7 +3,7 @@
  Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.<BR>-(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>+(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP<BR> SPDX-License-Identifier: BSD-2-Clause-Patent  **/@@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu (
     EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);     ); -  return EfiBootManagerAddLoadOptionVariable (BootOption, 0);+  return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1); }  /**-- 
2.23.0.windows.1


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

* 回复: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
  2021-02-22  9:29 ` Wang, Sunny (HPS SW)
@ 2021-02-22 10:00   ` gaoliming
       [not found]   ` <1666098D782F198A.19946@groups.io>
  1 sibling, 0 replies; 5+ messages in thread
From: gaoliming @ 2021-02-22 10:00 UTC (permalink / raw)
  To: devel, sunnywang, 'Li, Walon'; +Cc: lersek, ray.ni, hao.a.wu

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: bounce+27952+71931+4905953+8761045@groups.io
> <bounce+27952+71931+4905953+8761045@groups.io> 代表 Wang, Sunny
> (HPS SW)
> 发送时间: 2021年2月22日 17:30
> 收件人: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
> 抄送: lersek@redhat.com; ray.ni@intel.com; hao.a.wu@intel.com;
> gaoliming@byosoft.com.cn; Wang, Sunny (HPS SW) <sunnywang@hpe.com>
> 主题: Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put
> BootMenu at the end of BootOrder
> 
> Yeah, the problem is that always adding the Boot Menu to the top of
> BootOrder causes confusion to the users who manipulate the Boot Order
> under OS. Also, we can't find any reason why the Boot Menu needs to be
> always added to the top of the Boot Order even if we check the change
> history and emails.
> 
> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
> 
> 
> -----Original Message-----
> From: Li, Walon <walon.li@hpe.com>
> Sent: Friday, February 19, 2021 5:40 PM
> To: devel@edk2.groups.io
> Cc: Li, Walon <walon.li@hpe.com>; Wang, Sunny (HPS SW)
> <sunnywang@hpe.com>; lersek@redhat.com; ray.ni@intel.com;
> hao.a.wu@intel.com; gaoliming@byosoft.com.cn
> Subject: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at
> the end of BootOrder
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135
> 
> When Boot Menu does not exist in the BootOrder,
> BmRegisterBootManagerMenu will create one into list. However, it should be
> put at the "end" of BootOrder instead of "start" of BootOrder. Replace 0
by -1
> to adjust order of load options.
> 
> Signed-off-by: Walon Li <walon.li@hpe.com>
> ---
>  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> index aff620ad52..6cc34d29c0 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> @@ -3,7 +3,7 @@
>   Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright
(c)
> 2011 - 2020, Intel Corporation. All rights reserved.<BR>-(C) Copyright
> 2015-2016 Hewlett Packard Enterprise Development LP<BR>+(C) Copyright
> 2015-2021 Hewlett Packard Enterprise Development LP<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent  **/@@ -2505,7 +2505,7 @@
> BmRegisterBootManagerMenu (
>      EfiBootManagerFreeLoadOptions (BootOptions,
> BootOptionCount);     ); -  return EfiBootManagerAddLoadOptionVariable
> (BootOption, 0);+  return EfiBootManagerAddLoadOptionVariable
> (BootOption, (UINTN) -1); }  /**--
> 2.23.0.windows.1
> 
> 
> 
> 
> 




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

* 回复: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
       [not found]   ` <1666098D782F198A.19946@groups.io>
@ 2021-02-26  5:17     ` gaoliming
  0 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2021-02-26  5:17 UTC (permalink / raw)
  To: devel, gaoliming, sunnywang, 'Li, Walon'; +Cc: lersek, ray.ni, hao.a.wu

Merge @ 7f34681c488aee2563eaa2afcc6a2c8aa7c5b912

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+71937+4905953+8761045@groups.io
> <bounce+27952+71937+4905953+8761045@groups.io> 代表 gaoliming
> 发送时间: 2021年2月22日 18:00
> 收件人: devel@edk2.groups.io; sunnywang@hpe.com; 'Li, Walon'
> <walon.li@hpe.com>
> 抄送: lersek@redhat.com; ray.ni@intel.com; hao.a.wu@intel.com
> 主题: 回复: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib:
> Put BootMenu at the end of BootOrder
> 
> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> 
> > -----邮件原件-----
> > 发件人: bounce+27952+71931+4905953+8761045@groups.io
> > <bounce+27952+71931+4905953+8761045@groups.io> 代表 Wang,
> Sunny
> > (HPS SW)
> > 发送时间: 2021年2月22日 17:30
> > 收件人: Li, Walon <walon.li@hpe.com>; devel@edk2.groups.io
> > 抄送: lersek@redhat.com; ray.ni@intel.com; hao.a.wu@intel.com;
> > gaoliming@byosoft.com.cn; Wang, Sunny (HPS SW) <sunnywang@hpe.com>
> > 主题: Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib:
> Put
> > BootMenu at the end of BootOrder
> >
> > Yeah, the problem is that always adding the Boot Menu to the top of
> > BootOrder causes confusion to the users who manipulate the Boot Order
> > under OS. Also, we can't find any reason why the Boot Menu needs to be
> > always added to the top of the Boot Order even if we check the change
> > history and emails.
> >
> > Reviewed-by: Sunny Wang <sunnywang@hpe.com>
> >
> >
> > -----Original Message-----
> > From: Li, Walon <walon.li@hpe.com>
> > Sent: Friday, February 19, 2021 5:40 PM
> > To: devel@edk2.groups.io
> > Cc: Li, Walon <walon.li@hpe.com>; Wang, Sunny (HPS SW)
> > <sunnywang@hpe.com>; lersek@redhat.com; ray.ni@intel.com;
> > hao.a.wu@intel.com; gaoliming@byosoft.com.cn
> > Subject: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at
> > the end of BootOrder
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135
> >
> > When Boot Menu does not exist in the BootOrder,
> > BmRegisterBootManagerMenu will create one into list. However, it should
> be
> > put at the "end" of BootOrder instead of "start" of BootOrder. Replace 0
> by -1
> > to adjust order of load options.
> >
> > Signed-off-by: Walon Li <walon.li@hpe.com>
> > ---
> >  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > index aff620ad52..6cc34d29c0 100644
> > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > @@ -3,7 +3,7 @@
> >   Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright
> (c)
> > 2011 - 2020, Intel Corporation. All rights reserved.<BR>-(C) Copyright
> > 2015-2016 Hewlett Packard Enterprise Development LP<BR>+(C) Copyright
> > 2015-2021 Hewlett Packard Enterprise Development LP<BR>
> > SPDX-License-Identifier: BSD-2-Clause-Patent  **/@@ -2505,7 +2505,7
> @@
> > BmRegisterBootManagerMenu (
> >      EfiBootManagerFreeLoadOptions (BootOptions,
> > BootOptionCount);     ); -  return
> EfiBootManagerAddLoadOptionVariable
> > (BootOption, 0);+  return EfiBootManagerAddLoadOptionVariable
> > (BootOption, (UINTN) -1); }  /**--
> > 2.23.0.windows.1
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 
> 
> 




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

end of thread, other threads:[~2021-02-26  5:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19  9:39 [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Li, Walon
2021-02-19 16:49 ` Laszlo Ersek
2021-02-22  9:29 ` Wang, Sunny (HPS SW)
2021-02-22 10:00   ` 回复: [edk2-devel] " gaoliming
     [not found]   ` <1666098D782F198A.19946@groups.io>
2021-02-26  5:17     ` gaoliming

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