From nobody Sun Nov 24 20:53:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+83378+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+83378+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1636104229; cv=none; d=zohomail.com; s=zohoarc; b=O+MIzXwSi++LijTrxiG2QujN2GivAHoWfZVnvGnXlP8DoYKFJPmhEU0oGGhip8fQzXkkX1/eAO2Pj0pX9Z8wHLxIoqEBhcm5cq53TC/gDLMDxgIsF1MbFth/J6DodNVsI6vOQUOSVpAuKiwqXVy7HOqhdWopRfKu/OA0/FUR+DI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636104229; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=gOnTytoe6GHwQg19Q+ykrfD6W/KktDFkKCYcPZRoQMA=; b=NoYSCE84EXL2v+Bb8B1lJZzXhPaN9XcCWj1YtQnJzDgMcwo2H4/ajlOS20OMwMeMWkyaPmOn7IjnHFuFgOJfgTUWQsZkduQl/f1Re6pqRDBVRZQLK+PRUe2Qdfn9NW/znQdybGv82Hf/wJSb9PXb8Cv2GYseRZ7V/DuplxuTHHs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+83378+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1636104229243411.34677115375655; Fri, 5 Nov 2021 02:23:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rww6YY1788612xCqJO20UOaB; Fri, 05 Nov 2021 02:23:48 -0700 X-Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web11.3155.1636104228334133343 for ; Fri, 05 Nov 2021 02:23:48 -0700 X-Received: by mail-pg1-f169.google.com with SMTP id p8so6566249pgh.11 for ; Fri, 05 Nov 2021 02:23:48 -0700 (PDT) X-Gm-Message-State: wHFiMSuhrcJ1KY8OdEZGpNA1x1787277AA= X-Google-Smtp-Source: ABdhPJwyDc0fPrCPuqWKUfaJ78ME7SAh20dX1IVgIbHbAcT0bGzoPQSrNadD7kkLcE0whSMlWI9Adg== X-Received: by 2002:a63:3348:: with SMTP id z69mr43600465pgz.177.1636104227913; Fri, 05 Nov 2021 02:23:47 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id v14sm8000353pfu.171.2021.11.05.02.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 02:23:47 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH 3/5] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Date: Fri, 5 Nov 2021 18:23:45 +0900 Message-Id: <163610422496.391624.6619000045636196996.stgit@localhost> In-Reply-To: <163610419943.391624.9289897029386201296.stgit@localhost> References: <163610419943.391624.9289897029386201296.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1636104228; bh=RgwCqeC5bHqYv0B9Jy7xzHayVWD96QxVDwBX6iPPioY=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=ZdH1sAGmJdGVVx0X72Hmqlu3K6XLVwge3sK7WQ+FQ3hQ6mGhwzOuUgKEYY8NI+FBTw3 K/UarMrB9uDc64ykLfVS9JYPp4bNhunK/O9IEVrGykmwyolfq0VScXwbJ84+JK/aHdKtR qLf9lk9qbx4XBseJf1cBNfjY1IIuC6xC20E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1636104231805100001 Fix the number of erase blocks by rounding up the result. The erase blocks must include the last block covered by the length bytes. Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko Sakamoto Reviewed-by: Leif Lindholm --- .../SynQuacerPlatformFlashAccessLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAcce= ssLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Libra= ry/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c index bded74dc4f..ad4021cf59 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/S= ynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/S= ynQuacerPlatformFlashAccessLib.c @@ -283,7 +283,7 @@ PerformFlashWriteWithProgress ( DEBUG ((DEBUG_INFO, "%a: erasing 0x%llx bytes at address %llx (LBA 0x%lx= )\n", __FUNCTION__, Length, FlashAddress, Lba)); =20 - Status =3D Fvb->EraseBlocks (Fvb, Lba, Length / BlockSize, + Status =3D Fvb->EraseBlocks (Fvb, Lba, (Length + BlockSize - 1) / BlockS= ize, EFI_LBA_LIST_TERMINATOR); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: Fvb->EraseBlocks () failed - %r\n", -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83378): https://edk2.groups.io/g/devel/message/83378 Mute This Topic: https://groups.io/mt/86836380/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-