diff mbox series

efi_loader: adjust config options for capsule updates

Message ID 20240620201531.321110-1-ilias.apalodimas@linaro.org
State New
Headers show
Series efi_loader: adjust config options for capsule updates | expand

Commit Message

Ilias Apalodimas June 20, 2024, 8:15 p.m. UTC
EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable
at runtime is not supported and allow the platform to perform capsule
updates on disk. With the recent changes boards can conditionally enable
setvariable at runtime using EFI_RT_VOLATILE_STORE.

Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS
when set variable at runtime is disabled.

Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the
variables, allow users to ignore OsIndications even if setvariable at
runtime is enabled.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/efi_loader/Kconfig | 1 +
 1 file changed, 1 insertion(+)

--
2.43.0

Comments

Heinrich Schuchardt June 22, 2024, 4:36 p.m. UTC | #1
On 20.06.24 22:15, Ilias Apalodimas wrote:
> EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable
> at runtime is not supported and allow the platform to perform capsule
> updates on disk. With the recent changes boards can conditionally enable
> setvariable at runtime using EFI_RT_VOLATILE_STORE.
>
> Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS
> when set variable at runtime is disabled.
>
> Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the
> variables, allow users to ignore OsIndications even if setvariable at
> runtime is enabled.
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

So this v2:

v2:
	allow EFI_IGNORE_OSINDICATIONS if EFI_RT_VOLATILE_STORE=y

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>   lib/efi_loader/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index ee71f417147a..6006e845cb1f 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -220,6 +220,7 @@ config EFI_CAPSULE_ON_DISK
>   config EFI_IGNORE_OSINDICATIONS
>   	bool "Ignore OsIndications for CapsuleUpdate on-disk"
>   	depends on EFI_CAPSULE_ON_DISK
> +	default y if !EFI_RT_VOLATILE_STORE
>   	help
>   	  There are boards where U-Boot does not support SetVariable at runtime.
>   	  Select this option if you want to use the capsule-on-disk feature
> --
> 2.43.0
>
Ilias Apalodimas June 22, 2024, 4:38 p.m. UTC | #2
On Sat, 22 Jun 2024 at 19:36, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 20.06.24 22:15, Ilias Apalodimas wrote:
> > EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable
> > at runtime is not supported and allow the platform to perform capsule
> > updates on disk. With the recent changes boards can conditionally enable
> > setvariable at runtime using EFI_RT_VOLATILE_STORE.
> >
> > Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS
> > when set variable at runtime is disabled.
> >
> > Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the
> > variables, allow users to ignore OsIndications even if setvariable at
> > runtime is enabled.
> >
> > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>
> So this v2:

Yes sorry, forgot to add the tile and log...

>
> v2:
>         allow EFI_IGNORE_OSINDICATIONS if EFI_RT_VOLATILE_STORE=y
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Thanks Heinrich

>
> > ---
> >   lib/efi_loader/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> > index ee71f417147a..6006e845cb1f 100644
> > --- a/lib/efi_loader/Kconfig
> > +++ b/lib/efi_loader/Kconfig
> > @@ -220,6 +220,7 @@ config EFI_CAPSULE_ON_DISK
> >   config EFI_IGNORE_OSINDICATIONS
> >       bool "Ignore OsIndications for CapsuleUpdate on-disk"
> >       depends on EFI_CAPSULE_ON_DISK
> > +     default y if !EFI_RT_VOLATILE_STORE
> >       help
> >         There are boards where U-Boot does not support SetVariable at runtime.
> >         Select this option if you want to use the capsule-on-disk feature
> > --
> > 2.43.0
> >
>
Heinrich Schuchardt June 30, 2024, 12:22 p.m. UTC | #3
On 6/22/24 18:38, Ilias Apalodimas wrote:
> On Sat, 22 Jun 2024 at 19:36, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> On 20.06.24 22:15, Ilias Apalodimas wrote:
>>> EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable
>>> at runtime is not supported and allow the platform to perform capsule
>>> updates on disk. With the recent changes boards can conditionally enable
>>> setvariable at runtime using EFI_RT_VOLATILE_STORE.
>>>
>>> Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS
>>> when set variable at runtime is disabled.
>>>
>>> Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the
>>> variables, allow users to ignore OsIndications even if setvariable at
>>> runtime is enabled.
>>>
>>> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>>
>> So this v2:
>
> Yes sorry, forgot to add the tile and log...

