efi_loader: Make efi_load_capsule_drivers() available even if EFI_CAPSULE_ON_DISK=n
Make efi_load_capsule_drivers() available even if EFI_CAPSULE_ON_DISK is disabled because the caller (efi_init_obj_list()) expects it only relays on EFI_HAVE_CAPSULE_SUPPORT. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
4cd1fca361
commit
39bdf11580
@@ -619,6 +619,36 @@ out:
|
|||||||
return EFI_EXIT(ret);
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* efi_load_capsule_drivers - initialize capsule drivers
|
||||||
|
*
|
||||||
|
* Generic FMP drivers backed by DFU
|
||||||
|
*
|
||||||
|
* Return: status code
|
||||||
|
*/
|
||||||
|
efi_status_t __weak efi_load_capsule_drivers(void)
|
||||||
|
{
|
||||||
|
__maybe_unused efi_handle_t handle;
|
||||||
|
efi_status_t ret = EFI_SUCCESS;
|
||||||
|
|
||||||
|
if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_FIT)) {
|
||||||
|
handle = NULL;
|
||||||
|
ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
|
||||||
|
&handle, &efi_guid_firmware_management_protocol,
|
||||||
|
&efi_fmp_fit, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) {
|
||||||
|
handle = NULL;
|
||||||
|
ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
|
||||||
|
&handle,
|
||||||
|
&efi_guid_firmware_management_protocol,
|
||||||
|
&efi_fmp_raw, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_EFI_CAPSULE_ON_DISK
|
#ifdef CONFIG_EFI_CAPSULE_ON_DISK
|
||||||
/**
|
/**
|
||||||
* get_dp_device - retrieve a device path from boot variable
|
* get_dp_device - retrieve a device path from boot variable
|
||||||
@@ -1014,36 +1044,6 @@ static void efi_capsule_scan_done(void)
|
|||||||
bootdev_root = NULL;
|
bootdev_root = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* efi_load_capsule_drivers - initialize capsule drivers
|
|
||||||
*
|
|
||||||
* Generic FMP drivers backed by DFU
|
|
||||||
*
|
|
||||||
* Return: status code
|
|
||||||
*/
|
|
||||||
efi_status_t __weak efi_load_capsule_drivers(void)
|
|
||||||
{
|
|
||||||
__maybe_unused efi_handle_t handle;
|
|
||||||
efi_status_t ret = EFI_SUCCESS;
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_FIT)) {
|
|
||||||
handle = NULL;
|
|
||||||
ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
|
|
||||||
&handle, &efi_guid_firmware_management_protocol,
|
|
||||||
&efi_fmp_fit, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) {
|
|
||||||
handle = NULL;
|
|
||||||
ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
|
|
||||||
&handle,
|
|
||||||
&efi_guid_firmware_management_protocol,
|
|
||||||
&efi_fmp_raw, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check_run_capsules() - check whether capsule update should run
|
* check_run_capsules() - check whether capsule update should run
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user