From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E5BCC1A1E60 for ; Mon, 10 Oct 2016 17:39:16 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 10 Oct 2016 17:39:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,327,1473145200"; d="scan'208,217";a="18293916" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 10 Oct 2016 17:39:16 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 10 Oct 2016 17:39:15 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.15]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.234]) with mapi id 14.03.0248.002; Tue, 11 Oct 2016 08:39:13 +0800 From: "Yao, Jiewen" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Tian, Feng" , "Gao, Liming" , "Zeng, Star" , "Zhang, Chao B" Thread-Topic: [edk2] [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip the update if content is same. Thread-Index: AQHSIik4GmMRvwfzqkidj0Fzxc+PtqCh5N0AgACGXxA= Date: Tue, 11 Oct 2016 00:39:12 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386A0E8D@shsmsx102.ccr.corp.intel.com> References: <1476016341-8884-1-git-send-email-jiewen.yao@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip the update if content is same. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 00:39:17 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sure. Definition. It will be merged. :) Thanks to help me validate that. From: Kinney, Michael D Sent: Tuesday, October 11, 2016 8:38 AM To: Yao, Jiewen ; edk2-devel@lists.01.org; Kinney, Mi= chael D Cc: Tian, Feng ; Gao, Liming ; Z= eng, Star ; Zhang, Chao B Subject: RE: [edk2] [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip t= he update if content is same. Jiewen, I have applied this patch on top of your FMP v2 series and verified that it skips erase/write of FLASH sectors that match in Galileo Gen 2 platform. Since this patch is against the new lib that is part of Quark specific caps= ule update, it should be integrated into an FMP v3 patch series after all FMP v= 2 feedback is received. Thanks, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ji= ewen Yao > Sent: Sunday, October 9, 2016 5:32 AM > To: edk2-devel@lists.01.org > Cc: Tian, Feng >; Gao, Li= ming >; Zeng, Star > >; Kinney, Michael D >; Zhang, Chao B > > > Subject: [edk2] [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip the= update if > content is same. > > This is enhancement for PlatformFlashAccessLib to skip flash write > if the content is same in new image. > > Cc: Michael D Kinney > > Cc: Kelly Steele > > Cc: Feng Tian > > Cc: Star Zeng > > Cc: Liming Gao > > Cc: Chao Zhang > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiewen Yao > > --- > > QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformF= lashAccessLi > bDxe.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git > a/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor= mFlashAccess > LibDxe.c > b/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor= mFlashAccess > LibDxe.c > index 3ad30b1..aeafb1b 100644 > --- > a/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor= mFlashAccess > LibDxe.c > +++ > b/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor= mFlashAccess > LibDxe.c > @@ -153,6 +153,15 @@ PerformFlashWrite( > // > SectorNum =3D Length / SPI_ERASE_SECTOR_SIZE; > for (Index =3D 0; Index < SectorNum; Index++){ > + if (CompareMem( > + (UINT8 *)(UINTN)(FlashAddress + mInternalFdAddress) + Index * > SPI_ERASE_SECTOR_SIZE, > + (UINT8 *)Buffer + Index * SPI_ERASE_SECTOR_SIZE, > + SPI_ERASE_SECTOR_SIZE) =3D=3D 0) { > + DEBUG((EFI_D_INFO, "Sector - 0x%x - skip\n", Index)); > + continue; > + } > + DEBUG((EFI_D_INFO, "Sector - 0x%x - update...\n", Index)); > + > Status =3D FlashFdErase ( > (UINTN)FlashAddress + Index * SPI_ERASE_SECTOR_SIZE > ); > -- > 2.7.4.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel