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=liming.gao@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 2CBAA220FB33F for ; Tue, 5 Dec 2017 23:58:01 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 00:02:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,367,1508828400"; d="scan'208";a="10046946" Received: from lgao4-mobl1.ccr.corp.intel.com ([10.239.198.80]) by fmsmga004.fm.intel.com with ESMTP; 06 Dec 2017 00:02:32 -0800 From: Liming Gao To: edk2-devel@lists.01.org Cc: Eric Dong , Star Zeng Date: Wed, 6 Dec 2017 16:02:28 +0800 Message-Id: <20171206080228.18204-1-liming.gao@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 Subject: [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 07:58:02 -0000 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 index 173bbfcfcb..c241d3704a 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -189,7 +189,7 @@ SecStartup ( // SecCoreData.DataSize = (UINT16) sizeof (EFI_SEC_PEI_HAND_OFF); SecCoreData.BootFirmwareVolumeBase = BootFirmwareVolume; - SecCoreData.BootFirmwareVolumeSize = (UINTN)(0x100000000ULL - (UINTN) BootFirmwareVolume); + SecCoreData.BootFirmwareVolumeSize = (UINTN)((EFI_FIRMWARE_VOLUME_HEADER *) BootFirmwareVolume)->FvLength; SecCoreData.TemporaryRamBase = (VOID*)(UINTN) TempRamBase; SecCoreData.TemporaryRamSize = SizeOfRam; SecCoreData.PeiTemporaryRamBase = SecCoreData.TemporaryRamBase; -- 2.11.0.windows.1