coreboot/src/commonlib
Sergii Dmytruk bd9370d775 drivers/efi/uefi_capsules.c: coalesce and store UEFI capsules
How it approximately works:

(During a normal system run):
1. OS puts a capsule into RAM and calls UpdateCapsule() function of EFI
   runtime
2. If applying the update requires a reboot, EFI implementation creates
   a new CapsuleUpdateData* EFI variable pointing at the beginning of
   capsules description (not data, but description of the data) and does
   a warm reboot leaving capsule data and its description in RAM to be
   picked by firmware on the next boot process

(After DEV_INIT:)
3. Capsules are discovered by checking for CapsuleUpdateData* variables
4. Capsule description in memory and capsule data is validated for
   sanity
5. Capsule data is coalesced into a continuous piece of memory

(On BS_WRITE_TABLES via dasharo_add_capsules_to_bootmem() hook:)
6. Buffer with coalesced capsules is marked as reserved

(On BS_WRITE_TABLES via lb_uefi_capsules() hook:)
7. coreboot table entry is added for each of the discovered capsules

(In UEFI payload:)
8. CapsuleUpdateData* get removed
9. coreboot table is checked for any update capsules which are then
   applied

Change-Id: I162d678ae5c504906084b59c1a8d8c26dadb9433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83422
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-08-30 15:48:25 +00:00
..
bsd commonlib/bsd: Optimize strnlen() 2024-08-19 13:25:05 +00:00
include/commonlib drivers/efi/uefi_capsules.c: coalesce and store UEFI capsules 2024-08-30 15:48:25 +00:00
storage tree: Drop unused <string.h> 2024-04-11 11:13:18 +00:00
device_tree.c commonlib/device_tree.c: Remove incorrect warning 2024-08-08 08:08:40 +00:00
fsp_relocate.c commonlib/fsp_relocate: Add PE32+ support 2024-06-21 15:49:38 +00:00
iobuf.c src/commonlib: Clean up includes 2022-10-26 16:27:10 +00:00
list.c treewide: Move list.h to commonlib 2024-02-24 11:49:46 +00:00
Makefile.mk treewide: Move device_tree to commonlib 2024-06-22 04:02:04 +00:00
mem_pool.c commonlib/mem_pool: Allow configuring the alignment 2021-11-04 10:33:52 +00:00
rational.c commonlib: Add support for rational number approximation 2022-08-03 03:26:13 +00:00
region.c region: Turn region_end() into an inclusive region_last() 2024-08-23 01:08:16 +00:00
sort.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00