From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 963A5D80CA0 for ; Fri, 11 Aug 2023 14:30:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=reAi1V/K8ppx1uNz/OsDRFRMonTw2AyDl0oJXVJLCww=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1691764203; v=1; b=BAiyua5fdvlzu9G3IFggali6au6eCsBvF+obGEMTVeYsaX7cjqBkVlUCN9wGy0ux2MlfW2Rt hfz09cLOQ3wsOgRqF87m5BlJEThY6MCl+8vPNi6jQXnPh95vjRE1vJktEMGkDjndD2KfU2aVDsN d2wupckZbPyWvUks9GZdfNKI= X-Received: by 127.0.0.2 with SMTP id NVRwYY7687511xDlY85hnZNa; Fri, 11 Aug 2023 07:30:03 -0700 X-Received: from smtp232.sjtu.edu.cn (smtp232.sjtu.edu.cn [202.120.2.232]) by mx.groups.io with SMTP id smtpd.web10.40146.1691751890634811544 for ; Fri, 11 Aug 2023 04:04:51 -0700 X-Received: from proxy188.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp232.sjtu.edu.cn (Postfix) with ESMTPS id 355291008C5B2; Fri, 11 Aug 2023 19:04:47 +0800 (CST) X-Received: from sqy-MS-7C82.ipads-lab.se.sjtu.edu.cn (unknown [202.120.40.82]) by proxy188.sjtu.edu.cn (Postfix) with ESMTPA id B949537C935; Fri, 11 Aug 2023 19:04:44 +0800 (CST) From: "Qingyu Shang" <2931013282@sjtu.edu.cn> To: devel@edk2.groups.io Cc: Qingyu Shang <2931013282@sjtu.edu.cn> Subject: [edk2-devel] [PATCH] OvmfPkg/RiscVVirt: Fix issues in VarStore Blockmap config Date: Fri, 11 Aug 2023 19:04:43 +0800 Message-Id: <2c7b82749a9aff01393b230e216c5e5aee675dd1.1691750977.git.2931013282@sjtu.edu.cn> MIME-Version: 1.0 Precedence: Bulk 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,2931013282@sjtu.edu.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Rt2ZCaukjo9pK8Bk9HuECQJjx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BAiyua5f; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none The block size configuration of Blockmap does not match that in Qemu VirtNorFlash, which causes variable data to be written into FtwWorkBlock by mistake, resulting in data loss during reboot. Fix it and update new checksum value. Signed-off-by: Qingyu Shang <2931013282@sjtu.edu.cn> --- OvmfPkg/RiscVVirt/VarStore.fdf.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/RiscVVirt/VarStore.fdf.inc b/OvmfPkg/RiscVVirt/VarStor= e.fdf.inc index 6bc619e50c..aba32315cc 100644 --- a/OvmfPkg/RiscVVirt/VarStore.fdf.inc +++ b/OvmfPkg/RiscVVirt/VarStore.fdf.inc @@ -30,9 +30,9 @@ DATA =3D { # Signature "_FVH" # Attributes=0D 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,=0D # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision=0D - 0x48, 0x00, 0x2F, 0xF1, 0x00, 0x00, 0x00, 0x02,=0D - # Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block=0D - 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,=0D + 0x48, 0x00, 0x28, 0x09, 0x00, 0x00, 0x00, 0x02,=0D + # Blockmap[0]: 0x3 Blocks * 0x40000 Bytes / Block=0D + 0x3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,=0D # Blockmap[1]: End=0D 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,=0D ## This is the VARIABLE_STORE_HEADER=0D --=20 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107708): https://edk2.groups.io/g/devel/message/107708 Mute This Topic: https://groups.io/mt/100684601/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-