From: Jose Marinho <Jose.Marinho@arm.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: "ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
"sughosh.ganu@linaro.org" <sughosh.ganu@linaro.org>,
"takahiro.akashi@linaro.org" <takahiro.akashi@linaro.org>,
"agraf@csgraf.de" <agraf@csgraf.de>, nd <nd@arm.com>
Subject: RE: [PATCH 3/3] cmd: efi: efidebug print ECPT table
Date: Thu, 23 Dec 2021 14:59:09 +0000 [thread overview]
Message-ID: <DBBPR08MB60123593B4802D0C014280CC887E9@DBBPR08MB6012.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <7108064f-e169-fe83-105e-998641dd3132@gmx.de>
Hi Heinrich,
I dropped the ECPT print in efidebug in PATCH v2. Additionally I've introduced an efi selftet.
Regards,
Jose
> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: 17 December 2021 18:07
> 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 <nd@arm.com>
> Subject: Re: [PATCH 3/3] cmd: efi: efidebug print ECPT table
>
> On 12/17/21 13:55, Jose Marinho wrote:
> > Signed-off-by: Jose Marinho <jose.marinho@arm.com>
> > ---
> > cmd/efidebug.c | 41
> +++++++++++++++++++++++++++++++++++++++++
> > include/efi_loader.h | 2 ++
> > 2 files changed, 43 insertions(+)
> >
> > diff --git a/cmd/efidebug.c b/cmd/efidebug.c index
> > a53a5029fa..c3246e1820 100644
> > --- a/cmd/efidebug.c
> > +++ b/cmd/efidebug.c
> > @@ -889,6 +889,38 @@ static int do_efi_show_tables(struct cmd_tbl
> *cmdtp, int flag,
> > return CMD_RET_SUCCESS;
> > }
> >
> > +#ifdef CONFIG_EFI_ECPT
> > +static int do_efi_ecpt(struct cmd_tbl *cmdtp, int flag,
> > + int argc, char * const argv[]) {
> > + struct efi_conformance_profiles_table *ecpt;
> > +
> > + if (argc != 1)
> > + return CMD_RET_USAGE;
> > +
> > + for (int idx = 0; idx < systab.nr_tables; idx++)
> > + if (!guidcmp(&efi_ecpt_guid, &systab.tables[idx].guid))
> > + ecpt = (struct efi_system_resource_table
> > +*)systab.tables[idx].table;
> > +
> > + if (!ecpt) {
> > + log_info("ECPT: table not present\n");
> > + return CMD_RET_SUCCESS;
> > + }
> > +
> > + const int num_profiles = ecpt->number_of_profiles;
> > +
> > + printf("========================================\n");
> > + printf("ECPT: version:%d\n", ecpt->version);
> > + printf("ECPT: num profiles:%d\n", num_profiles);
> > +
> > + for (int i = 0; i < num_profiles; i++)
> > + printf("ECPT: profile %d = %pUL\n", i, &ecpt-
> >conformance_profiles[i]);
> > + printf("========================================\n");
> > +
> > + return CMD_RET_SUCCESS;
> > +}
> > +#endif /* CONFIG_EFI_ECPT */
> > +
> > /**
> > * create_initrd_dp() - Create a special device for our Boot### option
> > *
> > @@ -1681,6 +1713,11 @@ static struct cmd_tbl cmd_efidebug_sub[] = {
> > "", ""),
> > U_BOOT_CMD_MKENT(query, CONFIG_SYS_MAXARGS, 1,
> do_efi_query_info,
> > "", ""),
> > +#ifdef CONFIG_EFI_ECPT
> > + U_BOOT_CMD_MKENT(ecpt, CONFIG_SYS_MAXARGS, 1,
> do_efi_ecpt,
> > + "", ""),
> > +#endif
> > +
> > };
> >
> > /**
> > @@ -1769,6 +1806,10 @@ static char efidebug_help_text[] =
> > " - show UEFI memory map\n"
> > "efidebug tables\n"
> > " - show UEFI configuration tables\n"
> > +#ifdef CONFIG_EFI_ECPT
> > + "efidebug ecpt\n"
> > + " - show UEFI conformance profiles table\n"
> > +#endif
> > #ifdef CONFIG_CMD_BOOTEFI_BOOTMGR
> > "efidebug test bootmgr\n"
> > " - run simple bootmgr for test\n"
> > diff --git a/include/efi_loader.h b/include/efi_loader.h index
> > d20ff396d0..d60a340136 100644
> > --- a/include/efi_loader.h
> > +++ b/include/efi_loader.h
> > @@ -310,6 +310,8 @@ extern const efi_guid_t
> efi_guid_firmware_management_protocol;
> > extern const efi_guid_t efi_esrt_guid;
> > /* GUID of the SMBIOS table */
> > extern const efi_guid_t smbios_guid;
> > +/* GUID for the ECPT */
> > +extern const efi_guid_t efi_ecpt_guid;
> >
> > extern char __efi_runtime_start[], __efi_runtime_stop[];
> > extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[];
>
> Our interest is to keep the U-Boot binary size small. I see no need to print the
> ECPT table.
>
> What make more sense is a unit test that checks the consistency of the table.
>
> Best regards
>
> Heinrich
next prev parent reply other threads:[~2021-12-23 14:59 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
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 [this message]
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=DBBPR08MB60123593B4802D0C014280CC887E9@DBBPR08MB6012.eurprd08.prod.outlook.com \
--to=jose.marinho@arm.com \
--cc=agraf@csgraf.de \
--cc=ilias.apalodimas@linaro.org \
--cc=nd@arm.com \
--cc=sughosh.ganu@linaro.org \
--cc=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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).