public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ming Huang" <ming.huang-@outlook.com>
To: devel@edk2.groups.io, hao.a.wu@intel.com, liming.gao@intel.com,
	edk2-devel@lists.01.org
Cc: phoenix.liyi@huawei.com, songdongkuang@huawei.com,
	huangming23@huawei.com, shenlimei@huawei.com,
	wanghuiqiang@huawei.com, Ming Huang <ming.huang-@outlook.com>
Subject: [PATCH v1 1/2] MdeModulePkg/Variable: Remove some debug print for runtime
Date: Wed,  4 Mar 2020 10:48:51 +0800	[thread overview]
Message-ID: <HK0PR02MB2593C62B72D661F449BDB5D5A7E50@HK0PR02MB2593.apcprd02.prod.outlook.com> (raw)
In-Reply-To: <20200304024852.30669-1-ming.huang-@outlook.com>

System will hang at debug print if enter RecordVarErrorFlag
in runtime.

This patch fix hang issue when run fwts in OS:
fwts uefirtmisc

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang-@outlook.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index d23aea4bc712..40efa10839ad 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -278,18 +278,16 @@ RecordVarErrorFlag (
   VAR_ERROR_FLAG            *VarErrFlag;
   VAR_ERROR_FLAG            TempFlag;
 
-  DEBUG_CODE (
-    DEBUG ((EFI_D_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
-    if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
-      if (AtRuntime ()) {
-        DEBUG ((EFI_D_ERROR, "CommonRuntimeVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonRuntimeVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
-      } else {
+  if (!AtRuntime ()) {
+    DEBUG_CODE (
+      DEBUG ((EFI_D_ERROR, "RecordVarErrorFlag (0x%02x) %s:%g - 0x%08x - 0x%x\n", Flag, VariableName, VendorGuid, Attributes, VariableSize));
+      if (Flag == VAR_ERROR_FLAG_SYSTEM_ERROR) {
         DEBUG ((EFI_D_ERROR, "CommonVariableSpace = 0x%x - CommonVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonVariableSpace, mVariableModuleGlobal->CommonVariableTotalSize));
+      } else {
+        DEBUG ((EFI_D_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
       }
-    } else {
-      DEBUG ((EFI_D_ERROR, "CommonMaxUserVariableSpace = 0x%x - CommonUserVariableTotalSize = 0x%x\n", mVariableModuleGlobal->CommonMaxUserVariableSpace, mVariableModuleGlobal->CommonUserVariableTotalSize));
-    }
-  );
+    );
+  }
 
   if (!mEndOfDxe) {
     //
-- 
2.9.5


       reply	other threads:[~2020-03-04  2:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200304024852.30669-1-ming.huang-@outlook.com>
2020-03-04  2:48 ` Ming Huang [this message]
2020-03-04  2:48 ` [PATCH v1 2/2] MdeModulePkg/Variable: Move FindVariable after AutoUpdateLangVariable Ming Huang

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=HK0PR02MB2593C62B72D661F449BDB5D5A7E50@HK0PR02MB2593.apcprd02.prod.outlook.com \
    --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