public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 0/1] MdeModulePkg: Print which PCD was unable to be found
@ 2021-07-14  4:43 Daniel Schaefer
  2021-07-14  4:43 ` [PATCH v2 1/1] " Daniel Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Schaefer @ 2021-07-14  4:43 UTC (permalink / raw)
  To: devel; +Cc: Daniel Schaefer, Jian J Wang, Hao A Wu, Dandan Bi, Liming Gao

Second version because I forgot to update HPE copyright.

Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Daniel Schaefer (1):
  MdeModulePkg: Print which PCD was unable to be found

 MdeModulePkg/Universal/PCD/Dxe/Service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.31.1


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

* [PATCH v2 1/1] MdeModulePkg: Print which PCD was unable to be found
  2021-07-14  4:43 [PATCH v2 0/1] MdeModulePkg: Print which PCD was unable to be found Daniel Schaefer
@ 2021-07-14  4:43 ` Daniel Schaefer
  2021-07-19  5:55   ` [edk2-devel] " Wu, Hao A
  2021-07-21  1:32   ` Wu, Hao A
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Schaefer @ 2021-07-14  4:43 UTC (permalink / raw)
  To: devel; +Cc: Daniel Schaefer, Jian J Wang, Hao A Wu, Dandan Bi, Liming Gao

When reaching the assert, it can't be debugged because the PCD is
unknown. Therefore the PCD's GUID and token number should be printed.

Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 MdeModulePkg/Universal/PCD/Dxe/Service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index ea7edc3cbb1c..badeec8c97f0 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -3,7 +3,7 @@
 
 Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+(C) Copyright 2016-2021 Hewlett Packard Enterprise Development LP<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -1610,6 +1610,7 @@ GetExPcdTokenNumber (
     }
   }
 
+  DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __FUNCTION__, Guid, ExTokenNumber));
   ASSERT (FALSE);
 
   return 0;
-- 
2.31.1


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

* Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Print which PCD was unable to be found
  2021-07-14  4:43 ` [PATCH v2 1/1] " Daniel Schaefer
@ 2021-07-19  5:55   ` Wu, Hao A
  2021-07-21  1:32   ` Wu, Hao A
  1 sibling, 0 replies; 4+ messages in thread
From: Wu, Hao A @ 2021-07-19  5:55 UTC (permalink / raw)
  To: devel@edk2.groups.io, daniel.schaefer@hpe.com
  Cc: Wang, Jian J, Bi, Dandan, Liming Gao

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Daniel
> Schaefer
> Sent: Wednesday, July 14, 2021 12:43 PM
> To: devel@edk2.groups.io
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Print which PCD was
> unable to be found
> 
> When reaching the assert, it can't be debugged because the PCD is unknown.
> Therefore the PCD's GUID and token number should be printed.
> 
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  MdeModulePkg/Universal/PCD/Dxe/Service.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c
> b/MdeModulePkg/Universal/PCD/Dxe/Service.c
> index ea7edc3cbb1c..badeec8c97f0 100644
> --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
> +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
> @@ -3,7 +3,7 @@
> 
>  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
> Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> -(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> +(C) Copyright 2016-2021 Hewlett Packard Enterprise Development LP<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -1610,6 +1610,7 @@ GetExPcdTokenNumber (
>      }
>    }
> 
> +  DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token
> + number: %d\n", __FUNCTION__, Guid, ExTokenNumber));


The change looks good to me.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

I will wait a couple days before merging to see if there are comments from the
Core services modules reviewers.

Best Regards,
Hao Wu


>    ASSERT (FALSE);
> 
>    return 0;
> --
> 2.31.1
> 
> 
> 
> 
> 


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

* Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Print which PCD was unable to be found
  2021-07-14  4:43 ` [PATCH v2 1/1] " Daniel Schaefer
  2021-07-19  5:55   ` [edk2-devel] " Wu, Hao A
@ 2021-07-21  1:32   ` Wu, Hao A
  1 sibling, 0 replies; 4+ messages in thread
From: Wu, Hao A @ 2021-07-21  1:32 UTC (permalink / raw)
  To: devel@edk2.groups.io, Schaefer, Daniel
  Cc: Wang, Jian J, Bi, Dandan, Liming Gao

When merging, change the patch subject a little to:
MdeModulePkg PCD: Print which PCD was unable to be found

Pushed via:
PR - https://github.com/tianocore/edk2/pull/1825
Commit - https://github.com/tianocore/edk2/commit/83b43c4cb17ec8c9fd2bb5843bf66e5961f28c82

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Daniel
> Schaefer
> Sent: Wednesday, July 14, 2021 12:43 PM
> To: devel@edk2.groups.io
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Print which PCD was
> unable to be found
> 
> When reaching the assert, it can't be debugged because the PCD is unknown.
> Therefore the PCD's GUID and token number should be printed.
> 
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  MdeModulePkg/Universal/PCD/Dxe/Service.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c
> b/MdeModulePkg/Universal/PCD/Dxe/Service.c
> index ea7edc3cbb1c..badeec8c97f0 100644
> --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
> +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
> @@ -3,7 +3,7 @@
> 
>  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
> Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> -(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
> +(C) Copyright 2016-2021 Hewlett Packard Enterprise Development LP<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -1610,6 +1610,7 @@ GetExPcdTokenNumber (
>      }
>    }
> 
> +  DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token
> + number: %d\n", __FUNCTION__, Guid, ExTokenNumber));
>    ASSERT (FALSE);
> 
>    return 0;
> --
> 2.31.1
> 
> 
> 
> 
> 


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

end of thread, other threads:[~2021-07-21  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-14  4:43 [PATCH v2 0/1] MdeModulePkg: Print which PCD was unable to be found Daniel Schaefer
2021-07-14  4:43 ` [PATCH v2 1/1] " Daniel Schaefer
2021-07-19  5:55   ` [edk2-devel] " Wu, Hao A
2021-07-21  1:32   ` Wu, Hao A

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