From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id 72D391A1E02 for ; Thu, 18 Aug 2016 20:08:35 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 18 Aug 2016 20:08:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,543,1464678000"; d="scan'208";a="867991178" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by orsmga003.jf.intel.com with ESMTP; 18 Aug 2016 20:08:34 -0700 From: Jeff Fan To: edk2-devel@ml01.01.org Cc: Feng Tian , Dandan Bi Date: Fri, 19 Aug 2016 11:08:32 +0800 Message-Id: <1471576112-14840-1-git-send-email-jeff.fan@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 Subject: [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2016 03:08:35 -0000 Cc: Feng Tian Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/Microcode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c index 0fd8e8c..5bb0145 100644 --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c @@ -92,6 +92,7 @@ MicrocodeDetect ( PlatformId = (UINT8) PlatformIdMsr.Bits.PlatformId; LatestRevision = 0; + MicrocodeData = NULL; MicrocodeEnd = (UINTN) (MicrocodePatchAddress + MicrocodePatchRegionSize); MicrocodeEntryPoint = (CPU_MICROCODE_HEADER *) (UINTN) MicrocodePatchAddress; do { @@ -198,6 +199,7 @@ MicrocodeDetect ( // Revision. A processor with no loaded update is considered to have a // revision equal to zero. // + ASSERT (MicrocodeData != NULL); AsmWriteMsr64 ( MSR_IA32_BIOS_UPDT_TRIG, (UINT64) (UINTN) MicrocodeData -- 2.7.4.windows.1