From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 59AE2220FB309 for ; Wed, 6 Dec 2017 00:19:40 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 00:24:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,367,1508828400"; d="scan'208";a="10052678" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 06 Dec 2017 00:24:11 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 00:24:11 -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; Wed, 6 Dec 2017 16:24:09 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [Patch] UefiCpuPkg: Update SecCore to get BFV size based on BFV header FvLength Thread-Index: AQHTbmidz7xUE16DSkigl/I+NX/zg6M1+j7Q Date: Wed, 6 Dec 2017 08:24:08 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9C02DD@shsmsx102.ccr.corp.intel.com> References: <20171206080228.18204-1-liming.gao@intel.com> In-Reply-To: <20171206080228.18204-1-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDM3MjM3YTAtYTRiNi00YjBmLWI2NTAtOGU4MjhlYzQ2MzVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJaVERYeTdpMFRPdVBTZU9Bb2tXUUZkRlRpQTRyRG1cL00xWk0zRllzeldCbWp6TVYyXC9KNXR3WG51VE9NaXVwaDIifQ== dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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: Wed, 06 Dec 2017 08:19:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----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