public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "wenyi,xie" <xiewenyi2@huawei.com>
To: <devel@edk2.groups.io>, <jian.j.wang@intel.com>,
	<gaoliming@byosoft.com.cn>, <dandan.bi@intel.com>
Cc: <songdongkuang@huawei.com>, <xiewenyi2@huawei.com>
Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/DxeCorePerformanceLib:Variable Initial
Date: Tue, 30 Nov 2021 09:51:10 +0800	[thread overview]
Message-ID: <20211130015110.2635022-2-xiewenyi2@huawei.com> (raw)
In-Reply-To: <20211130015110.2635022-1-xiewenyi2@huawei.com>

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 <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
 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


  reply	other threads:[~2021-11-30  1:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30  1:51 [PATCH EDK2 v1 0/1] MdeModulePkg/DxeCorePerformanceLib:Variable Initial wenyi,xie
2021-11-30  1:51 ` wenyi,xie [this message]
2021-12-01  1:52   ` 回复: [edk2-devel] [PATCH EDK2 v1 1/1] " gaoliming
2021-12-03  9:43     ` Dandan Bi
2021-12-01  2:18   ` Dandan Bi

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=20211130015110.2635022-2-xiewenyi2@huawei.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