From patchwork Tue Nov 9 01:32:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 518029 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp1052674iml; Mon, 8 Nov 2021 17:33:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIW2MRerOxx4To2KYjfuqMdtN2CLCZHgnCAHqDoP6p2J5pIklWO5LjYP08sz3SAB7BeRJ5 X-Received: by 2002:a17:906:4787:: with SMTP id cw7mr4827994ejc.311.1636421612271; Mon, 08 Nov 2021 17:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636421612; cv=none; d=google.com; s=arc-20160816; b=uWcIZ2mraYh/4VIAud1yCnURMZDyEzvOf2OPzI2nkuRmRGB39BShMnIim3+I8YtYjJ PrKtdoZlqzdD6IuIIWVipTF52ncRQPgMpIBxfveXQTG63l+fiz27MjXGMcFxJpmelvuf el/X2yf8SWbE8d4XcWXI6A9S1zCACgOxlhuEM7kTAlUX1MmExkEa0lInuQhiJ7LH8kQz DBL2VcA8fE/aVShmdKtgXTxOn4xbhRzPbAhlSFdLvilrdIOU4F23JNdE6ObLp889VrWQ X3r/LvxdEWu/2Z+Ow1/6kp6SRPsvEMrKzrTJOT9ErVE6KeuUyix+SBorNGXaazLKki2o bypA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TGkz7b7wt+AMOnQeNHSUZ6RWPJih8dTqzsEYhg6sQ3Q=; b=Mtb5TchUQfhxp0kzxKc3PRnNtX66iDdkoD9i32Phcs6k9bAf2W8mp8Fyr2sUmctcsF hjCTc/gY1FZVyHRLtxhjp1FU6ijxbE7uGLV9AeeRGv91BitB4e9IPIJTWmr7aQlf/9xf Ka+F04CXytNtSUQQ6bnqX9cikj4apLn7XNvT0xPK0C0Pf6rwEfZ+rVpkBpnp7beSHanQ mzDHuZO9ipLvnR2MaltqEkaWp4IEkFgsRBFPEmLrVvjhN8lSMqlEwlmCEm12VTg3lM8E alNq0Zn0ZmMhWOeGR/xPP6Daj9v1QmOpv7EluamUIt68OTiB9Y5GZYzC9rSCYHdADOJQ ZAWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ysG0bJhr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id o13si15763863ejy.527.2021.11.08.17.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 17:33:32 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ysG0bJhr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 48979838E4; Tue, 9 Nov 2021 02:33:30 +0100 (CET) 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="ysG0bJhr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2513A83886; Tue, 9 Nov 2021 02:33:28 +0100 (CET) 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-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (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 12C4F83883 for ; Tue, 9 Nov 2021 02:33:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x433.google.com with SMTP id o4so3778304pfp.13 for ; Mon, 08 Nov 2021 17:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TGkz7b7wt+AMOnQeNHSUZ6RWPJih8dTqzsEYhg6sQ3Q=; b=ysG0bJhrvAMVURNDKadKvGLgvyy7XMynLgzNgk/xO/IxBdFtMwpH5ursRoYTZ08ioR lB3qmnwKbgRfqjx2qBJVoiqQSoiRZHghlr/8GHP8P/KyrEkniSAdxFOYt7KGlav+AiO7 d4LUAdU+ev4lkvrnzxrgaWQr2998oEhcN1zG95BD74+49Mf6RadULSFQ5QOnQzflwrcp sbK3s5FU8iv0TJeguHhvh3TvIxYHLyK7rhq9bSPz8aIWyGNR1zWNPMmf4AvngPFkJ03x pxHKOSZg1yR1ejpNdXKAweNlCRQRZRmQqsOefnGcHlvHjz3xoDoN5oPsE9i9aFX2dns7 ohlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TGkz7b7wt+AMOnQeNHSUZ6RWPJih8dTqzsEYhg6sQ3Q=; b=mJG6GZV2pD6MxWTm0dm41zv4RRaVmVTiAC28f7BxhIVBJ792G0oncDm+U62L+Pg6qW lcw7IP7q94eO0hlMQmZN8ZTIqaRIzmrcS/hnOA7c2cAM0xogaa6ovpd4Gl4MT8AsNfuq OEsz2VLq6q6cwVoFZ6FlguSMQ0Dv32oO0D0WHFOf1M9+wflCAckrYzuLIUXhx2y3m7mv jMBrYnLP1dj5BkL9Yole6UBTxMtcCfWOlCveCZBTaWGnncvDJpvE4r23pPywtiCxt2LO V1C+7EXarmeN40G21CLVQhI8unUZ4tHa/izviShgPbpq1w0AP8jW0Rduzl7Bhjyd4Gj7 4hgQ== X-Gm-Message-State: AOAM533oaMRgGnn8TE17EmFpx4cLKomG8PxoZibw7UXeQDYeauu1D3s0 ZnVWoqzxwNdf/hM03+bDUQ9jMA== X-Received: by 2002:aa7:83c9:0:b0:481:1d47:3362 with SMTP id j9-20020aa783c9000000b004811d473362mr3976387pfn.5.1636421601395; Mon, 08 Nov 2021 17:33:21 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:e857:cfcb:a6ed:9a8]) by smtp.gmail.com with ESMTPSA id v10sm4946589pfg.162.2021.11.08.17.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 17:33:21 -0800 (PST) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de Cc: sjg@chromium.org, ilias.apalodimas@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 1/3] efi_loader: export efi_locate_device_handle() Date: Tue, 9 Nov 2021 10:32:31 +0900 Message-Id: <20211109013233.72902-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211109013233.72902-1-takahiro.akashi@linaro.org> References: <20211109013233.72902-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 This function will be used in the next commit where some behavior of EFI boot manager will be expanded. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 4 ++++ lib/efi_loader/efi_boottime.c | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index d52e399841ba..65236fa64616 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -587,6 +587,10 @@ efi_status_t efi_create_handle(efi_handle_t *handle); void efi_delete_handle(efi_handle_t obj); /* Call this to validate a handle and find the EFI object for it */ struct efi_object *efi_search_obj(const efi_handle_t handle); +/* Locate device_path handle */ +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol, + struct efi_device_path **device_path, + efi_handle_t *device); /* Load image */ efi_status_t EFIAPI efi_load_image(bool boot_policy, efi_handle_t parent_image, diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 1823990d9bd5..d5b764e1a1e1 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1796,10 +1796,9 @@ failure: * * Return: status code */ -static efi_status_t EFIAPI efi_locate_device_path( - const efi_guid_t *protocol, - struct efi_device_path **device_path, - efi_handle_t *device) +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol, + struct efi_device_path **device_path, + efi_handle_t *device) { struct efi_device_path *dp; size_t i;