public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <2c7b82749a9aff01393b230e216c5e5aee675dd1.1691750977.git.2931013282@sjtu.edu.cn> (raw)

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/VarStore.fdf.inc
index 6bc619e50c..aba32315cc 100644
--- a/OvmfPkg/RiscVVirt/VarStore.fdf.inc
+++ b/OvmfPkg/RiscVVirt/VarStore.fdf.inc
@@ -30,9 +30,9 @@ DATA = {
   # Signature "_FVH"       # Attributes
   0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,
   # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision
-  0x48, 0x00, 0x2F, 0xF1, 0x00, 0x00, 0x00, 0x02,
-  # Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block
-  0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+  0x48, 0x00, 0x28, 0x09, 0x00, 0x00, 0x00, 0x02,
+  # Blockmap[0]: 0x3 Blocks * 0x40000 Bytes / Block
+  0x3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
   # Blockmap[1]: End
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   ## This is the VARIABLE_STORE_HEADER
-- 
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]
-=-=-=-=-=-=-=-=-=-=-=-



             reply	other threads:[~2023-08-11 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 11:04 Qingyu Shang [this message]
2023-08-16  7:08 ` [edk2-devel] [PATCH] OvmfPkg/RiscVVirt: Fix issues in VarStore Blockmap config Li, Yong
2023-08-16  9:03   ` Sunil V L
2023-08-16 10:25     ` 回复: " Qingyu Shang
     [not found]   ` <177BD1A40E32609C.8497@groups.io>
2023-08-22  6:26     ` Sunil V L
2023-08-24  1:44       ` edk2-stable202308: " gaoliming via groups.io

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=2c7b82749a9aff01393b230e216c5e5aee675dd1.1691750977.git.2931013282@sjtu.edu.cn \
    --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