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 6DD9B1A1E02 for ; Thu, 18 Aug 2016 20:09:49 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 18 Aug 2016 20:09:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,543,1464678000"; d="scan'208";a="1017071470" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 18 Aug 2016 20:09:49 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 18 Aug 2016 20:09:49 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.8]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.150]) with mapi id 14.03.0248.002; Fri, 19 Aug 2016 11:09:26 +0800 From: "Tian, Feng" To: "Fan, Jeff" , "edk2-devel@ml01.01.org" CC: "Bi, Dandan" , "Tian, Feng" Thread-Topic: [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized Thread-Index: AQHR+cb8fKPTszNkekiqON0voB2enaBPmopg Date: Fri, 19 Aug 2016 03:09:25 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE538824210@SHSMSX101.ccr.corp.intel.com> References: <1471576112-14840-1-git-send-email-jeff.fan@intel.com> In-Reply-To: <1471576112-14840-1-git-send-email-jeff.fan@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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:09:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian -----Original Message----- From: Fan, Jeff=20 Sent: Friday, August 19, 2016 11:09 AM To: edk2-devel@ml01.01.org Cc: Tian, Feng ; Bi, Dandan Subject: [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe unin= itialized 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 =3D (UINT8) PlatformIdMsr.Bits.PlatformId; =20 LatestRevision =3D 0; + MicrocodeData =3D NULL; MicrocodeEnd =3D (UINTN) (MicrocodePatchAddress + MicrocodePatchRegionSi= ze); MicrocodeEntryPoint =3D (CPU_MICROCODE_HEADER *) (UINTN) MicrocodePatchA= ddress; do { @@ -198,6 +199,7 @@ MicrocodeDetect ( // Revision. A processor with no loaded update is considered to have a // revision equal to zero. // + ASSERT (MicrocodeData !=3D NULL); AsmWriteMsr64 ( MSR_IA32_BIOS_UPDT_TRIG, (UINT64) (UINTN) MicrocodeData --=20 2.7.4.windows.1