From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00F26C433EF for ; Fri, 17 Dec 2021 13:29:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4122183007; Fri, 17 Dec 2021 14:29:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="I0fnx9Pp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D6308303B; Fri, 17 Dec 2021 14:29:34 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D91D80031 for ; Fri, 17 Dec 2021 14:29:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1639747767; bh=DBoL+dZ4QEGP1/WAaTrnsJmfTDaTJzoUkICHSfqMKvA=; h=X-UI-Sender-Class:Date:From:To:CC:Subject:In-Reply-To:References; b=I0fnx9PpHfDfR5deXNIYmF3yE3FiEqruTAtlAl8dVjbDRm5BeL0Vbif0ivUNMQ+yR aKyT33CsoK3oETjdAJ36hRFl4b9VXOcSOZ5KsGAeo2tZddmVIH7sqHVYhjTuvroX5p MtpfPXVuQLf8xlqLtzPg/MbTzmihwgIpdzD/QuGM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [127.0.0.1] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MAONd-1mo5LY2LKF-00Buoe; Fri, 17 Dec 2021 14:29:27 +0100 Date: Fri, 17 Dec 2021 14:29:27 +0100 From: Heinrich Schuchardt To: Jose Marinho , 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 3/3] cmd: efi: efidebug print ECPT table User-Agent: K-9 Mail for Android In-Reply-To: <20211217125506.138902-4-jose.marinho@arm.com> References: <20211217125506.138902-1-jose.marinho@arm.com> <20211217125506.138902-4-jose.marinho@arm.com> Message-ID: <6162FF69-3064-4242-9349-95692A6E6302@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:oDzRvDiRIReRKn167Nt+4VclmqOWuOAGC7oOFO8eiPETS2/G71L VKu/K+2QzsClP4tfpakkk4gG6g5kSDVCFyDz+UL3Bi0HpZ4J59+7NoieKvZ8GpEZCiqU1y2 dicnSo4mLe50SAqDx4vVGUbVek0YvDrIjJYCIYHzYh1Fk7I53yU6IGQfj4OqoQix6kKISa1 Lh24eTQmwqhSZtFU513SA== X-UI-Out-Filterresults: notjunk:1;V03:K0:9ySJv/um0o8=:QRWJbKb+09SwhqltbOcyM7 KZq2TSizRfTvNznxUZE/PB+s8iEN9DmM2I79j6ui3vCA64FRNhVxeo08MRUdemkZvNVh0SjEu GYSK91mPDlutAMKT1ZsKcfzAwPC6mT44wX5p3XPe0grG91AocF0XM8QCUU6opW3QtODVirOE1 8aoy9Z1Z4Q7rY6EbWm1gLemszuIkyMlwh4NRv5PyMscouKjB4W2N+uVnm0J2DDLJ7oyfgwSiY XSTtKlirhZ3tS+0EI+en0xa94n8sFZrbs4gnOFJdCFeS7hNZ+pwIk9dteR8rwdSYNGZ89m6Vz B2Iybg4p+T7N6lcYhLA0i1rrir8OFiFdRqAXzIpOqJadvSEQ1Dm8ILh2zNxd4jsnSeT3nMXp0 uf/NG/yCxPcb8AT3XjNXay0SI5spo3dQuZP5ddDc7qmw1eTbxTOcfe5D7sjd5/eGTjeGuTKV5 D5piQImM4on4NTaMH4q0YBrKHedWuzPPRFWd3bua96dKwfJSBNmwZAjgcR035c2jOpWQ/d8n4 SBq2sNMV3s178WIEQBxXz6Z20Ho/75x3fF4X93ru9qtQ8B4oOf+2ukOIFfceTfoR3myXIA+xL 0GzV3LaTOrk0B3ZdW6HY0B8yYH4AFx4RuAgI38dWilJvIAC09L6HYVF1Daw5XsmoTHuySTz7n u5MTr3RFytR5AS7Pxx6CCrmsmwPryS0M3g0/srnjuImOr1BFsHYfRrq9cse7eQARM2fS/O8Ei Gyf5hm43HodnsrjpT+pM9nLKWMCWc6ZhST3Fx59xGVZmSTJTciR/NZes2G6BN/M8c6/01cLAp wnXumxzS2YRokNdj+wNTPiAmh0qSzKkdCHuYQZ0WZXfF7qqxTNkGs+1m4TtjPNbbJp5ojAdXo BmYelinTGxtzEse6cF0ntmFFE3eGaDHSZAFDcy1Wvj/FJ20pLl3vXM5Jc2spTjS+yFUjgb9Bt xyJSLWtFcSE2aGxmxqi/RAdtONoTCF2bsC0uDOBf7uk501W2boyVGntLN2Z8JFNdujjDXlHuC Brd1Kknbe4ZIFcqtqHsxkE9oNhqAxEoYTNp9q0/dB8cH3McaANGbikULAu3KzNCgH36+U121K 3U37aBAm/Wk2YU= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Am 17=2E Dezember 2021 13:55:06 MEZ schrieb Jose Marinho : >Signed-off-by: Jose Marinho Please, provide a commit message=2E Best regards Heinrich >--- > cmd/efidebug=2Ec | 41 +++++++++++++++++++++++++++++++++++++++++ > include/efi_loader=2Eh | 2 ++ > 2 files changed, 43 insertions(+) > >diff --git a/cmd/efidebug=2Ec b/cmd/efidebug=2Ec >index a53a5029fa=2E=2Ec3246e1820 100644 >--- a/cmd/efidebug=2Ec >+++ b/cmd/efidebug=2Ec >@@ -889,6 +889,38 @@ static int do_efi_show_tables(struct cmd_tbl *cmdtp,= int flag, > return CMD_RET_SUCCESS; > } >=20 >+#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 !=3D 1) >+ return CMD_RET_USAGE; >+ >+ for (int idx =3D 0; idx < systab=2Enr_tables; idx++) >+ if (!guidcmp(&efi_ecpt_guid, &systab=2Etables[idx]=2Eguid)) >+ ecpt =3D (struct efi_system_resource_table *)systab=2Etables[idx]=2Et= able; >+ >+ if (!ecpt) { >+ log_info("ECPT: table not present\n"); >+ return CMD_RET_SUCCESS; >+ } >+ >+ const int num_profiles =3D ecpt->number_of_profiles; >+ >+ printf("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"); >+ printf("ECPT: version:%d\n", ecpt->version); >+ printf("ECPT: num profiles:%d\n", num_profiles); >+ >+ for (int i =3D 0; i < num_profiles; i++) >+ printf("ECPT: profile %d =3D %pUL\n", i, &ecpt->conformance_profiles[i= ]); >+ printf("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\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[] =3D { > "", ""), > 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 >+ > }; >=20 > /** >@@ -1769,6 +1806,10 @@ static char efidebug_help_text[] =3D > " - 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=2Eh b/include/efi_loader=2Eh >index d20ff396d0=2E=2Ed60a340136 100644 >--- a/include/efi_loader=2Eh >+++ b/include/efi_loader=2Eh >@@ -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; >=20 > extern char __efi_runtime_start[], __efi_runtime_stop[]; > extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[];