public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jordan Justen <jordan.l.justen@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,  edk2-devel@lists.01.org
Subject: Re: [PATCH 00/12] OvmfPkg: Enable variable access in PEI
Date: Mon, 27 Mar 2017 14:47:00 -0700	[thread overview]
Message-ID: <149065122031.28789.9113394760317457361@jljusten-skl> (raw)
In-Reply-To: <a12bbf61-3f55-2fda-b855-58aeb99a4f42@redhat.com>

On 2017-03-27 11:03:42, Laszlo Ersek wrote:
> On 03/27/17 10:05, Jordan Justen wrote:
> > web: https://github.com/jljusten/edk2/tree/pei-vars-v1
> > 
> > git: https://github.com/jljusten/edk2.git pei-vars-v1
> > 
> > This series moves flash detection into PEI to allow the PEI variable
> > access drivers to run. If flash is writable, the PCDs are set to point
> > at the flash memory. If flash is not writable, the PCDs are set to
> > point at a memory buffer.
> 
> Can you please state the use case for the latter option? That is, when
> the PCDs are set to point at the memory buffer.
> 
> In that case, the memory buffer is guaranteed to be empty (modulo
> internal formatting that PlatformPei would do just-in-time), unless the
> VM has just been rebooted within the same QEMU instance.
> 
> In other words, clients of the r/o variable2 PPI will get false results,
> most of the time -- if I understand correctly. After a fresh boot (which
> is most of the boots), no variable will be found in the PEI phase, even
> if the \NvVars file contains it, and the variable services in DXE will
> later find it.
> 
> ... I'm not sure if my understanding above is correct, but if it is,
> then I think this feature only contributes to the confusing nature of
> the memory-emulated variables.

I think we should continue to support the memory vars, even if they
have some obvious drawbacks.

-Jordan

> 
> > 
> > I tested KVM with ROM and writable flash, with S3 sleep/resume. I did
> > not test SMM.
> > 
> > Jordan Justen (10):
> >   OvmfPkg/build.sh: Add support for --disable-flash switch
> >   OvmfPkg QemuFlash: Make QemuFlash.* Base class safe
> >   OvmfPkg QemuFlash: Make QemuFlashDetected external
> >   OvmfPkg QemuFlash: Add DetectFlashBaseLib.inf 'NULL' library
> >   OvmfPkg PlatformPei: Detect and set PcdOvmfFlashVariablesEnable
> >   OvmfPkg/EmuVariableFvbRuntimeDxe: Use PcdOvmfFlashVariablesEnable
> >   OvmfPkg PlatformPei: Set flash variable PCDs
> >   OvmfPkg PlatformPei: Initialize memory based variable store buffer
> >   OvmfPkg: Enable PEI variable access
> >   OvmfPkg QemuFlashFvbServicesRuntimeDxe: Cleanup init now done in PEI
> > 
> > Laszlo Ersek (2):
> >   OvmfPkg: resolve PcdLib for all PEIMs individually
> >   OvmfPkg: resolve PcdLib for PEIMs to PeiPcdLib by default
> > 
> >  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c             |   4 +-
> >  OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf           |   3 +-
> >  OvmfPkg/OvmfPkgIa32.dsc                            |  27 +-
> >  OvmfPkg/OvmfPkgIa32.fdf                            |   5 +-
> >  OvmfPkg/OvmfPkgIa32X64.dsc                         |  27 +-
> >  OvmfPkg/OvmfPkgIa32X64.fdf                         |   5 +-
> >  OvmfPkg/OvmfPkgX64.dsc                             |  27 +-
> >  OvmfPkg/OvmfPkgX64.fdf                             |   5 +-
> >  OvmfPkg/PlatformPei/Platform.c                     |  34 +--
> >  OvmfPkg/PlatformPei/Platform.h                     |   7 +-
> >  OvmfPkg/PlatformPei/PlatformPei.inf                |  11 +-
> >  OvmfPkg/PlatformPei/Vars.c                         | 283 +++++++++++++++++++++
> >  .../DetectFlashNullLib.c                           |  41 +++
> >  .../DetectFlashNullLib.inf                         |  60 +++++
> >  .../FvbServicesRuntimeDxe.inf                      |   4 -
> >  .../FvbServicesSmm.inf                             |   4 -
> >  .../FwBlockService.c                               |  28 +-
> >  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c |  59 +++--
> >  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.h |  30 ++-
> >  OvmfPkg/build.sh                                   |  10 +-
> >  20 files changed, 530 insertions(+), 144 deletions(-)
> >  create mode 100644 OvmfPkg/PlatformPei/Vars.c
> >  create mode 100644 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/DetectFlashNullLib.c
> >  create mode 100644 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/DetectFlashNullLib.inf
> > 
> 


  reply	other threads:[~2017-03-27 21:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27  8:05 [PATCH 00/12] OvmfPkg: Enable variable access in PEI Jordan Justen
2017-03-27  8:05 ` [PATCH 01/12] OvmfPkg/build.sh: Add support for --disable-flash switch Jordan Justen
2017-03-27  8:05 ` [PATCH 02/12] OvmfPkg: resolve PcdLib for all PEIMs individually Jordan Justen
2017-03-27  8:05 ` [PATCH 03/12] OvmfPkg: resolve PcdLib for PEIMs to PeiPcdLib by default Jordan Justen
2017-03-27  8:05 ` [PATCH 04/12] OvmfPkg QemuFlash: Make QemuFlash.* Base class safe Jordan Justen
2017-03-27  8:05 ` [PATCH 05/12] OvmfPkg QemuFlash: Make QemuFlashDetected external Jordan Justen
2017-03-27  8:05 ` [PATCH 06/12] OvmfPkg QemuFlash: Add DetectFlashBaseLib.inf 'NULL' library Jordan Justen
2017-03-27  8:05 ` [PATCH 07/12] OvmfPkg PlatformPei: Detect and set PcdOvmfFlashVariablesEnable Jordan Justen
2017-03-27  8:05 ` [PATCH 08/12] OvmfPkg/EmuVariableFvbRuntimeDxe: Use PcdOvmfFlashVariablesEnable Jordan Justen
2017-03-27  8:05 ` [PATCH 09/12] OvmfPkg PlatformPei: Set flash variable PCDs Jordan Justen
2017-03-27  8:05 ` [PATCH 10/12] OvmfPkg PlatformPei: Initialize memory based variable store buffer Jordan Justen
2017-03-27  8:05 ` [PATCH 11/12] OvmfPkg: Enable PEI variable access Jordan Justen
2017-03-27  8:05 ` [PATCH 12/12] OvmfPkg QemuFlashFvbServicesRuntimeDxe: Cleanup init now done in PEI Jordan Justen
2017-03-27 18:03 ` [PATCH 00/12] OvmfPkg: Enable variable access " Laszlo Ersek
2017-03-27 21:47   ` Jordan Justen [this message]
2017-03-28  9:22     ` Laszlo Ersek
2017-03-29  5:24       ` Jordan Justen

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=149065122031.28789.9113394760317457361@jljusten-skl \
    --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