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.100; helo=mga07.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 A84F12218E923 for ; Wed, 6 Dec 2017 18:50:05 -0800 (PST) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 18:54:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,370,1508828400"; d="scan'208";a="790840" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 06 Dec 2017 18:54:38 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 18:54:37 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 18:54:37 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Thu, 7 Dec 2017 10:54:35 +0800 From: "Dong, Eric" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch] UefiCpuPkg: Update SecCore to get BFV size based on BFV header FvLength Thread-Index: AQHTbmidxAo66nZr30uvlX9sOGjQeKM3MHgg Date: Thu, 7 Dec 2017 02:54:34 +0000 Message-ID: References: <20171206080228.18204-1-liming.gao@intel.com> In-Reply-To: <20171206080228.18204-1-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] UefiCpuPkg: Update SecCore to get BFV size based on BFV header FvLength X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Dec 2017 02:50:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Gao, Liming=20 Sent: Wednesday, December 6, 2017 4:02 PM To: edk2-devel@lists.01.org Cc: Dong, Eric; Zeng, Star Subject: [Patch] UefiCpuPkg: Update SecCore to get BFV size based on BFV he= ader FvLength Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Eric Dong Cc: Star Zeng --- UefiCpuPkg/SecCore/SecMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c in= dex 173bbfcfcb..c241d3704a 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -189,7 +189,7 @@ SecStartup ( // SecCoreData.DataSize =3D (UINT16) sizeof (EFI_SEC_PEI_HAND= _OFF); SecCoreData.BootFirmwareVolumeBase =3D BootFirmwareVolume; - SecCoreData.BootFirmwareVolumeSize =3D (UINTN)(0x100000000ULL - (UINTN) = BootFirmwareVolume); + SecCoreData.BootFirmwareVolumeSize =3D=20 + (UINTN)((EFI_FIRMWARE_VOLUME_HEADER *) BootFirmwareVolume)->FvLength; SecCoreData.TemporaryRamBase =3D (VOID*)(UINTN) TempRamBase; SecCoreData.TemporaryRamSize =3D SizeOfRam; SecCoreData.PeiTemporaryRamBase =3D SecCoreData.TemporaryRamBase; -- 2.11.0.windows.1