[PATCH] efi_loader: Allow also empty capsule to be process

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Jul 26 14:54:34 CEST 2023


Hi Heinirch,


On Tue, 18 Jul 2023 at 18:41, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 13.07.23 16:35, Michal Simek wrote:
> > Empty capsule are also allowed to be process. Without it updated images
> > can't change their Image Acceptance state from no to yes.
>
> Is there any documentation describing the usage of empty capsule to set
> the image acceptance state?

Yes, there is. It's described here along with the relevant uuids

[0] https://gitlab.com/Linaro/trustedsubstrate/mbfw/uploads/3d0d7d11ca9874dc9115616b418aa330/mbfw.pdf
"2.3.3 OS directed FW image acceptance"

Regards
/Ilias
>
> Best regards
>
> Heinrich
>
> >
> > Signed-off-by: Michal Simek <michal.simek at amd.com>
> > ---
> >
> >   lib/efi_loader/efi_capsule.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
> > index 7a6f195cbc02..93e83e5f04c3 100644
> > --- a/lib/efi_loader/efi_capsule.c
> > +++ b/lib/efi_loader/efi_capsule.c
> > @@ -752,7 +752,8 @@ efi_status_t EFIAPI efi_update_capsule(
> >               log_debug("Capsule[%d] (guid:%pUs)\n",
> >                         i, &capsule->capsule_guid);
> >               if (!guidcmp(&capsule->capsule_guid,
> > -                          &efi_guid_firmware_management_capsule_id)) {
> > +                          &efi_guid_firmware_management_capsule_id) ||
> > +                 fwu_empty_capsule(capsule)) {
> >                       ret  = efi_capsule_update_firmware(capsule);
> >               } else {
> >                       log_err("Unsupported capsule type: %pUs\n",
>


More information about the U-Boot mailing list