From patchwork Thu Oct 6 19:40:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 612923 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp435376pvb; Thu, 6 Oct 2022 12:40:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5t1O0vUuFCtZmhLTdU9E4FYWnV1cs3c8+U4Z2g7PALJdNB+FRylHdBnX2+caYv+8BDF+71 X-Received: by 2002:a05:6402:1d86:b0:457:e84:f0e with SMTP id dk6-20020a0564021d8600b004570e840f0emr1308707edb.241.1665085242167; Thu, 06 Oct 2022 12:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665085242; cv=none; d=google.com; s=arc-20160816; b=XZ5si1dE6z7VuwpMujiShOE0jpbx0eGdeuaFBXsNKkNOSqEz1U7h7D4i3jAOEMoskH FvzSqkGFdSM2Lzv3E2s4yQAtGLtucjK1o1PvvG46j5Qc7W83ri+jcG1DMZDhzbqOwgce ys4FD+5MKMtJh152VfqgER8tAo+s9ogcPOGdXam/cHFLMzGyfi5qbewLaJGSuPemWDxY czvBb/90SmQHOFvLgM+mkN2GVu65RsM04jzSzl46cmfk5Hv1ab8p6Q5Up5lfs+cWGnLS HznSHQKOyLF8ZlMtK5pk7KwMhU/6BzxnfrA1p9d8DTH0cE4TOiAkhGuWuOuVTVaZSthJ VvCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=yY7+cJBUtUujSTlN6ofdB7gtezNP/B0+UjrJ8R6uOd8=; b=K89yprz15nZBHRIBW+GHUJsfbiY2ziHaIzHYNsquGhwnwX2WBdBEENQJ4hYK00LCSK cVRf3isJyDWskfpicNuhxEiyzh9tDAqXo87CxX8uQbLxT2L0LYjjEgWJQxtkYWQVNqa6 3JGbTsXFy8ylY59A5defLNT2iNh2JnnNTVdni0L9h4KQLlVegFyrtHn1mL0ZNKcYToW0 na52sqiTD7VDQHPbHuE2x8l7j2anQPpHVLQty8eWtia7ELedoX//lnJAPpCj68UWcsLw WdAfHP94a+HhfRV/aWZeOaYvE2kLTKHgFraMOtvvfdhtegsu+3z6D+Knxd1Y+Lnwmjfg GS8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i+3WdeRK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id hv12-20020a17090760cc00b007801a197a1bsi382643ejc.449.2022.10.06.12.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 12:40:42 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i+3WdeRK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51FB884CBB; Thu, 6 Oct 2022 21:40:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="i+3WdeRK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AC96384D94; Thu, 6 Oct 2022 21:40:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5F9A784BD3 for ; Thu, 6 Oct 2022 21:40:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x634.google.com with SMTP id q9so2331751ejd.0 for ; Thu, 06 Oct 2022 12:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=yY7+cJBUtUujSTlN6ofdB7gtezNP/B0+UjrJ8R6uOd8=; b=i+3WdeRK68xpuov0UswZ8NmAKpRVR0250BEyoJPAfKNNHMXSdInMNLyJX6Wgzj3unY ok9E4pN/dsosraw/zyWRzCMW0P0IfUOkW6SE6psDUANKNoSlZ8SF1N3P58EIOt2cZqOQ I0kitXRVdWZqRwM8mLPuitD4JvwaPaFUvKtfvQL2ktxotQt560Da4sFaymBH7U+cNmLq s/MUEMt6ILbU2DVxsfI0+aWgiHh0yAuz44XkrSz7cqtks/smBc5CWE2A1cvxCLwcveFr me/wkJ0h/npi6Eycuy9d9o65OojtW7T1gw7a1GiVXjfqtW5J8UI3GWepyoSFD90ynPqa 8ZZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=yY7+cJBUtUujSTlN6ofdB7gtezNP/B0+UjrJ8R6uOd8=; b=nWEdDx2xAkmCVn8xAYVBL1MYA0SJhjesNIqVegw7PVdx749g+XOgPEgyxTFEVmKrWA ahS7CYwYeTgcXLsNjNa4Ii/CJXFHWQ8R+VPcMkBO29AJpxLDtVKINTKPvDNI/vkD1Kqt cj8eXv0yxF0XAGTIcf7UTWSCC/KrQyU/I49wEv5BUj1Lwf++s6NJeolgf0+5HioU3B9s 1rOpud1Qd0b2UENWrcazjQjqyOxTzBnb2lSjZC20f6Q6Y53TRW8W1QXAoCOrlavRum5m /BpSneEydqG4I5alLt9gRVsvqMl7E23lAaGwqhDo5aYbP5/9zDJknxs4twnsknz3pYD6 lc7Q== X-Gm-Message-State: ACrzQf1O9735nV9BKSXSB9K1qjEIRUuAkWsaRT6jKBUNlHrNjh/MYykD 09RXzOaPFcuplEpnYVxYLNoA/qZTvK9i2Q== X-Received: by 2002:a17:907:7634:b0:78c:893c:b693 with SMTP id jy20-20020a170907763400b0078c893cb693mr1174708ejc.661.1665085231934; Thu, 06 Oct 2022 12:40:31 -0700 (PDT) Received: from hades.. (ppp046103015185.access.hol.gr. [46.103.15.185]) by smtp.gmail.com with ESMTPSA id bo1-20020a170906d04100b0077b2b0563f4sm99147ejb.173.2022.10.06.12.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 12:40:31 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: takahiro.akashi@linaro.org, Ilias Apalodimas , u-boot@lists.denx.de Subject: [PATCH 0/2 v2] Clean up protocol installation API Date: Thu, 6 Oct 2022 22:40:22 +0300 Message-Id: <20221006194028.28358-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 Hi! This is v2 of [0] trying to clean up the handle and protocol management APIs. [0] https://lore.kernel.org/u-boot/4766d2b2-7fd3-0206-37ee-709a6fe2b84f@gmx.de/T/ Changes since v1: patch 1/2: - remove (void*) since it's not needed when installing protocols - convert #ifdefs to if CONFIG_IS_ENABLED() Changes since RFC: patch 1/2: - Use ret instead of r as a return variable - Use goto for handling efi_va_end() patch 2/2: - Check the return value of efi_uninstall_multiple_protocol_interfaces Ilias Apalodimas (2): efi_loader: define internal implementations of install/uninstallmultiple cmd: replace efi_create_handle/add_protocol with InstallMultipleProtocol cmd/bootefi.c | 17 ++- include/efi.h | 2 + include/efi_loader.h | 6 +- lib/efi_loader/efi_boottime.c | 214 +++++++++++++++++++++++-------- lib/efi_loader/efi_capsule.c | 15 ++- lib/efi_loader/efi_console.c | 14 +- lib/efi_loader/efi_disk.c | 10 +- lib/efi_loader/efi_load_initrd.c | 15 +-- lib/efi_loader/efi_root_node.c | 48 +++---- 9 files changed, 226 insertions(+), 115 deletions(-)