public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Tian, Feng" <feng.tian@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	 "Zeng, Star" <star.zeng@intel.com>,
	"Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip the update if content is same.
Date: Tue, 11 Oct 2016 00:37:30 +0000	[thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F564822947@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <1476016341-8884-1-git-send-email-jiewen.yao@intel.com>

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 capsule
update, it should be integrated into an FMP v3 patch series after all FMP v2
feedback is received.

Thanks,

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiewen Yao
> Sent: Sunday, October 9, 2016 5:32 AM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng <feng.tian@intel.com>; Gao, Liming <liming.gao@intel.com>; Zeng, Star
> <star.zeng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Zhang, Chao B
> <chao.b.zhang@intel.com>
> 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 <michael.d.kinney@intel.com>
> Cc: Kelly Steele <kelly.steele@intel.com>
> Cc: Feng Tian <feng.tian@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
> ---
> 
> QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLi
> bDxe.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git
> a/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccess
> LibDxe.c
> b/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccess
> LibDxe.c
> index 3ad30b1..aeafb1b 100644
> ---
> a/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccess
> LibDxe.c
> +++
> b/QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccess
> LibDxe.c
> @@ -153,6 +153,15 @@ PerformFlashWrite(
>    //
>    SectorNum = Length / SPI_ERASE_SECTOR_SIZE;
>    for (Index = 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) == 0) {
> +      DEBUG((EFI_D_INFO, "Sector - 0x%x - skip\n", Index));
> +      continue;
> +    }
> +    DEBUG((EFI_D_INFO, "Sector - 0x%x - update...\n", Index));
> +
>      Status = 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


  reply	other threads:[~2016-10-11  0:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09 12:32 [PATCH] QuarkPlatformPkg/PlatformFlashAccessLib: Skip the update if content is same Jiewen Yao
2016-10-11  0:37 ` Kinney, Michael D [this message]
2016-10-11  0:39   ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E92EE9817A31E24EB0585FDF735412F564822947@ORSMSX113.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox