On 03/18/15 20:29, Peter Jones wrote:
> FakeCapsuleDxe is a system for emulating capsule updates.
> 
> The basic mechanism is simple - create variables with the GUID
> 32e678e9-263f-4eae-a239-38a3cad6a1b5 and whatever names you choose.
> When the firmware starts, each one of these variables will become an
> entry in the EFI System Resource Table (ESRT).
> 
> When UpdateCapsule() is called, the GUID from the Capsule header will be
> checked against the GUID in each variable, and the first one it finds
> (with unspecified search order) will be examined.  The capsule data
> should be also be a valid ESRT table entry with the same GUID.  If the
> FwVersion field in the new payload entry is less than or equal to the
> LowestSupportedFwVersion field in the existing entry, and the flags
> match correctly, the old variable data is replaced with the new capsule
> payload data.  In any case its LastAttemptVersion and LastAttemptStatus
> are updated and a Capsule#### variable is created to reflect the status.
> 
> Additionally, this patch enables this feature on OvmfPkg and
> ArmPlatformPkg/ArmVirtualizationPkg builds.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Peter Jones <[email protected]>
> ---
>  .../ArmVirtualizationPkg/ArmVirtualization.dsc.inc |   4 +-
>  .../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc |   4 +-
>  .../ArmVirtualizationPkg/ArmVirtualizationQemu.fdf |   1 +
>  .../ArmVirtualizationPkg/ArmVirtualizationXen.dsc  |   4 +-
>  .../ArmVirtualizationPkg/ArmVirtualizationXen.fdf  |   1 +
>  .../Universal/BdsDxe/BdsDxe.inf                    |   1 +
>  .../Universal/BdsDxe/BdsEntry.c                    |   3 +
>  MdeModulePkg/Include/Guid/FakeCapsuleDxe.h         |  29 ++
>  .../Include/Library/Esrt.h                         |  33 +--
>  MdeModulePkg/Include/Library/FakeCapsuleLib.h      |  73 +++++
>  .../Library/FakeCapsuleLib/FakeCapsuleBase.c       | 231 +++++++++++++++
>  .../Library/FakeCapsuleLib/FakeCapsuleBase.inf     |  56 ++++
>  .../Library/FakeCapsuleLib/FakeCapsuleLib.c        | 295 +++++++++++++++++++
>  .../Library/FakeCapsuleLib/FakeCapsuleLib.inf      |  55 ++++
>  MdeModulePkg/MdeModulePkg.dec                      |  24 ++
>  .../Universal/FakeCapsuleDxe/FakeCapsuleDxe.c      | 325 
> +++++++++++++++++++++
>  .../Universal/FakeCapsuleDxe/FakeCapsuleDxe.inf    |  57 ++++
>  OvmfPkg/OvmfPkgIa32.dsc                            |   7 +-
>  OvmfPkg/OvmfPkgIa32.fdf                            |   1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc                         |   7 +-
>  OvmfPkg/OvmfPkgIa32X64.fdf                         |   1 +
>  OvmfPkg/OvmfPkgX64.dsc                             |   7 +-
>  OvmfPkg/OvmfPkgX64.fdf                             |   1 +
>  Vlv2TbltDevicePkg/PlatformPkg.dec                  |   2 -
>  24 files changed, 1197 insertions(+), 25 deletions(-)
>  create mode 100644 MdeModulePkg/Include/Guid/FakeCapsuleDxe.h
>  rename {Vlv2TbltDevicePkg => MdeModulePkg}/Include/Library/Esrt.h (56%)
>  create mode 100644 MdeModulePkg/Include/Library/FakeCapsuleLib.h
>  create mode 100644 MdeModulePkg/Library/FakeCapsuleLib/FakeCapsuleBase.c
>  create mode 100644 MdeModulePkg/Library/FakeCapsuleLib/FakeCapsuleBase.inf
>  create mode 100644 MdeModulePkg/Library/FakeCapsuleLib/FakeCapsuleLib.c
>  create mode 100644 MdeModulePkg/Library/FakeCapsuleLib/FakeCapsuleLib.inf
>  create mode 100644 MdeModulePkg/Universal/FakeCapsuleDxe/FakeCapsuleDxe.c
>  create mode 100644 MdeModulePkg/Universal/FakeCapsuleDxe/FakeCapsuleDxe.inf

Preliminary comments (assuming you'd like to have this feature added to
edk2):

- Please make sure that all new files have CRLF line terminators.

- Please create an edk2 fork on github (or wherever you deem
  appropriate) and push your patches there too. This is related to the
  previous point -- applying CRLF patches from emails that have crossed
  MTAs is an exercise in frustration.

- please split the patch into several ones; for starters, cross-module
  (cross-toplevel dir) patches are generally not acceptable for edk2,
  unless unavoidable. So you'll need at least one separate patch for
  each module you modify. Splitting up your series would also help
  reviewers staying sane. ;)

- given that edk2 has very long pathnames, please format your series
  with:

  --stat=1000 --stat-graph-width=20

  This will make the pathname column of the diffstat just as wide as
  necessary, and render the graph column both useful and not overly
  wide.

- At least one of the commit messages should include a description of
  the use case / workflow, and the relevant qemu command line switches
  (if anything special is needed). Assume that I'm dumb.
  (That's a safe assumption.)

Thanks
Laszlo

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to