public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: devel@edk2.groups.io, Pawel Polawski <ppolawsk@redhat.com>,
	 Jiewen Yao <jiewen.yao@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Oliver Steffen <osteffen@redhat.com>,
	Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: refine flash detection
Date: Wed, 31 May 2023 08:40:16 +0200	[thread overview]
Message-ID: <mmmelerzholbgdspj3jnd2wbgjykqap5dhhiuueyoo7qgz7veg@lnzuuir422td> (raw)
In-Reply-To: <CAMj1kXFsU3Ca8LiKmGuHCOap+As8=o=LY096DvGYnVvnR4zhOw@mail.gmail.com>

On Thu, May 25, 2023 at 05:53:27PM +0200, Ard Biesheuvel wrote:
> On Tue, 2 May 2023 at 07:59, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > Check whenever flash is actually writable.
> >
> 
> This is a bit too terse. Could you explain why this is needed, and why
> this approach is suitable?

Flash can be write-protected in qemu (which is usually the case for
code).  In case the variable store flash block is configured read-only
ovmf wouldn't be able to store EFI variables there, so not setting up
fvb in that case (and fallhack to emulation) is the better option.
It'll avoid problems later due to flash writes failing.

The patch tries to write back the original value read earlier, so flash
content doesn't change in case the write succeeds.  But the status we
read back after the attempt to write will tell us whenever flash is
writable or not.

take care,
  Gerd


      reply	other threads:[~2023-05-31  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  5:59 [PATCH 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: refine flash detection Gerd Hoffmann
2023-05-25 15:53 ` Ard Biesheuvel
2023-05-31  6:40   ` Gerd Hoffmann [this message]

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=mmmelerzholbgdspj3jnd2wbgjykqap5dhhiuueyoo7qgz7veg@lnzuuir422td \
    --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