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 52E94ECAAD2 for ; Mon, 29 Aug 2022 23:58:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A559849AF; Tue, 30 Aug 2022 01:58:37 +0200 (CEST) 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="OU5GeY3Y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B712849AF; Tue, 30 Aug 2022 01:58:36 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 3653284236 for ; Tue, 30 Aug 2022 01:58:33 +0200 (CEST) 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=1661817510; bh=y/jbJFzD6IvIurCTCm08zw6/DFDLWbur0xpscyFhca4=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=OU5GeY3Y6kYujHJVL49C9F5J6NGcQhIcVB/Py4pA6xc/n8u0iIcFnNmfT9v/aUVQS QamoLpOXMoymtTnX0JC4jCVCk8GCmKkX3vvyJd2j/iIhbZiRw8BQ9Qhb9kjUdKtkPi 0dXzN6M0pXYFAFdjCfMRzrGtK+QRjSapEpfHE4u4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([84.118.157.2]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N17UQ-1pQs4y2T6I-012XSA; Tue, 30 Aug 2022 01:58:30 +0200 Message-ID: <73d4a41f-dff2-53ee-e6ba-a6a0fc28dc5b@gmx.de> Date: Tue, 30 Aug 2022 01:58:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile From: Heinrich Schuchardt To: Jose Marinho Cc: "ilias.apalodimas@linaro.org" , "sughosh.ganu@linaro.org" , "takahiro.akashi@linaro.org" , "agraf@csgraf.de" , nd , "u-boot@lists.denx.de" References: <20211217125506.138902-1-jose.marinho@arm.com> <20211217125506.138902-3-jose.marinho@arm.com> <48cc08a4-771b-968e-1fd1-0b0670466c05@gmx.de> <1593333c-d3ba-2e5a-f11a-022cea21a316@gmx.de> Content-Language: en-US In-Reply-To: <1593333c-d3ba-2e5a-f11a-022cea21a316@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:bQsiOmJv6RNhCelOEdQiBn2mJ2PESxgKBjgXWaXqIU3gsRq1Lxe ibM/jfk8Ic8GANoXJgJhMfexHSN0R+YeGisIzM2UiA5y2Y1mcE+DwLiAbG70TatjKsk7/ZW uO9qVZKzIivW1AxWtIRO3PP/3VUImNHFIPRJCsFJZl5J1kZm+nfyOVGv2HAMp1XH7hT3tpe u37Mw/L0aQA/9VNUO9c8g== X-UI-Out-Filterresults: notjunk:1;V03:K0:W6BuzlfJDzc=:pnN60ADF1tKcGxPISz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iELbjm5BDJSgB5AbSxaXXnwxYDNojvOdoFsx JcfegnGuRrbFIVk+m76IRUPx4Gx/Lx1KpN3lxMGltWSmR6RLofR65s8SQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On 1/2/22 00:56, Heinrich Schuchardt wrote: > > > On 12/31/21 15:36, Jose Marinho wrote: >> Hi Heinrich, >> >>> -----Original Message----- >>> From: Heinrich Schuchardt >>> Sent: 23 December 2021 18:32 >>> 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 >>> Subject: Re: [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile >>> >>> On 12/23/21 15:57, Jose Marinho wrote: >>>> Hi Heinrich, >>>> >>>> Thank you for your reviews. >>>> >>>>> -----Original Message----- >>>>> From: Heinrich Schuchardt >>>>> Sent: 17 December 2021 17:27 >>>>> 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 >>>>> Subject: Re: [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile >>>>> >>>>> 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=3Dy. >>>>>> The config defaults to 'n'. >>>>>> >>>>>> >>>>>> Signed-off-by: Jose Marinho >>>>>> --- >>>>>> =C2=A0=C2=A0=C2=A0 include/efi_api.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 4 ++++ >>>>>> =C2=A0=C2=A0=C2=A0 lib/efi_loader/Kconfig=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 6 ++++++ >>>>>> =C2=A0=C2=A0=C2=A0 lib/efi_loader/efi_conformance.c | 9 +++++++++ >>>>>> =C2=A0=C2=A0=C2=A0 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 { >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 EFI_GUID(0x36122546, 0xf= 7ef, 0x4c8f, 0xbd, 0x9b, \ >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b) >>>>>> >>>>>> +#define EFI_CONFORMANCE_PROFILE_EBBR_2_0_GUID \ >>>>>> +=C2=A0=C2=A0=C2=A0 EFI_GUID(0xcce33c35, 0x74ac, 0x4087, 0xbc, 0xe7= , \ >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0x8b, 0x29, 0xb0,= 0x2e, 0xeb, 0x27) >>>>>> + >>>>>> =C2=A0=C2=A0=C2=A0 struct efi_conformance_profiles_table { >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 u16 version; >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 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 >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 help >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Enabling thi= s option created the ECPT UEFI table. >>>>>> >>>>>> +config EFI_EBBR_2_0_CONFORMANCE >>>>>> +=C2=A0=C2=A0=C2=A0 bool "Add the EBBRv2.0 conformance entry to the= ECPT table" >>>>>> +=C2=A0=C2=A0=C2=A0 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 >>>>> >>>> I've removed the "depends on" in PATCH v2. >>>> Ideally the EFI_EBBR_2_0_CONFORMANCE should depend on all the >>> CONFIGS required by EBBR 2.0. >>>> I'm not sure whether this is feasible, i.e. whether there is a set of >>> CONFIGS_* which when enabled make the implementation EBBRv2.0 >>> compliant. >>>> Also, as the u-boot code evolves, these dependencies would need to be >>> carefully maintained perhaps. >>>> >>>> Perhaps the best choice is to let the FW provider to set >>> EBBR_2_0_CONFORMANCE in the platform config file once the FW has been >>> deemed EBBRv2.0 compliant. >>> >>> The firmware provider is the U-Boot project. If we do not know under >>> which >>> circumstances we might add the EBBR 2.0 conformance GUID, I prefer >>> not to >>> implement the table at all. >>> >> The EBBR 2.0 conformance GUID can be an entry in the ECPT when the FW >> is EBBR v2.0 compliant. >> The FW compliance with EBBRv2.0 can be determined by running the EBBR >> ACS (obtainable from https://github.com/ARM-software/bbr-acs). >> Should we state this in the commit message, or perhaps as a comment in >> Config definition? In any case, the GUID inclusion criteria in the >> ECPT is not ambiguous. >> >> If we were to determine the EBBR2.0 GUID inclusion as a function of >> other u-boot configs, we'd potentially unnecessarily complicate the >> ECPT implementation in u-boot and also generate a maintenance burden >> as the codebase evolves. > > As the implementation of the EFI_HII_DATABASE_PROTOCOL in U-Boot does > not pass the SCT U-Boot does not comply to EBBR 2.0. > > I see no use case for the ECPT table. UEFI 2.10 now has defined the EFI_CONFORMANCE_PROFILE_TABLE. But it does not provide a GUID for EBBR. EBBR does not define one either. I have created https://github.com/ARM-software/ebbr/issues/95. Once the EBBR community agrees on a GUID we can add the table. Best regards Heinrich > > Best regards > > Heinrich > >> >>> Best regards >>> >>> Heinrich >>> >>>>> >>>>>> +=C2=A0=C2=A0=C2=A0 default n >>>>>> +=C2=A0=C2=A0=C2=A0 help >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Enabling this option adds the EBBRv= 2.0 conformance entry to >>>>>> the >>>>> ECPT UEFI table. >>>>>> =C2=A0=C2=A0=C2=A0 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 @@ >>>>>> =C2=A0=C2=A0=C2=A0 #include >>>>>> >>>>>> =C2=A0=C2=A0=C2=A0 const efi_guid_t efi_ecpt_guid =3D >>>>>> EFI_CONFORMANCE_PROFILES_TABLE_GUID; >>>>>> +const efi_guid_t efi_ebbr_2_0_guid =3D >>>>>> +EFI_CONFORMANCE_PROFILE_EBBR_2_0_GUID; >>>>>> >>>>>> =C2=A0=C2=A0=C2=A0 #define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 1 >>>>>> >>>>>> @@ -29,6 +30,9 @@ efi_status_t efi_ecpt_register(void) >>>>>> >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 EFI_PRINT("ECPT table cr= eation start\n"); >>>>>> >>>>>> +=C2=A0=C2=A0=C2=A0 if (IS_ENABLED(CONFIG_EFI_EBBR_2_0_CONFORMANCE)= ) >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num_entries++; >>>>>> + >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ecpt_size =3D num_entrie= s * sizeof(efi_guid_t) >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = + sizeof(struct efi_conformance_profiles_table); >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D efi_allocate_poo= l(EFI_BOOT_SERVICES_DATA, ecpt_size, >>>>>> @@ - >>>>> 44,6 >>>>>> +48,11 @@ efi_status_t efi_ecpt_register(void) >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ecpt->version =3D EFI_CO= NFORMANCE_PROFILES_TABLE_VERSION; >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ecpt->number_of_profiles= =3D num_entries; >>>>>> >>>>>> +=C2=A0=C2=A0=C2=A0 if (IS_ENABLED(CONFIG_EFI_EBBR_2_0_CONFORMANCE)= ) { >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num_entries--; >>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 guidcpy(&ecpt->conforma= nce_profiles[num_entries], >>>>> &efi_ecpt_guid); >>>>>> +=C2=A0=C2=A0=C2=A0 } >>>>>> + >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (num_entries) >>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = EFI_PRINT("ECPT check conformance profiles, not all >>>>>> entries >>>>>> populated in table\n"); >>>>>> >>>> >>