summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_capsule.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2020-11-17 09:28:00 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-03 21:22:50 +0100
commitbb7e71d33c3ebde6e6aa2c266374cb51be14505c (patch)
tree53a0669200d56a4a5fea55b9f30bb0bb7520ae99 /lib/efi_loader/efi_capsule.c
parentf27c20148511b476b688bddf7c2322c98d9e0be2 (diff)
efi_loader: add firmware management protocol for raw image
In this commit, a very simple firmware management protocol driver is implemented. It will take a binary image in a capsule file and apply the data using dfu backend storage drivers via dfu_write_by_alt() interface. So "dfu_alt_info" variable should be properly set to specify a device and location to be updated. Please read README.dfu. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_capsule.c')
-rw-r--r--lib/efi_loader/efi_capsule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 33425b7c0e7..ea22ee79684 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -807,6 +807,14 @@ efi_status_t __weak arch_efi_load_capsule_drivers(void)
&efi_fmp_fit, NULL));
}
+ if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) {
+ handle = NULL;
+ ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
+ &efi_root,
+ &efi_guid_firmware_management_protocol,
+ &efi_fmp_raw, NULL));
+ }
+
return ret;
}