mbox series

[edk2,v2,0/5] MdeModulePkg ArmPkg: support for persistent capsules and progress reporting

Message ID 20180608065811.2065-1-ard.biesheuvel@linaro.org
Headers show
Series MdeModulePkg ArmPkg: support for persistent capsules and progress reporting | expand

Message

Ard Biesheuvel June 8, 2018, 6:58 a.m. UTC
This is the delta of code required to implement PersistAcrossReset on ARM
systems, and to wire up the capsule handling routines in a way that makes
the new progress reporting code do something meaningful on such platforms.

Changes since v1:
- incorporate Star's feedback (#1, #2)
- add Leif's ack (#4)

Patch #1 ensures that the capsule data which is preserved in DRAM across
a reboot is written back to main memory before attempting to access it
with the caches off.

Patch #2 modifies the logic in DxeCapsuleLibFmp so it can deal with a
platform that chooses to call ProcessCapsules() only a single time after
EndOfDxe.

Patch #3 updates DxeCapsuleLibFmp so it does not pass down the progress
indication callback if its own attempt to invoke it has already failed.

Patch #4 updates ArmPkg's generic PlatformBootManagerLib implementation
to only call ProcessCapsules() after the [potentially non-trusted]
console is up and running, to ensure that firmware update progress can
be reported to the user.

Patch #5 modifies ArmSmcPsciResetSystemLib to emulate a proper warm reboot
by reentering PEI with interrupts, MMU and caches enabled. This works
around the lack of an architected warm reboot in most current implementations.
(The PSCI spec does cover warm reboot, but it was added recently and most
secure firmware implementations haven't caught up yet)

Note that these patches apply on top of Mike's pending changes to
DxeCapsuleLibFmp implementing progress reporting.

Ard Biesheuvel (5):
  MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data
  MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called
    once
  MdeModulePkg/DxeCapsuleLibFmp: pass progress callback only if it works
  ArmPkg/PlatformBootManagerLib: call ProcessCapsules() only once
  ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot

 ArmPkg/ArmPkg.dec                             |  4 ++
 .../ArmSmcPsciResetSystemLib.c                | 21 +++++++++-
 .../ArmSmcPsciResetSystemLib.inf              |  9 +++++
 .../PlatformBootManagerLib/PlatformBm.c       | 15 --------
 .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c  | 13 +++++--
 .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c   | 18 ++++++---
 .../Universal/CapsulePei/CapsulePei.inf       |  1 +
 .../CapsulePei/Common/CapsuleCoalesce.c       | 38 +++++++++++++------
 8 files changed, 82 insertions(+), 37 deletions(-)

-- 
2.17.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel