efi: Capsule update support
The EFI capsule mechanism allows data blobs to be passed to the EFI
firmware. By setting the EFI_CAPSULE_POPULATE_SYSTEM_TABLE and the
EFI_CAPSULE_PERSIST_ACROSS_REBOOT flags, the firmware will place a
pointer to our data blob in the EFI System Table on the next boot. We
can get access to the array of EFI capsules when parsing the
configuration tables the next time we boot.
We can utilise this facility to save crash dumps, call traces, even file
systems in a region of memory and have them preserved by the firmware
across a reboot.
Once a capsule has been passed to the firmware, the next reboot will
always be performed using the ResetSystem() EFI runtime service, which
may involve overriding the reboot type specified by reboot=. This
ensures the reset value returned by QueryCapsuleCapabilities() is used
to reset the system, which is required for the capsule to be processed.
Cc: Andi Kleen <firstname.lastname@example.org>
Cc: Tony Luck <email@example.com>
Cc: Seiji Aguchi <firstname.lastname@example.org>
Signed-off-by: Matt Fleming <email@example.com>
11 files changed