From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mx.groups.io with SMTP id smtpd.web11.70264.1638237078285131019 for ; Mon, 29 Nov 2021 17:51:18 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.187, mailfrom: xiewenyi2@huawei.com) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4J34v20hvfzcZyj; Tue, 30 Nov 2021 09:51:10 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 30 Nov 2021 09:51:15 +0800 Received: from kwephisprg16640.huawei.com (10.247.83.252) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 30 Nov 2021 09:51:15 +0800 From: "wenyi,xie" To: , , , CC: , Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/DxeCorePerformanceLib:Variable Initial Date: Tue, 30 Nov 2021 09:51:10 +0800 Message-ID: <20211130015110.2635022-2-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20211130015110.2635022-1-xiewenyi2@huawei.com> References: <20211130015110.2635022-1-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.247.83.252] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected Content-Type: text/plain SmmBootRecordDataSize is initialized in InternalGetSmmPerData, but this function may fail. so to avoid using SmmBootRecordDataSize without intialization, set it to 0 at first. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Wenyi Xie --- MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index 532b3f8c90e2..f8778c25188a 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -1373,6 +1373,8 @@ UpdateBootPerformanceTable ( UINTN AppendSize; UINT8 *FirmwarePerformanceTablePtr; + SmmBootRecordDataSize = 0; + // // Get SMM performance data. // -- 2.20.1.windows.1