From nobody Sun Nov 24 18:52:04 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+84624+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+84624+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119068; cv=none; d=zohomail.com; s=zohoarc; b=AXiVMlYBQKFEVBTL/MTR9O+QYuYZPS0r0TbwvRAuo8qPh1OVAFELpc5keNl//vO02WB8//mzY6ychioT5wT+34d/6iH9q+s6LjTVAtIZ96+0BLKfCB6lh/uoo0oRiKM79UT5TEWpyNHcQ1bq1BEzzFFBGoG/8rO+uIYxbRUs2BI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119068; 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=bukhWSvA7gTMl/acjeaDYPnWV/R6cBln/Jdjdgzqqqo=; b=LEFLxZGM/5kzVRo/++wnK4mFMhIhO1hhZQVzLda1Z61ZSbBM57FqlbxaaL5bRiVahAjSz0EKD2/5DgRtlj14WdNv3bRA0wgHgL2LBYBDFFfbrCzXTiHu52q6e5qHxGiS+pZWuFzPAx7A98e8L+Ds0R9XukElXHjeoqtASSHZXNE= 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+84624+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 1639119068655644.1255806570191; Thu, 9 Dec 2021 22:51:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id sM8XYY1788612xrZIBI3nAb2; Thu, 09 Dec 2021 22:51:08 -0800 X-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.4124.1639119067660543796 for ; Thu, 09 Dec 2021 22:51:07 -0800 X-Received: by mail-pj1-f49.google.com with SMTP id gf14-20020a17090ac7ce00b001a7a2a0b5c3so8727173pjb.5 for ; Thu, 09 Dec 2021 22:51:07 -0800 (PST) X-Gm-Message-State: UZSZfLPbYhgPbE10k7UYXhS7x1787277AA= X-Google-Smtp-Source: ABdhPJxES02gsZSH8XZWHydgEEskEqVQ0sQlWylDTyxUC1pFAzyVquzw7iL0Rrk/yyh5/ETxh96N7g== X-Received: by 2002:a17:903:2306:b0:142:123a:24ec with SMTP id d6-20020a170903230600b00142123a24ecmr73621749plh.21.1639119067144; Thu, 09 Dec 2021 22:51:07 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id q2sm1928770pfj.62.2021.12.09.22.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:06 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 4/6] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Date: Fri, 10 Dec 2021 15:51:04 +0900 Message-Id: <163911906395.561661.1999317391358075106.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.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=1639119068; bh=FNXlbuMRvU359jbjTjLwwBFUWR2bU6boTgEJuRVrzHI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=dQFwdo0LT9kTPyrJKVxxE6XXG9pVCjXcZubHXaQELJ/w3nKhWyGp5elgEq7fMcRGMCb k0oNzNh605aipzCW4WnNgFMaGkkNhrvm3xLl4O11n7RQcfXH6UIRWEBVdN32zMcAJmRvh wmdLUnlLO3GBVP5cpUsSVqZ6uTLFP0iSWO4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119069149100002 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 (#84624): https://edk2.groups.io/g/devel/message/84624 Mute This Topic: https://groups.io/mt/87631128/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-