public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch 0/2] Fix Emulator ASSERT issue when re-enter setup
@ 2019-04-23  7:00 Dandan Bi
  2019-04-23  7:00 ` [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Dandan Bi
  2019-04-23  7:00 ` [patch 2/2] MdeModulePkg/FileExplorer: " Dandan Bi
  0 siblings, 2 replies; 5+ messages in thread
From: Dandan Bi @ 2019-04-23  7:00 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Eric Dong, Hao Wu, Ruiyu Ni

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

Currently Emulator meets ASSERT when enter setup->Continue->enter setup.
When re-enter setup, in the Constructor functions of some Libs linked
by UiApp, the handle is not NULL which cause InstallMultipleProtocolInterfaces
failure then ASSERT. So here set handle to NULL after uninstalling
protocols on it in Libs Destructor function to avoid this issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Dandan Bi (2):
  MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol
  MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol

 .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c      | 3 ++-
 MdeModulePkg/Library/FileExplorerLib/FileExplorer.c            | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.18.0.windows.1


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

* [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol
  2019-04-23  7:00 [patch 0/2] Fix Emulator ASSERT issue when re-enter setup Dandan Bi
@ 2019-04-23  7:00 ` Dandan Bi
  2019-04-25  1:55   ` [edk2-devel] " Dong, Eric
  2019-04-23  7:00 ` [patch 2/2] MdeModulePkg/FileExplorer: " Dandan Bi
  1 sibling, 1 reply; 5+ messages in thread
From: Dandan Bi @ 2019-04-23  7:00 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Eric Dong, Hao Wu, Ruiyu Ni

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

Currently Emulator meets ASSERT when enter setup->Continue->enter setup.
When re-enter setup, the BmmDriverHandle in BMMUiLib Constructor
is not NULL which cause InstallMultipleProtocolInterfaces failure,
then ASSERT. So here set BmmDriverHandle to NULL after uninstalling
protocols on it in Destructor function to avoid this issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
index 2167d3a5e8..28592f9f47 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
@@ -1,9 +1,9 @@
 /** @file
 The functions for Boot Maintainence Main menu.
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "BootMaintenanceManager.h"
@@ -1761,9 +1761,10 @@ BootMaintenanceManagerUiLibDestructor (
          &mBmmCallbackInfo->BmmConfigAccess,
          NULL
          );
 
   FreePool (mBmmCallbackInfo->LoadContext);
+  mBmmCallbackInfo->BmmDriverHandle = NULL;
 
   return EFI_SUCCESS;
 }
 
-- 
2.18.0.windows.1


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

* [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol
  2019-04-23  7:00 [patch 0/2] Fix Emulator ASSERT issue when re-enter setup Dandan Bi
  2019-04-23  7:00 ` [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Dandan Bi
@ 2019-04-23  7:00 ` Dandan Bi
  2019-04-25  1:55   ` Dong, Eric
  1 sibling, 1 reply; 5+ messages in thread
From: Dandan Bi @ 2019-04-23  7:00 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Eric Dong, Hao Wu, Ruiyu Ni

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

Currently Emulator meets ASSERT when enter setup->Continue->enter setup.
When re-enter setup, the FeDriverHandle in FileExplorerLib Constructor
is not NULL which cause InstallMultipleProtocolInterfaces failure,
then ASSERT. So here set FeDriverHandle to NULL after uninstalling
protocols on it in the Destructor function to avoid this issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
index 27f12fcbf9..58e4910259 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
@@ -1,9 +1,9 @@
 /** @file
 File explorer related functions.
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 
@@ -1641,10 +1641,11 @@ FileExplorerLibDestructor (
                     NULL
                     );
     ASSERT_EFI_ERROR (Status);
 
     HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
+    gFileExplorerPrivate.FeDriverHandle = NULL;
   }
 
   FreePool (gHiiVendorDevicePath);
 
   return EFI_SUCCESS;
-- 
2.18.0.windows.1


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

* Re: [edk2-devel] [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol
  2019-04-23  7:00 ` [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Dandan Bi
@ 2019-04-25  1:55   ` Dong, Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Dong, Eric @ 2019-04-25  1:55 UTC (permalink / raw)
  To: devel@edk2.groups.io, Bi, Dandan; +Cc: Gao, Liming, Wu, Hao A, Ni, Ray

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Dandan Bi
> Sent: Tuesday, April 23, 2019 3:01 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to
> NULL after uninstall protocol
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728
> 
> Currently Emulator meets ASSERT when enter setup->Continue->enter
> setup.
> When re-enter setup, the BmmDriverHandle in BMMUiLib Constructor is not
> NULL which cause InstallMultipleProtocolInterfaces failure, then ASSERT. So
> here set BmmDriverHandle to NULL after uninstalling protocols on it in
> Destructor function to avoid this issue.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c      | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> index 2167d3a5e8..28592f9f47 100644
> ---
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> +++
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> @@ -1,9 +1,9 @@
>  /** @file
>  The functions for Boot Maintainence Main menu.
> 
> -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
>  #include "BootMaintenanceManager.h"
> @@ -1761,9 +1761,10 @@ BootMaintenanceManagerUiLibDestructor (
>           &mBmmCallbackInfo->BmmConfigAccess,
>           NULL
>           );
> 
>    FreePool (mBmmCallbackInfo->LoadContext);
> +  mBmmCallbackInfo->BmmDriverHandle = NULL;
> 
>    return EFI_SUCCESS;
>  }
> 
> --
> 2.18.0.windows.1
> 
> 
> 


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

* Re: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol
  2019-04-23  7:00 ` [patch 2/2] MdeModulePkg/FileExplorer: " Dandan Bi
@ 2019-04-25  1:55   ` Dong, Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Dong, Eric @ 2019-04-25  1:55 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Gao, Liming, Wu, Hao A, Ni, Ray

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Tuesday, April 23, 2019 3:01 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>;
> Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after
> uninstall protocol
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728
> 
> Currently Emulator meets ASSERT when enter setup->Continue->enter
> setup.
> When re-enter setup, the FeDriverHandle in FileExplorerLib Constructor is
> not NULL which cause InstallMultipleProtocolInterfaces failure, then ASSERT.
> So here set FeDriverHandle to NULL after uninstalling protocols on it in the
> Destructor function to avoid this issue.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
> b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
> index 27f12fcbf9..58e4910259 100644
> --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
> +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
> @@ -1,9 +1,9 @@
>  /** @file
>  File explorer related functions.
> 
> -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
> 
> @@ -1641,10 +1641,11 @@ FileExplorerLibDestructor (
>                      NULL
>                      );
>      ASSERT_EFI_ERROR (Status);
> 
>      HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
> +    gFileExplorerPrivate.FeDriverHandle = NULL;
>    }
> 
>    FreePool (gHiiVendorDevicePath);
> 
>    return EFI_SUCCESS;
> --
> 2.18.0.windows.1


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

end of thread, other threads:[~2019-04-25  1:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-23  7:00 [patch 0/2] Fix Emulator ASSERT issue when re-enter setup Dandan Bi
2019-04-23  7:00 ` [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Dandan Bi
2019-04-25  1:55   ` [edk2-devel] " Dong, Eric
2019-04-23  7:00 ` [patch 2/2] MdeModulePkg/FileExplorer: " Dandan Bi
2019-04-25  1:55   ` Dong, Eric

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