From patchwork Thu Mar 24 13:54:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 553916 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp4438688mag; Thu, 24 Mar 2022 06:55:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKFLNjTeaeT0ojtgya2ltsvkxbFrGrRDaS6XU12pfdrwNlJ7v03xMoXOmJ1CUoAsP/Bu1M X-Received: by 2002:a17:907:7711:b0:6ce:e03c:e1e2 with SMTP id kw17-20020a170907771100b006cee03ce1e2mr5762418ejc.769.1648130157454; Thu, 24 Mar 2022 06:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648130157; cv=none; d=google.com; s=arc-20160816; b=UTCJtGutUK4O9itx8ccrQskfzJUd4a/l7D8wuS/hvskGdgcY5Ps2o1jEXHibKgXETC ubKFtqDx8CuAo5VG6XtMpPu+uazL1c3BdjIs79oSVBlqH0BogppJGNv7tfFesmYJ7jS/ 3e0O/vaLrpyWOKIn6VONB87Ic5or79kHSMMJBUqpljOC1XOp4LTIW35w6KZJdmkZKiZU UaPRZJaeQ4oUkAvUMzt06b6ksMkCPy4gfnZXg66Hb+h4dml74Gd4UUjojNuQrXUXdXFM uDW07rfUlP+bGn7b7rrq/znXMePP1OtXJ46TNVROq1QBYyehND6vIz/IjVPeIdI8XKsd ezdA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=xvVdSORk6u4Mc23DqOajg9xXbHy3DSF6AJNDQ5Ve8rg=; b=CdL3DKDlUxT+F4cg8gZY2AOOIbgA+A1WgFvmjPJN4wez2XD0Bd+ps0m81lc2Y1JCYS VgI+7PFhlZqNAfzjQ1Fn1puXT/3S4P0dXfLu0lQkqzy3C2CEsNaTRBTRbPpdMarzhmxs o7hW8o4qlQ19F2XkdLHpTLhl7FsWzDPppvg2fHKICJzb4OMe+uy2tB90Ooi1NJ+2RDpp wMVJ30vcd7nkRYbNtruvN4mmsfnCcOJZQ3+GE8f8BZm23yXP1qFNvVVpey66t4iNOb0e IXX1rGVo7A9i3lpeLrsRZcWhl3y1OK389yTp9KFlkBb9ihs0ex+b1MDDni+hEpwtaceV bFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DJ7GFGe6; 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 hc38-20020a17090716a600b006df76385d6esi20506268ejc.526.2022.03.24.06.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:55:57 -0700 (PDT) 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=DJ7GFGe6; 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 81151840C5; Thu, 24 Mar 2022 14:55:10 +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="DJ7GFGe6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC9C6840B8; Thu, 24 Mar 2022 14:54:56 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 BA1AF840BB for ; Thu, 24 Mar 2022 14:54:52 +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=masahisa.kojima@linaro.org Received: by mail-pl1-x62d.google.com with SMTP id x2so4755908plm.7 for ; Thu, 24 Mar 2022 06:54:52 -0700 (PDT) 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; bh=xvVdSORk6u4Mc23DqOajg9xXbHy3DSF6AJNDQ5Ve8rg=; b=DJ7GFGe6IaZUQ9nxDPLxEkA7FFf3kDAKFzh9P4yo3iCfSgCgomeoOCg1AMip4WhPrt /UUc1Hi1NMdRqxRWhABH/jswu9W2eIrQGFOu7Z9VUGVL6pqL6Nyrjg/5qYFoZFCfA4qC h4w/JKYMaY2NnmOyo+wkksqqvhZxNMKDXI8ThAMjqeAscRCBRP32veWtT/Wt7m8QSZUp gcBHxJmWPpgbf8oewZ6oCc3fgHJsnOtV4gTWaePZJNr6IhL4ZKZ9mhKJdn9aLWpz7gc4 YbJMF/aHMDuptzzN9RyH2hsakPVnMG8r4nN0dYXpH5coYQYbQYd316mAB3RRr4AGQ14q jBTA== 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; bh=xvVdSORk6u4Mc23DqOajg9xXbHy3DSF6AJNDQ5Ve8rg=; b=F/clyffu5TSv9fa0OzIvSOYJks9BuepjRN08q/j6gx8I/UWFNjW9zLjSoQ5AdLn+Nh 0FBu0QSjYI+IGm7nkyj11uD3wSq6/xcTcxRIXqBG0mid4oEGll3v99/NtXkpXI/KOgwz NG3w6Dy2aS0VnImHeb2mNlFvizfXvVPvgF54SW5LQCaudD3a/Mtv+wNBYiIAv7Hu0DxM S85gO+NLQ6XeVT0B4/oVaGmvDBpUN3djhIpJF/4AJOATjnfR2WEVkj4VDxEgSdHpeGdE UNJZXTxG/Oe/g1CWUNlKGqm7mVpd0pqxO8/6pyAKBFcnxs3fgHmzwz8V/fftJyVoWicf W8sQ== X-Gm-Message-State: AOAM531Z/BDdbn45uAHspCO4Of8YBDym7t7QDvXtAcR2vHkfteJ6WmCt ounI4ARyrheb5oyCyzP4Jt/eV8z3fjUnAg== X-Received: by 2002:a17:90a:1db:b0:1bf:711d:267a with SMTP id 27-20020a17090a01db00b001bf711d267amr6444962pjd.155.1648130091091; Thu, 24 Mar 2022 06:54:51 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id p15-20020a056a000a0f00b004f7c63cba5asm3974609pfh.21.2022.03.24.06.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:54:50 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima Subject: [PATCH v4 05/11] efi_loader: export efi_locate_device_handle() Date: Thu, 24 Mar 2022 22:54:37 +0900 Message-Id: <20220324135443.1571-6-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220324135443.1571-1-masahisa.kojima@linaro.org> References: <20220324135443.1571-1-masahisa.kojima@linaro.org> 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.5 at phobos.denx.de X-Virus-Status: Clean From: AKASHI Takahiro This function will be used in the next commit where some behavior of EFI boot manager will be expanded. Signed-off-by: AKASHI Takahiro Reviewed-by: Ilias Apalodimas --- No changes from original version 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 af36639ec6..ce22660d5b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -593,6 +593,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 5bcb8253ed..4da64b5d29 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1799,10 +1799,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;