[PATCH] efi_loader: Allow capsule update on-disk without checking OsIndications

Ilias Apalodimas ilias.apalodimas at linaro.org
Tue Jun 29 09:56:57 CEST 2021


> > +	if (IS_ENABLED(CONFIG_EFI_IGNORE_OSINDICATIONS))
[...]
> > +		return true;
> > +
> > +	size = sizeof(os_indications);
> > +	ret = efi_get_variable_int(L"OsIndications", &efi_global_variable_guid,
> > +				   NULL, &size, &os_indications, NULL);
> > +	if (ret == EFI_SUCCESS &&
> > +	    (os_indications
> > +	      & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED))
> 
> The bit EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED must be
> cleared in OsIndications after successfully applying the capsule. See
> related patch

Yea I noticed that as well while I was coding this and meant to sent a patch
afterwards.  You've already done that,so let me go have a look!
> 
> [PATCH 1/1] efi_loader: fix set_capsule_result()
> https://lists.denx.de/pipermail/u-boot/2021-June/453111.html
> 
> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 
> > +		return true;
> > +
> > +	return false;
> > +}
> > +
> >   /**
> >    * efi_launch_capsule - launch capsules
> >    *
> > @@ -958,20 +985,13 @@ efi_status_t __weak efi_load_capsule_drivers(void)
> >    */
> >   efi_status_t efi_launch_capsules(void)
> >   {
> > -	u64 os_indications;
> > -	efi_uintn_t size;
> >   	struct efi_capsule_header *capsule = NULL;
> >   	u16 **files;
> >   	unsigned int nfiles, index, i;
> >   	u16 variable_name16[12];
> >   	efi_status_t ret;
> > 
> > -	size = sizeof(os_indications);
> > -	ret = efi_get_variable_int(L"OsIndications", &efi_global_variable_guid,
> > -				   NULL, &size, &os_indications, NULL);
> > -	if (ret != EFI_SUCCESS ||
> > -	    !(os_indications
> > -	      & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED))
> > +	if (!check_run_capsules())
> >   		return EFI_SUCCESS;
> > 
> >   	index = get_last_capsule();
> > 
> 


More information about the U-Boot mailing list