From nobody Sun Nov 24 18:42:05 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+84297+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+84297+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1638519171; cv=none; d=zohomail.com; s=zohoarc; b=l8Sj4EEOMzK0uHZ/L6oD830/sBPURJuZPFMX3PB3Sstbe1OrZH6Rv75XWXmaJeMdgWC+u3WnfbefWm5T7Mv6kyM/Nskh7oDdhWv0xx4PF1fI1IWU5eaz4sUctbkGFqWSCUl+zOsSuiHjy+o69Q3ZsvZq/GIIRxCe/jF66hMC85E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638519171; 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=EqyXTD0hV+G9FPQQHT1lIOIOT5vmRFYyuVCTvXsytyU=; b=BCvwDpAHMwTmFqHeFH2cYOyWuNWL9WZd90ZlD7xL2UbKYG7l/s5OyOcpSvqgNXiJZJx3UFQlQelyIw+GujmeA38GPNfomumpLNo0DBBnhMhGi+iUXeTxEz+Wc+OjruK3oUltH6qBP1hgaSriD4FiFtzxfOus/9V20h6h1dlIims= 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+84297+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 1638519171604415.9055839594232; Fri, 3 Dec 2021 00:12:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 77QAYY1788612x0Oj1RdKMRs; Fri, 03 Dec 2021 00:12:51 -0800 X-Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mx.groups.io with SMTP id smtpd.web12.9307.1638519170654954834 for ; Fri, 03 Dec 2021 00:12:50 -0800 X-Received: by mail-pl1-f178.google.com with SMTP id o14so1575321plg.5 for ; Fri, 03 Dec 2021 00:12:50 -0800 (PST) X-Gm-Message-State: qsguMQtb7agIGZRgo5ElXmAMx1787277AA= X-Google-Smtp-Source: ABdhPJznwuwWMJYvynUIna4B7VSNtRga+bvbZpmkyeEl1hzN9tZolTuBeY/rd50YRylLuLivur2/Qw== X-Received: by 2002:a17:90a:46c9:: with SMTP id x9mr12444396pjg.183.1638519170202; Fri, 03 Dec 2021 00:12:50 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id m10sm1648094pgv.75.2021.12.03.00.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 00:12:49 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v2 4/5] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Date: Fri, 3 Dec 2021 17:12:47 +0900 Message-Id: <163851916709.1636051.9018442736759044218.stgit@localhost> In-Reply-To: <163851913341.1636051.3357297397950801289.stgit@localhost> References: <163851913341.1636051.3357297397950801289.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=1638519171; bh=6lp0JIm5+mX7h2hYuNAaJ/mUaRk3Xgr8KymqvXNx21E=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=p7vIpR61slCzal00/BFu/KYhBcmFKa0s/fRoVH+zx57DYNFJCMl2dS3H7eHjx5lq0z/ seS26f5uRJhzUiLRRKIZqrg4YWCsTxaxo0F45m0jjdVLl7JuQZVMY3asE6TO1ikQBk63G K5OFsVyOmAVTO0LOti3YTyanoCmIVz/rzdU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1638519171884100001 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 (#84297): https://edk2.groups.io/g/devel/message/84297 Mute This Topic: https://groups.io/mt/87472869/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-