From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Jose Marinho <jose.marinho@arm.com>, u-boot@lists.denx.de
Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org,
takahiro.akashi@linaro.org, agraf@csgraf.de, nd@arm.com
Subject: Re: [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile
Date: Fri, 17 Dec 2021 18:26:39 +0100 [thread overview]
Message-ID: <48cc08a4-771b-968e-1fd1-0b0670466c05@gmx.de> (raw)
In-Reply-To: <20211217125506.138902-3-jose.marinho@arm.com>
On 12/17/21 13:55, Jose Marinho wrote:
> Display the EBBRv2.0 conformance in the ECPT table.
>
> The EBBRv2.0 conformance profile is set in the ECPT if
> CONFIG_EFI_EBBR_2_0_CONFORMANCE=y.
> The config defaults to 'n'.
>
>
> Signed-off-by: Jose Marinho <jose.marinho@arm.com>
> ---
> include/efi_api.h | 4 ++++
> lib/efi_loader/Kconfig | 6 ++++++
> lib/efi_loader/efi_conformance.c | 9 +++++++++
> 3 files changed, 19 insertions(+)
>
> diff --git a/include/efi_api.h b/include/efi_api.h
> index 6fd4f04de3..49919caa35 100644
> --- a/include/efi_api.h
> +++ b/include/efi_api.h
> @@ -230,6 +230,10 @@ enum efi_reset_type {
> EFI_GUID(0x36122546, 0xf7ef, 0x4c8f, 0xbd, 0x9b, \
> 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b)
>
> +#define EFI_CONFORMANCE_PROFILE_EBBR_2_0_GUID \
> + EFI_GUID(0xcce33c35, 0x74ac, 0x4087, 0xbc, 0xe7, \
> + 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27)
> +
> struct efi_conformance_profiles_table {
> u16 version;
> u16 number_of_profiles;
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index b2398976f4..ab7476f68b 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -373,4 +373,10 @@ config EFI_ECPT
> help
> Enabling this option created the ECPT UEFI table.
>
> +config EFI_EBBR_2_0_CONFORMANCE
> + bool "Add the EBBRv2.0 conformance entry to the ECPT table"
> + depends on EFI_ECPT
With this dependency the symbol EFI_EBBR_2_0_CONFORMANCE is superfluous.
Can we add EFI_EBBR_2_0_CONFORMANCE unconditionally or are there
relevant configuration flags in U-Boot that must be enabled to claim
EBBR 2.0 compliance? E.g.
* CONFIG_CMD_BOOTEFI_BOOTMGR
* CONFIG_EFI_GET_TIME
* CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT
Best regards
Heinrich
> + default n
> + help
> + Enabling this option adds the EBBRv2.0 conformance entry to the ECPT UEFI table.
> endif
> diff --git a/lib/efi_loader/efi_conformance.c b/lib/efi_loader/efi_conformance.c
> index 86c26d6b79..b490ff3326 100644
> --- a/lib/efi_loader/efi_conformance.c
> +++ b/lib/efi_loader/efi_conformance.c
> @@ -12,6 +12,7 @@
> #include <malloc.h>
>
> const efi_guid_t efi_ecpt_guid = EFI_CONFORMANCE_PROFILES_TABLE_GUID;
> +const efi_guid_t efi_ebbr_2_0_guid = EFI_CONFORMANCE_PROFILE_EBBR_2_0_GUID;
>
> #define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 1
>
> @@ -29,6 +30,9 @@ efi_status_t efi_ecpt_register(void)
>
> EFI_PRINT("ECPT table creation start\n");
>
> + if (IS_ENABLED(CONFIG_EFI_EBBR_2_0_CONFORMANCE))
> + num_entries++;
> +
> ecpt_size = num_entries * sizeof(efi_guid_t)
> + sizeof(struct efi_conformance_profiles_table);
> ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, ecpt_size,
> @@ -44,6 +48,11 @@ efi_status_t efi_ecpt_register(void)
> ecpt->version = EFI_CONFORMANCE_PROFILES_TABLE_VERSION;
> ecpt->number_of_profiles = num_entries;
>
> + if (IS_ENABLED(CONFIG_EFI_EBBR_2_0_CONFORMANCE)) {
> + num_entries--;
> + guidcpy(&ecpt->conformance_profiles[num_entries], &efi_ecpt_guid);
> + }
> +
> if (num_entries)
> EFI_PRINT("ECPT check conformance profiles, not all entries populated in table\n");
>
next prev parent reply other threads:[~2021-12-17 17:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 12:55 [PATCH 0/3] Conformance Profiles Table support in U-boot Jose Marinho
2021-12-17 12:55 ` [PATCH 1/3] efi: Create ECPT table Jose Marinho
2021-12-17 17:19 ` Heinrich Schuchardt
2021-12-23 15:01 ` Jose Marinho
2021-12-17 12:55 ` [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile Jose Marinho
2021-12-17 17:26 ` Heinrich Schuchardt [this message]
2021-12-23 14:57 ` Jose Marinho
2021-12-23 18:31 ` Heinrich Schuchardt
2021-12-31 14:36 ` Jose Marinho
2022-01-01 23:56 ` Heinrich Schuchardt
2022-08-29 23:58 ` Heinrich Schuchardt
2021-12-17 12:55 ` [PATCH 3/3] cmd: efi: efidebug print ECPT table Jose Marinho
2021-12-17 13:29 ` Heinrich Schuchardt
2021-12-17 18:07 ` Heinrich Schuchardt
2021-12-23 14:59 ` Jose Marinho
2021-12-17 18:05 ` [PATCH 0/3] Conformance Profiles Table support in U-boot Heinrich Schuchardt
2021-12-23 15:20 ` Jose Marinho
2021-12-23 18:27 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48cc08a4-771b-968e-1fd1-0b0670466c05@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=agraf@csgraf.de \
--cc=ilias.apalodimas@linaro.org \
--cc=jose.marinho@arm.com \
--cc=nd@arm.com \
--cc=sughosh.ganu@linaro.org \
--cc=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).