diff mbox series

[RFC,01/14] efi_loader: define OsIndicationsSupported flags

Message ID 20200317021247.5849-2-takahiro.akashi@linaro.org
State Accepted
Commit 7cceef7bde3d78dbd0f85794fbda0c431bac39c0
Headers show
Series efi_loader: add capsule update support | expand

Commit Message

AKASHI Takahiro March 17, 2020, 2:12 a.m. UTC
These flags are expected to be set in OsIndicationsSupported variable
if corresponding features are supported. See UEFI specification,
section 8.5.4.

In particular, capsule-related flags will be used in my capsule
update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 include/efi_api.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Heinrich Schuchardt March 17, 2020, 7:03 a.m. UTC | #1
On 3/17/20 3:12 AM, AKASHI Takahiro wrote:
> These flags are expected to be set in OsIndicationsSupported variable
> if corresponding features are supported. See UEFI specification,
> section 8.5.4.
>
> In particular, capsule-related flags will be used in my capsule
> update patch.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> ---
>   include/efi_api.h | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/include/efi_api.h b/include/efi_api.h
> index 22396172e15f..73c0722b0168 100644
> --- a/include/efi_api.h
> +++ b/include/efi_api.h
> @@ -57,6 +57,17 @@ typedef u16 efi_form_id_t;
>
>   struct efi_event;
>
> +/* OsIndicationsSupported flags */
> +#define EFI_OS_INDICATIONS_BOOT_TO_RW_UI		0x0000000000000001
This is called
EFI_OS_INDICATIONS_BOOT_TO_FW_UI
in the spec.

Otherwise

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

> +#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION		0x0000000000000002
> +#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
> +							0x0000000000000004
> +#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED	0x0000000000000008
> +#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED	0x0000000000000010
> +#define EFI_OS_INDICATIONS_START_OS_RECOVERY		0x0000000000000020
> +#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY	0x0000000000000040
> +#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH	0x0000000000000080
> +
>   /* EFI Boot Services table */
>   #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
>   struct efi_boot_services {
>
AKASHI Takahiro March 18, 2020, 1:18 a.m. UTC | #2
On Tue, Mar 17, 2020 at 08:03:21AM +0100, Heinrich Schuchardt wrote:
> On 3/17/20 3:12 AM, AKASHI Takahiro wrote:
> > These flags are expected to be set in OsIndicationsSupported variable
> > if corresponding features are supported. See UEFI specification,
> > section 8.5.4.
> > 
> > In particular, capsule-related flags will be used in my capsule
> > update patch.
> > 
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> > ---
> >   include/efi_api.h | 11 +++++++++++
> >   1 file changed, 11 insertions(+)
> > 
> > diff --git a/include/efi_api.h b/include/efi_api.h
> > index 22396172e15f..73c0722b0168 100644
> > --- a/include/efi_api.h
> > +++ b/include/efi_api.h
> > @@ -57,6 +57,17 @@ typedef u16 efi_form_id_t;
> > 
> >   struct efi_event;
> > 
> > +/* OsIndicationsSupported flags */
> > +#define EFI_OS_INDICATIONS_BOOT_TO_RW_UI		0x0000000000000001
> This is called
> EFI_OS_INDICATIONS_BOOT_TO_FW_UI
> in the spec.

Yes, it's a typo.

Thanks,
-Takahiro Akashi

> 
> Otherwise
> 
> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 
> > +#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION		0x0000000000000002
> > +#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
> > +							0x0000000000000004
> > +#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED	0x0000000000000008
> > +#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED	0x0000000000000010
> > +#define EFI_OS_INDICATIONS_START_OS_RECOVERY		0x0000000000000020
> > +#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY	0x0000000000000040
> > +#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH	0x0000000000000080
> > +
> >   /* EFI Boot Services table */
> >   #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
> >   struct efi_boot_services {
> > 
>
Heinrich Schuchardt March 18, 2020, 6:01 p.m. UTC | #3
On 3/18/20 2:18 AM, AKASHI Takahiro wrote:
> On Tue, Mar 17, 2020 at 08:03:21AM +0100, Heinrich Schuchardt wrote:
>> On 3/17/20 3:12 AM, AKASHI Takahiro wrote:
>>> These flags are expected to be set in OsIndicationsSupported variable
>>> if corresponding features are supported. See UEFI specification,
>>> section 8.5.4.
>>>
>>> In particular, capsule-related flags will be used in my capsule
>>> update patch.
>>>
>>> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
>>> ---
>>>    include/efi_api.h | 11 +++++++++++
>>>    1 file changed, 11 insertions(+)
>>>
>>> diff --git a/include/efi_api.h b/include/efi_api.h
>>> index 22396172e15f..73c0722b0168 100644
>>> --- a/include/efi_api.h
>>> +++ b/include/efi_api.h
>>> @@ -57,6 +57,17 @@ typedef u16 efi_form_id_t;
>>>
>>>    struct efi_event;
>>>
>>> +/* OsIndicationsSupported flags */
>>> +#define EFI_OS_INDICATIONS_BOOT_TO_RW_UI		0x0000000000000001
>> This is called
>> EFI_OS_INDICATIONS_BOOT_TO_FW_UI
>> in the spec.
>
> Yes, it's a typo.
>
> Thanks,
> -Takahiro Akashi

Corrected and merged into u-boot/master.

Best regards

Heinrich
diff mbox series

Patch

diff --git a/include/efi_api.h b/include/efi_api.h
index 22396172e15f..73c0722b0168 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -57,6 +57,17 @@  typedef u16 efi_form_id_t;
 
 struct efi_event;
 
+/* OsIndicationsSupported flags */
+#define EFI_OS_INDICATIONS_BOOT_TO_RW_UI		0x0000000000000001
+#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION		0x0000000000000002
+#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
+							0x0000000000000004
+#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED	0x0000000000000008
+#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED	0x0000000000000010
+#define EFI_OS_INDICATIONS_START_OS_RECOVERY		0x0000000000000020
+#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY	0x0000000000000040
+#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH	0x0000000000000080
+
 /* EFI Boot Services table */
 #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
 struct efi_boot_services {