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 1380FC433EF for ; Thu, 23 Dec 2021 18:31:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18110830D9; Thu, 23 Dec 2021 19:31:51 +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="O/CEt30N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 02CEE83112; Thu, 23 Dec 2021 19:31:49 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 8421880379 for ; Thu, 23 Dec 2021 19:31:45 +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=1640284301; bh=u3x/uGTjgUpGNuIe/7tHqJJgnYGxubewrAaS88rnGL8=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=O/CEt30Na+POkLGawCrX0pRjfzyIjXUcY2h1L4x8vIQUAaG8pvnARoup7AIY4C2xM NOyOa2LfJ63bVC3K8cctKkR1cTuktF0prcPF62oNYqvFHycHnhh1BE71WTqGOADaCR 7+ABabEsluo2PZCh/hCH/4eLLmPV9JwMFksL+WSk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWRRT-1mz5KI0omJ-00Xsll; Thu, 23 Dec 2021 19:31:41 +0100 Message-ID: Date: Thu, 23 Dec 2021 19:31:40 +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 , "u-boot@lists.denx.de" Cc: "ilias.apalodimas@linaro.org" , "sughosh.ganu@linaro.org" , "takahiro.akashi@linaro.org" , "agraf@csgraf.de" , nd 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:Qzlr9k7q+UZtB7KDKECQ0jKgJAJquUSWh91m6JjNImysDnTZAED oOTbcsFL+No/TA9e9dH1LsEY3AT036n733gze0LDZCJtiooH3UY8BuVO8rUfJdy9D2uJU9Q +Fe52RtEmQ4LvUuzqx5heCkrtpRzVQVNYrzvOjuAXw8QvVwhTIgdNvcsfOXvmDD58LDz5aS 8AklAER1tbYurdqIfrW3g== X-UI-Out-Filterresults: notjunk:1;V03:K0:gTAiwQ7qHKI=:Rhx8eYZXda9OBmtmOzorA5 5G3TnXHlsBANiCHFXm1EI8pcfKGhnYCw7R4hcnkxN/8gfPzfLrQ0FJW7v8OzhkNM/mKW27WwS d9t7UwVK1PuGP7+TvuGrJIVonZlmOiH4S3OcXRReARZ185hETkk45oWR3NE6pmsirIpXP6frh Ii2BFhWVekk6wv3rJNatCLVP/Lzl6kDJJrMq97T6LaKDOESjDWPQgErxjfjb9+aIrQqEaq4Cs oh4p1/DXWU7/YX+It4DT2g2x9x1/UK/x9hGQsWfillcgiJowGhVDHOm3LcbWjmbt3zh25jtOz Qok1viSUapGc7rdfLAl6Dki/t6cRjXwKmnx+T05DbNDKXd8GLwKJYJ0TusJIhsKIKFQKFffRU fQwEAtLuDzpfmuiH5utA7yUQpFL6WVqbMwewv+RdaHUwDFGMwK0w52jfGm54hVyKaZMWXTLNK b/ttdHlVjzvtZ8r2HAD3vLVLCw3SF7vN/TLbwl7bX2J/4Gi6dEFFuzGzG5Ek10nG+NCVhvNK4 Xfk1onT9K1DO6PCFCjPoBsu2VdM11a4yD+rAdki1JyzBvI2ByPyeo/vreAy/t0ljprMuBUw+i tmNdTeCsWVip/YHOUJst/NYVUIK6pntoCRLdslQDVOdpCGuyvvKFDERQkqT5oaTUbB34yPfvR IX2k1YLSAWDME9Ib3uKqax6W6sSU8t3pH+LZjCUSbnrMLEw6hRLcUp4q1sWGJVmjx7oJTtFjC fGftmfJFiLqFamSCGqNCwxJcUX+DjN+nAIS8EcAZ+EA5qO6/7HsHhBbXmN+TbaSGKSk0C+8sj MQ2xFwQ+o3bfVtMo++4Fx1kFRehfiwIQQXvA/ykP9Bk1oet8obi477HS9llJ+T1GuQ6WVcTFL C6/80ywrfJxZplig71YjdH5Ighu8PaEKTaQfAyXWaQYOJYSwolf8AaUHx2dxmnoWFvBFCWdhx UKOFQz/EQ5yucQfZ2sXwXyzH/FT5X+b63wBRsDHwix/Mq7kPSEYlh40com1sJ5ySPCvz4BJXZ TfJMbP8X0ex8snQ85NblvdfW3k/4EpQcFSwi2dZpWc/p+gcIr271d/igj37EbqdKPakSVHdAz HVlQU3RO2smYS4= 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 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 EB= BR 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 re= quired by EBBR 2.0. > I'm not sure whether this is feasible, i.e. whether there is a set of CO= NFIGS_* which when enabled make the implementation EBBRv2.0 compliant. > Also, as the u-boot code evolves, these dependencies would need to be ca= refully maintained perhaps. > > Perhaps the best choice is to let the FW provider to set EBBR_2_0_CONFOR= MANCE in the platform config file once the FW has been deemed EBBRv2.0 com= pliant. 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. 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"); >>> >