From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0FDB421163DE9 for ; Thu, 25 Oct 2018 20:21:53 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 20:21:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,426,1534834800"; d="scan'208";a="244477581" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 25 Oct 2018 20:21:52 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 20:21:52 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 20:21:52 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.84]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.214]) with mapi id 14.03.0415.000; Fri, 26 Oct 2018 11:21:49 +0800 From: "Yao, Jiewen" To: "Chiu, Chasel" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelFsp2Pkg: Fix GCC49/XCODE build failure Thread-Index: AQHUbNqe4tsHFiFyUUCylTx2cmm8rKUw3DlA Date: Fri, 26 Oct 2018 03:21:49 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AE2EDC6@shsmsx102.ccr.corp.intel.com> References: <20181026031834.2736-1-chasel.chiu@intel.com> In-Reply-To: <20181026031834.2736-1-chasel.chiu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODk3ODMwMTYtYTM2My00NGFiLWE2NTctYzE1ZjZkYjhhY2QxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVGFXZXp3b2lLbG10NjJscjdaWlNEeEJTeVdoYmpJVXFZOHFYZFh4TGY5Nng1RUpzUks1VENBVXZLTHFDblFvTiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFsp2Pkg: Fix GCC49/XCODE build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 03:21:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Chiu, Chasel > Sent: Friday, October 26, 2018 11:19 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Desimone, Nathaniel L > ; Chiu, Chasel > Subject: [PATCH] IntelFsp2Pkg: Fix GCC49/XCODE build failure >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1276 >=20 > Fixed potentially uninitialized variable build failure > caused by commit: b1cc6f672f3b924cdb190e5b92db3b47f46a8911 >=20 > Test: Verified on internal platform and boots successfully. >=20 > Cc: Jiewen Yao > Cc: Desimone Nathaniel L > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chasel Chiu > --- > IntelFsp2Pkg/FspSecCore/SecMain.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c > b/IntelFsp2Pkg/FspSecCore/SecMain.c > index ddbfc4fcdf..f319c68cc5 100644 > --- a/IntelFsp2Pkg/FspSecCore/SecMain.c > +++ b/IntelFsp2Pkg/FspSecCore/SecMain.c > @@ -107,13 +107,12 @@ SecStartup ( > } > IdtSize =3D sizeof (IdtTableInStack.IdtTable); > } else { > - if (IdtDescriptor.Limit + 1 > sizeof (IdtTableInStack.IdtTable)) { > + IdtSize =3D IdtDescriptor.Limit + 1; > + if (IdtSize > sizeof (IdtTableInStack.IdtTable)) { > // > // ERROR: IDT table size from boot loader is larger than FSP can > support, DeadLoop here! > // > CpuDeadLoop(); > - } else { > - IdtSize =3D IdtDescriptor.Limit + 1; > } > CopyMem ((VOID *) (UINTN) &IdtTableInStack.IdtTable, (VOID *) > IdtDescriptor.Base, IdtSize); > } > -- > 2.13.3.windows.1