From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from APC01-HK2-obe.outbound.protection.outlook.com (APC01-HK2-obe.outbound.protection.outlook.com [40.92.255.105]) by mx.groups.io with SMTP id smtpd.web12.6054.1583290141109503854 for ; Tue, 03 Mar 2020 18:49:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=RYSWb0Em; spf=pass (domain: outlook.com, ip: 40.92.255.105, mailfrom: ming.huang-@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hr44iFwAR833NiYsyTvElv8xk9IqLFp13hFtCzJWVjsdg1n9/42FvO1+tKs9UJibwX/nr8/a4VG00bkFzbnU16YqSM48q5/DvIly9Jc8EkCo5ASl/8guYQRmrVuSo6/1+ogpVmBwQ0Vw9+I4YLQ5BOEc8GtPu3fABVcjfbutOlQwsz3UpRO3PS0lgl4A2jHMUan3iwiGlENgRIaWPh8qDYbUKNRFioFA+XLgUTpDngFmEAt4X2sD+WhWTXRmfp/wbs8lEozahwGiba1x8wiBLFGOEiGP16f5pS7cs2BbdjpwFlaISaiPJPa+iiQznsezVG12xupPyk/YXh7Ijdqf0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n5+UX+6FrnjwsUufboG3hu0Fguw5MVwqPYrgvOc6tC0=; b=KKy5e5l3w4bR7X+uOZ274Ha+CoRPa3WPSbAjZBlZiiGYuoDYj/iqh8JtuoBQdNewmhK8J1HxbfQvBXOfIMlIKqjQdoXluoK3OxihRCJ/j24xOb1+Pkj35uVZipTbW/f4t0+35Ok6359AHjn2GYmSKTGEokFGSxbmKtlZ3EW8oBErrBPHzajwbV1xzr+TR36TXQ6/RsMPrZg+c2VZQbTFup+tBMIoctSqyyNHTR9sNcAu36XojJ1wYiYZNbC1c4aXoSDekyh3tRI5EUYR+fh53pcmNwbJNAazRvEo7qDuMofuQniw54Rivt6ZagRRl4hCXwj8qzYNtgme31T5k0lmJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n5+UX+6FrnjwsUufboG3hu0Fguw5MVwqPYrgvOc6tC0=; b=RYSWb0EmHuvBz0SlIwBL0FU7QlT8d9yHcOnPNPXOIJkXjfPzSEnO1orVz6mITnwH2jTzYOx/Cxe2RB54+gIy14cWWq0cKZjU7UVv2vIYUfq/cTdN8AzKMwDh7cMa7wNTYlDFja26lGG0SIOm8GzfSD0PcX3U7YaqpZGdhLyQuu0sXb8HvKep0st9bGmi5kJHUXTug5P7wmhmTYf0Vh2t4emndLhWDgXdTbr4Go+0Bn0LX2MWlRMJg/Lk4bgMM2yXemRa8NRZ5zxVd1LM7yS+p4e+37VygLoaLXkJCGmueE4cfTIvC3BCglRHOuRTeNiOHVFtWa3EwA50SqWIp5k3Zw== Received: from SG2APC01FT039.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::36) by SG2APC01HT070.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::477) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Wed, 4 Mar 2020 02:48:56 +0000 Received: from HK0PR02MB2593.apcprd02.prod.outlook.com (10.152.250.55) by SG2APC01FT039.mail.protection.outlook.com (10.152.251.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11 via Frontend Transport; Wed, 4 Mar 2020 02:48:56 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:924467BE1421B0107B184457FB078BBA9ADF2F24AA0240B23D74F7B9C9186576;UpperCasedChecksum:33C680BE242BB7C0D9C720F1F63D19A410E305FB9E9351A60E7C1E5163388DD2;SizeAsReceived:7762;Count:49 Received: from HK0PR02MB2593.apcprd02.prod.outlook.com ([fe80::2589:c718:6ebe:e2ba]) by HK0PR02MB2593.apcprd02.prod.outlook.com ([fe80::2589:c718:6ebe:e2ba%6]) with mapi id 15.20.2772.019; Wed, 4 Mar 2020 02:48:56 +0000 From: "Ming Huang" 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 Subject: [PATCH v1 1/2] MdeModulePkg/Variable: Remove some debug print for runtime Date: Wed, 4 Mar 2020 10:48:51 +0800 Message-ID: X-Mailer: git-send-email 2.9.5 In-Reply-To: <20200304024852.30669-1-ming.huang-@outlook.com> References: <20200304024852.30669-1-ming.huang-@outlook.com> X-ClientProxiedBy: HK2P15301CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::17) To HK0PR02MB2593.apcprd02.prod.outlook.com (2603:1096:203:1f::15) Return-Path: ming.huang-@outlook.com X-Microsoft-Original-Message-ID: <20200304024852.30669-2-ming.huang-@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (114.119.4.74) by HK2P15301CA0007.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2814.3 via Frontend Transport; Wed, 4 Mar 2020 02:48:56 +0000 X-Mailer: git-send-email 2.9.5 X-Microsoft-Original-Message-ID: <20200304024852.30669-2-ming.huang-@outlook.com> X-TMN: [VD4WXgRe5iSUuEK5n1NP8vYWgOnBtquM] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 92730dd8-0d4b-4221-8a6d-08d7bfe6954a X-MS-TrafficTypeDiagnostic: SG2APC01HT070: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aCZyK+cM41wUEcIwVtpCFCJaWhI4z3cuTDJPQzc8nDGV63QH1dp6TdguatXLrtwGG824TDEKFLUnvN2LPD/ANwlUwTUz3D3BJgNOX2Ai5WKzvQ72GIdJJGjiKI40WdOFSeb6PRNYU+q121ChMbB3ZpFhzrgJzH9Cq8NM9N5nukEahSW5MLegHaX0BiRdj5Is X-MS-Exchange-AntiSpam-MessageData: ehaxOYhUGMjECYemxjcjJg0VSJUCTDDwBJ5jhj4QyNNsTGLAdkB9oCdoSex2hSOXPzsBf51QDCvor+il6mrCHIQHUXIru4Fmj+n+lEzhN1Ynq8HX/VfNVhVjGVjLS8JzbqdVruwfcP0OI5sFhKO9GA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92730dd8-0d4b-4221-8a6d-08d7bfe6954a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2020 02:48:56.6057 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT070 Content-Type: text/plain 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 --- 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