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.65; helo=mga03.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 DF12C21B00DC4 for ; Wed, 29 Nov 2017 02:10:36 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2017 02:15:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,472,1505804400"; d="scan'208";a="8383169" Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga001.fm.intel.com with ESMTP; 29 Nov 2017 02:14:59 -0800 From: Star Zeng To: edk2-devel@lists.01.org Cc: Star Zeng , Liming Gao Date: Wed, 29 Nov 2017 18:14:53 +0800 Message-Id: <1511950497-9088-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [PATCH 0/4] Add USED_SIZE FV_EXT_TYPE support 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, 29 Nov 2017 10:10:37 -0000 V2: The first version did not adjust ExtEntryList in the while loop of [PATCH 2/4] and [PATCH 4/4], it is a bug and fixed in this V2. The USED_SIZE FV_EXT_TYPE is introduced by PI 1.6 spec. The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV. When the FV gets shadowed into memory you only need to copy the used bytes into memory and fill the rest of the memory buffer with the erase value. Cc: Liming Gao Star Zeng (4): MdePkg PiFirmwareVolume.h: Add USED_SIZE FV_EXT_TYPE definitions MdeModulePkg PeiCore: Support USED_SIZE FV_EXT_TYPE MdeModulePkg DxeCore: Check FvImage alignment MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPE MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 115 +++++++++++++++++++++++--- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 91 +++++++++++++++++++- MdePkg/Include/Pi/PiFirmwareVolume.h | 23 +++++- 3 files changed, 211 insertions(+), 18 deletions(-) -- 2.7.0.windows.1