[edk2-devel] [PATCH 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: refine flash detection

Gerd Hoffmann kraxel at redhat.com
Wed May 31 06:40:16 UTC 2023


On Thu, May 25, 2023 at 05:53:27PM +0200, Ard Biesheuvel wrote:
> On Tue, 2 May 2023 at 07:59, Gerd Hoffmann <kraxel at 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105480): https://edk2.groups.io/g/devel/message/105480
Mute This Topic: https://groups.io/mt/98633328/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list