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 0C72AC433F5 for ; Sat, 1 Jan 2022 23:56:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 574DC81277; Sun, 2 Jan 2022 00:56:35 +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="C5FPI0VN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBDC580D1C; Sun, 2 Jan 2022 00:56:33 +0100 (CET) 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 549178141E for ; Sun, 2 Jan 2022 00:56:30 +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=1641081386; bh=1YrCj2OUcxMc8CdG3bMWYjjddSSq78x5ZhkBI/9ZwXo=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=C5FPI0VNwHfZ6OOHbTOaG445xA07Yu4kwVRh9BS8sh/LzEl6yiVZrJLv88Hz2AzzW Nx/88GL85+QiXTBujt+H0pF+ZlW0faI4EAPcS+A7L+5AD0MIhS6d21PZTxhuQcyygd mimARqgVQ7cpBcXHDv8Jci5zIKAwJgKsjRQOh380= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([88.152.144.157]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhD2Y-1mQdjc1fnO-00ePWo; Sun, 02 Jan 2022 00:56:26 +0100 Message-ID: <1593333c-d3ba-2e5a-f11a-022cea21a316@gmx.de> Date: Sun, 2 Jan 2022 00:56:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 2/3] efi: ECPT add EBBRv2.0 conformance profile Content-Language: en-US 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> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Cqinp2ftRGQ6G2HiQ3kNDwcRU6aij8bYz/4IKnF0PQcgQUvHgso sjRUJ4+yTewDI13UKamZoBLujnMjRaj2hZYq88P+UvD7NN3JAYAtzZF/5UaOFfB0alSXCnK /LOQ294IiOnH/tYGtrfRNS5tglrPAVQyEtdyE17g+g8qV7ln5NrIEXCD9U9fCKRBRzLEIxn te0n08Vtr2CP9/8i4WhBA== X-UI-Out-Filterresults: notjunk:1;V03:K0:69+Ppfm2RSs=:I1C1m+kPg+2YyanwrTsOg0 5CpfJmsjNybi4p0Rh0XwxbrBaM5oLRDN2Z0QIVckS1lS3/wo+393rgjbo7QrwoNaMJz4T/mlN S7/sftl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x.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 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 >>>>> --- >>>>> 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 >>>> >>> 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 wh= ich >> 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 AC= S (obtainable from https://github.com/ARM-software/bbr-acs). > Should we state this in the commit message, or perhaps as a comment in C= onfig 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 othe= r u-boot configs, we'd potentially unnecessarily complicate the ECPT imple= mentation 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. Best regards Heinrich > >> 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 >>>>> >>>>> 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; >>>>> >>>>> #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 =3D num_entries * sizeof(efi_guid_t) >>>>> + sizeof(struct efi_conformance_profiles_table); >>>>> ret =3D efi_allocate_pool(EFI_BOOT_SERVICES_DATA, ecpt_size, @@= - >>>> 44,6 >>>>> +48,11 @@ efi_status_t efi_ecpt_register(void) >>>>> ecpt->version =3D EFI_CONFORMANCE_PROFILES_TABLE_VERSION; >>>>> ecpt->number_of_profiles =3D 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"); >>>>> >>> >