With this patch I get a failure on the sandbox in the CI:

https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/21382

Without the patch the sandbox runs fine:

https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/21383

Best regards

Heinrich

>
>>
>> v2:
>>          allow EFI_IGNORE_OSINDICATIONS if EFI_RT_VOLATILE_STORE=y
>>
>> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> Thanks Heinrich
>
>>
>>> ---
>>>    lib/efi_loader/Kconfig | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
>>> index ee71f417147a..6006e845cb1f 100644
>>> --- a/lib/efi_loader/Kconfig
>>> +++ b/lib/efi_loader/Kconfig
>>> @@ -220,6 +220,7 @@ config EFI_CAPSULE_ON_DISK
>>>    config EFI_IGNORE_OSINDICATIONS
>>>        bool "Ignore OsIndications for CapsuleUpdate on-disk"
>>>        depends on EFI_CAPSULE_ON_DISK
>>> +     default y if !EFI_RT_VOLATILE_STORE
>>>        help
>>>          There are boards where U-Boot does not support SetVariable at runtime.
>>>          Select this option if you want to use the capsule-on-disk feature
>>> --
>>> 2.43.0
>>>
>>
Ilias Apalodimas June 30, 2024, 12:47 p.m. UTC | #4
Hi Heinrich,

On Sun, 30 Jun 2024 at 15:23, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 6/22/24 18:38, Ilias Apalodimas wrote:
> > On Sat, 22 Jun 2024 at 19:36, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >>
> >> On 20.06.24 22:15, Ilias Apalodimas wrote:
> >>> EFI_IGNORE_OSINDICATIONS is used to ignore OsIndications if setvariable
> >>> at runtime is not supported and allow the platform to perform capsule
> >>> updates on disk. With the recent changes boards can conditionally enable
> >>> setvariable at runtime using EFI_RT_VOLATILE_STORE.
> >>>
> >>> Let's make that visible in our Kconfigs and enable EFI_IGNORE_OSINDICATIONS
> >>> when set variable at runtime is disabled.
> >>>
> >>> Since EFI_RT_VOLATILE_STORE needs help from the OS to persist the
> >>> variables, allow users to ignore OsIndications even if setvariable at
> >>> runtime is enabled.
> >>>
> >>> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> >>
> >> So this v2:
> >
> > Yes sorry, forgot to add the tile and log...
>
> With this patch I get a failure on the sandbox in the CI:
>
> https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/21382

Yes, this test is trying to test updates with OsIndications not set
and it obviously fails, because it expects the update to stop.

I'll send a v3 and adjust the tests.

Cheers
/Ilias
>
> Without the patch the sandbox runs fine:
>
> https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/21383
>
> Best regards
>
> Heinrich
>
> >
> >>
> >> v2:
> >>          allow EFI_IGNORE_OSINDICATIONS if EFI_RT_VOLATILE_STORE=y
> >>
> >> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> >
> > Thanks Heinrich
> >
> >>
> >>> ---
> >>>    lib/efi_loader/Kconfig | 1 +
> >>>    1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> >>> index ee71f417147a..6006e845cb1f 100644
> >>> --- a/lib/efi_loader/Kconfig
> >>> +++ b/lib/efi_loader/Kconfig
> >>> @@ -220,6 +220,7 @@ config EFI_CAPSULE_ON_DISK
> >>>    config EFI_IGNORE_OSINDICATIONS
> >>>        bool "Ignore OsIndications for CapsuleUpdate on-disk"
> >>>        depends on EFI_CAPSULE_ON_DISK
> >>> +     default y if !EFI_RT_VOLATILE_STORE
> >>>        help
> >>>          There are boards where U-Boot does not support SetVariable at runtime.
> >>>          Select this option if you want to use the capsule-on-disk feature
> >>> --
> >>> 2.43.0
> >>>
> >>
>
diff mbox series

Patch

diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index ee71f417147a..6006e845cb1f 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -220,6 +220,7 @@  config EFI_CAPSULE_ON_DISK
 config EFI_IGNORE_OSINDICATIONS
 	bool "Ignore OsIndications for CapsuleUpdate on-disk"
 	depends on EFI_CAPSULE_ON_DISK
+	default y if !EFI_RT_VOLATILE_STORE
 	help
 	  There are boards where U-Boot does not support SetVariable at runtime.
 	  Select this option if you want to use the capsule-on-disk feature