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 02728C433F5 for ; Thu, 23 Dec 2021 14:52:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDF73834B5; Thu, 23 Dec 2021 15:52:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com 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; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="9YCqHHLF"; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="9YCqHHLF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 92B76833B8; Thu, 23 Dec 2021 15:51:57 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::62b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B4753831D7 for ; Thu, 23 Dec 2021 15:51:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Jose.Marinho@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxz5V/JjFRxwBs/ITxhKv2ewVaYsQimhNWLBO5No7o=; b=9YCqHHLF95a7f5zlo3p9ndFHHfYnTXjpsMVuDvWeqsVzvb0jqHjTTJCBw6I59WMehqdZJGRD41G3Qb0yGzZGG2mzExuISC6/Ojm05yFliMQzyiOzp4oXu07qZOD80aNOOyf7zukXj3mGiVplCj0vu1SKouONnDeFUDvKTkv9d+A= Received: from AM5PR0601CA0061.eurprd06.prod.outlook.com (2603:10a6:206::26) by VI1PR08MB3134.eurprd08.prod.outlook.com (2603:10a6:803:46::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.20; Thu, 23 Dec 2021 14:51:48 +0000 Received: from VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::5) by AM5PR0601CA0061.outlook.office365.com (2603:10a6:206::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19 via Frontend Transport; Thu, 23 Dec 2021 14:51:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT028.mail.protection.outlook.com (10.152.18.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18 via Frontend Transport; Thu, 23 Dec 2021 14:51:48 +0000 Received: ("Tessian outbound a33f292be81b:v110"); Thu, 23 Dec 2021 14:51:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e9ebdc4e25d24208 X-CR-MTA-TID: 64aa7808 Received: from 9b15719c4d77.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9BC9A0F1-310D-4343-8914-6E2CFC07B781.1; Thu, 23 Dec 2021 14:51:37 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9b15719c4d77.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 23 Dec 2021 14:51:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hCDeOqrs9BK4Y+uKz4KwFFTr9u2NemYxW7gnO17ujDWsM1wsCVe+aUdbYd4UJZkTzS1lib4/zRF1ugZslp5EQofE2epZmZ1yEtq5LlGJZV0mBIJNkcw7N3Lx4dAl8WYthKfuhrLDGZKxc1Lpf3tEVk4Eutap2PI269qHWkI1/DATT5vO7XKvUTau7lTPbOUmezHf9hcIkZQ/MBtsvpkVgDHXTG81dogARU0k4pQRoleAPQMFpKY2TDoeIbEt3IzWAhSoaibfuGg6pIyCN3BPjfzsUWvl/q3UlXYRtRWpe2Qzq/gctZsZJb9cz7t5b6Rk4MIm9YzGHUEPakhtOJkUAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XJxz5V/JjFRxwBs/ITxhKv2ewVaYsQimhNWLBO5No7o=; b=WtSiWzwHPS73/ks+j+34XshCW1X6MCRxPe1VIP3+kXXQc/0PKndzqFlNrHzIUAyws4RQGxfZUSAtPbE2l+ty+RIcbWYrWK3Ctu09vUnmmYqqH0oNB+LcCih2ga7UKz12326GNm7rhA1vAS+ya/n2/Edz7rloheTmhvcxh2IbEzbN6kfrGv0Kzq2IdE0ifK2ZiqRtOjneNcVYOU8LeETodxViDZIpI4tcGQHWQppOvbDgCQXWeLYYLizAOVq/8kC6X65/QB0EUR+w4EoTy1j+yVTQCo63sxTyjjqWk2C3G+JUJOF035GcOl/ABSy1xG+JtalXSZvMNzRgpU5Vd9lOZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxz5V/JjFRxwBs/ITxhKv2ewVaYsQimhNWLBO5No7o=; b=9YCqHHLF95a7f5zlo3p9ndFHHfYnTXjpsMVuDvWeqsVzvb0jqHjTTJCBw6I59WMehqdZJGRD41G3Qb0yGzZGG2mzExuISC6/Ojm05yFliMQzyiOzp4oXu07qZOD80aNOOyf7zukXj3mGiVplCj0vu1SKouONnDeFUDvKTkv9d+A= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DBBPR08MB6012.eurprd08.prod.outlook.com (2603:10a6:10:205::9) by DB8PR08MB5387.eurprd08.prod.outlook.com (2603:10a6:10:115::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.20; Thu, 23 Dec 2021 14:51:32 +0000 Received: from DBBPR08MB6012.eurprd08.prod.outlook.com ([fe80::5d1b:4877:774f:275e]) by DBBPR08MB6012.eurprd08.prod.outlook.com ([fe80::5d1b:4877:774f:275e%9]) with mapi id 15.20.4823.019; Thu, 23 Dec 2021 14:51:32 +0000 From: Jose Marinho To: u-boot@lists.denx.de Cc: Jose Marinho , ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, xypron.glpk@gmx.de, takahiro.akashi@linaro.org, agraf@csgraf.de, nd@arm.com Subject: [PATCH v2 1/3] efi: Create ECPT table Date: Thu, 23 Dec 2021 14:51:07 +0000 Message-Id: <20211223145109.198312-2-jose.marinho@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211223145109.198312-1-jose.marinho@arm.com> References: <20211223145109.198312-1-jose.marinho@arm.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P265CA0011.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::19) To DBBPR08MB6012.eurprd08.prod.outlook.com (2603:10a6:10:205::9) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 9552f623-f5ba-4adc-2795-08d9c623bf4b X-MS-TrafficTypeDiagnostic: DB8PR08MB5387:EE_|VE1EUR03FT028:EE_|VI1PR08MB3134:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 11pePhqRRFTuK0V67bnkr738A4xHBGay7CkIXhKb7P624IvR4z/VcaGP22YZcm4ka/tyLY3afiIBkQvsh4hJElMoVAZstAopXkTEawZs5GZy9+F4wbDTfOTbYL/oM71mmMLX936JG6K92yczDAwZ6+XlxnyeKaspv4B5NxRg4Q9/oK6bvB/b84V4Jc/QAFsVrraeqq6wVcl2GvquX+ebyyTtVTFBv6jKahYvzsp4dlWZE4VZFgIp+DK5+mxcqlmOLEF2FTlC/8+COSUxH+qmw/xGEPSgHgJi0FT28Rudi4vss1ezMMOoVCNJ9DE926+zCOKAleBYAFYQ0dRoVzM8Pml9cCFLh4C1KGCvAj9EeyhZ/TXHr+nfh/AdrAweHrqEWoW6aGxqOoibP8Qc808I86LUawZjc8jYXgy7JFPgmsz12GjY6FwxZgGrwwNkNlLNNlX8+383JPqTU7Wr8uz0FCdVqNkvq/mRjJ6Lac0+HzeOhrHUeFIpUWTs79wYVZXbVgqXyICvyiAm0X0+fmKNfSK0rARA1zniho9BldzqfgdhLo4fb08bD7oom/jhKvLr9fwwlAod1jjNxQSGDTdMYtkLp0fMJlomfg/mAGH3+BEMeU9b/NuP44L+hGjsleNeFz66N4pQ07yfJyw7v7UZpeIFbo5sD5g1j+fehnnPBp4UTt795Hm8Xh9nRiwE1lbYfBex+Tf7lPxtG62qBoGIqqHUzi8mpfqdt22zk/wuvhn0dq+0LqAd5+UZazFiOfYnwotcfVGDYpRkhnn+vyjbJuvRMWOm7vGQSJVR27WLg6w= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB6012.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(1076003)(5660300002)(6486002)(86362001)(52116002)(66946007)(44832011)(6916009)(66556008)(36756003)(6506007)(66476007)(38100700002)(38350700002)(316002)(508600001)(6512007)(2616005)(4326008)(186003)(83380400001)(8936002)(966005)(6666004)(2906002)(26005)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5387 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4cd9fc1e-29d9-496d-53f7-08d9c623b576 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OduelTUY9EW1B1A1t7PJnuc1Gj0QTmnoRuSCH3mQb351xI1JH+yV4++3FpRJDGIbBhQ/lUUdaID35oLOuI02mvke2yAHhRL1Fd7pGWO01xOpmdfMpxoKw1lic2S5Zks/jvF2XTiLBrQX5033LbtrUiXWsk99wK+GIhY3QdgI2XXskuL6HR21bX3zZTb3z5g3QUlo7czCeCtyaKNhmInmuqo195L5fyQS7S0OPj/DpqaKIHI93Ig/0ApBniDEGWLayfNk/UmCj6kaiK3cDq4Y38yZqK+nHM5Qd+7VzXUgAiLDsYtHpqF+RDv6cDZOQGxrRrsVnSPmfV4PtsrOLM604BxjCXKV6jWucRE+xCW8+th+nG+1R8kZgkgvHnAyOCbignmWxv+S8p9FQdEZolW4+FHD+Jksf5s1UMK4zr+JDyLR6aPWCykdAs4vH+gDhgM+XHtUux5xzPMA9QXZd4q+igKjOQmWQ3T4H1LFqMvlFawVkSUjfUCsf7d460rbdxIGmshZT/4CJyDfRdA/mdVS78yG5NBwNi10HLFrJga/ALFkmdwRSN9WaaQev+rSZJcMJ1z7QuWE8SBRuUx1R0+T0Ean+76wXhou6neZNP59Ev9QoOG1mB2nJJQGsgQgmd8pmrNECR6xK+NvxglIkDfnNRdtEeImBz5s/8MPsjW84s7Ha7bTTAxgVBfvz6aPnoPMg4rTL/OYC/u1Ib1gvKsnpZcFM9dTXTOuFSjytQwyXsEFosu+og7KtcnMxjcAdSfuYhAgk5lScfQjRdlj43pNNuhxr0UPYgFyi+kfuEu7xmQ= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(70586007)(1076003)(186003)(70206006)(36756003)(26005)(4326008)(6506007)(5660300002)(82310400004)(47076005)(316002)(6666004)(6486002)(8676002)(44832011)(6916009)(8936002)(6512007)(356005)(2616005)(2906002)(36860700001)(966005)(86362001)(336012)(81166007)(83380400001)(508600001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2021 14:51:48.4051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9552f623-f5ba-4adc-2795-08d9c623bf4b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3134 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 The ECPT table will be included in the UEFI specification 2.9+. The ECPT table was introduced in UEFI following the code-first path. The acceptance ticket can be viewed at: https://bugzilla.tianocore.org/show_bug.cgi?id=3591 The Conformance Profiles table is a UEFI configuration table that contains GUID of the UEFI profiles that the UEFI implementation conforms with. The ECPT table is created when CONFIG_EFI_ECPT=y. The config is set by default. Signed-off-by: Jose Marinho --- cmd/efidebug.c | 4 ++ include/efi_api.h | 10 +++++ include/efi_loader.h | 7 ++++ lib/efi_loader/Kconfig | 6 +++ lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_conformance.c | 66 ++++++++++++++++++++++++++++++++ lib/efi_loader/efi_setup.c | 6 +++ 7 files changed, 100 insertions(+) create mode 100644 lib/efi_loader/efi_conformance.c diff --git a/cmd/efidebug.c b/cmd/efidebug.c index a977ca9c72..a53a5029fa 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -619,6 +619,10 @@ static const struct { "TCG2 Final Events Table", EFI_TCG2_FINAL_EVENTS_TABLE_GUID, }, + { + "EFI Conformance Profiles Table", + EFI_CONFORMANCE_PROFILES_TABLE_GUID, + }, }; /** diff --git a/include/efi_api.h b/include/efi_api.h index 80109f012b..6fd4f04de3 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -226,6 +226,16 @@ enum efi_reset_type { EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \ 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a) +#define EFI_CONFORMANCE_PROFILES_TABLE_GUID \ + EFI_GUID(0x36122546, 0xf7ef, 0x4c8f, 0xbd, 0x9b, \ + 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b) + +struct efi_conformance_profiles_table { + u16 version; + u16 number_of_profiles; + efi_guid_t conformance_profiles[]; +} __packed; + struct efi_capsule_header { efi_guid_t capsule_guid; u32 header_size; diff --git a/include/efi_loader.h b/include/efi_loader.h index d52e399841..d20ff396d0 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -976,6 +976,13 @@ efi_status_t efi_capsule_authenticate(const void *capsule, */ efi_status_t efi_esrt_register(void); +/** + * efi_ecpt_register() - Install the ECPT system table. + * + * Return: status code + */ +efi_status_t efi_ecpt_register(void); + /** * efi_esrt_populate() - Populates the ESRT entries from the FMP instances * present in the system. diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 700dc838dd..b2398976f4 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -367,4 +367,10 @@ config EFI_ESRT help Enabling this option creates the ESRT UEFI system table. +config EFI_ECPT + bool "Enable the UEFI ECPT generation" + default y + help + Enabling this option created the ECPT UEFI table. + endif diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index fd344cea29..9f5a0cebd1 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -64,6 +64,7 @@ obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_rng.o obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_tcg2.o obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_load_initrd.o obj-$(CONFIG_EFI_SIGNATURE_SUPPORT) += efi_signature.o +obj-$(CONFIG_EFI_ECPT) += efi_conformance.o EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE)) $(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE) diff --git a/lib/efi_loader/efi_conformance.c b/lib/efi_loader/efi_conformance.c new file mode 100644 index 0000000000..1bb06c3b7e --- /dev/null +++ b/lib/efi_loader/efi_conformance.c @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * EFI conformance profile table + * + * Copyright (C) 2022 Arm Ltd. + */ + +#include +#include +#include +#include +#include + +const efi_guid_t efi_ecpt_guid = EFI_CONFORMANCE_PROFILES_TABLE_GUID; + +#define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 1 + +/** + * efi_ecpt_register() - Install the ECPT system table. + * + * Return: status code + */ +efi_status_t efi_ecpt_register(void) +{ + int num_entries = 0; + struct efi_conformance_profiles_table *ecpt; + efi_status_t ret; + size_t ecpt_size = 0; + + efi_debug("ECPT table creation start\n"); + + ecpt_size = num_entries * sizeof(efi_guid_t) + + sizeof(struct efi_conformance_profiles_table); + ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, ecpt_size, + (void **)&ecpt); + + if (ret != EFI_SUCCESS) { + efi_debug("ECPT cannot allocate memory for %u entries (%zu bytes)\n", + num_entries, ecpt_size); + + return ret; + } + + ecpt->version = EFI_CONFORMANCE_PROFILES_TABLE_VERSION; + ecpt->number_of_profiles = num_entries; + + if (num_entries) + efi_debug("ECPT check conformance profiles, not all entries populated in table\n"); + + /* Install the ECPT in the system configuration table. */ + ret = efi_install_configuration_table(&efi_ecpt_guid, (void *)ecpt); + if (ret != EFI_SUCCESS) { + efi_debug("ECPT failed to install the ECPT in the system table\n"); + goto error; + } + + efi_debug("ECPT table successfully created\n"); + + return ret; + +error: + + ret = efi_free_pool(ecpt); + + return ret; +} diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 1aba71cd96..fa5ad13500 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -231,6 +231,12 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; + if (IS_ENABLED(CONFIG_EFI_ECPT)) { + ret = efi_ecpt_register(); + if (ret != EFI_SUCCESS) + goto out; + } + if (IS_ENABLED(CONFIG_EFI_ESRT)) { ret = efi_esrt_register(); if (ret != EFI_SUCCESS) -- 2.25.1