From patchwork Thu Apr 28 08:09:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 567130 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp5232783map; Thu, 28 Apr 2022 01:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWHRS9DIb03kkLNkYt0RCIWIkHUivVwHfeVYJKLN4BbYWYFKktgXYbZgoAAjNtk4kpNH7b X-Received: by 2002:a17:906:5006:b0:6ce:3762:c72e with SMTP id s6-20020a170906500600b006ce3762c72emr29827302ejj.30.1651133519346; Thu, 28 Apr 2022 01:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651133519; cv=none; d=google.com; s=arc-20160816; b=l+4NT8Xp5ttwV1uNrC/aX3dKIqaQH9+4aioYql2/PC1D6WYkS+rG6l0bNfUjE7lgto LOhjS48NdONgV7sKQr500RTMJDgN+OvqV5bBcr85sGIV2rVFpK7lc+VUhrKkSADXpcvR eqVsQNkBbQ4BdEwSJ0zj3Yk5STurtaro2EjyYvBXKyH9CyvYcKS4/CcwjHO4nVL+O/m6 XXve+VnjD/pWBCpwnDpvD4dx1fS9rVyURPjv4aWY967vHlCKgItC4tcT30tvaq7oUoam 4ofoaXvo3DNdhD4VTH2aogGcRYrb+jnCMtAqtF6TGBLI9Qr3iOO12hnf+q2dLjo/U7K0 HFVQ== 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=rD6DTSGjbYlpKtq+SWtmijWsysS024y9Pdlgu6tWWtg=; b=cNZ7NYzSsKlT62YjL57NYSLVAK35o0Cal9EuNv6C0d9NEl92FshwWnkU5nOt3Yx8Tu S73SSIYuboVgH/rcyPITARGdCEnMvYWp8/uC+EsTJd35lkS/jwyqR0bF2MU744KOKA+5 Q5MlFrpiQqBGKG+BCM91OHZMrhQUFowzlS8Xqg3R1wkrqC7W+qq0On2W6VY/xE1WnJ+t 1V7POwQkfx4JmWNwskCzZGOsdtJ0v2zcVeFz1WR5XbFVmGvYXsQsT/6VCmHh//DmGx/E D81+9aXeStyy9Szp1As+zZBJnHAMARAt19sjy4tOawKc6OE07OzBc4b3UKNFAvme8YA5 iVaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RdE7DgyG; 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 hr13-20020a1709073f8d00b006e7f92842dbsi3907441ejc.355.2022.04.28.01.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 01:11:59 -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=RdE7DgyG; 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 19D7383EE7; Thu, 28 Apr 2022 10:11:27 +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="RdE7DgyG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90DFD83ED1; Thu, 28 Apr 2022 10:10:58 +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-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 21391834AD for ; Thu, 28 Apr 2022 10:10:51 +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=masahisa.kojima@linaro.org Received: by mail-pf1-x435.google.com with SMTP id j6so3592017pfe.13 for ; Thu, 28 Apr 2022 01:10:51 -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=rD6DTSGjbYlpKtq+SWtmijWsysS024y9Pdlgu6tWWtg=; b=RdE7DgyGVJYOynPjMvJ/OpnQ9qYwtArblhlOLk4vWB1Tc2t1Ils+cjwStW/Psbw1Vp vPBqVBxeCQgH+SkKQoIxdpjtGPRrpKzQcXGNSzDOM4M38Sa2y860oVuiF8pxLKPy9te5 auNezcvfQhVh9adn9crVcBUOiM9RB9Pk5Sg2pgcUTtg684QslC9bwFdNfu2uGBxGJBa7 aaFclD8UI3v79T0/zTDbqI2KGHU39Oy3Jf6GHaQv6anRu1IZ1B1OVo7tV+55XkN+71nC T2rQhWvDIRLlFwBE4fBpT3S+FU6Qd/J0Som+oEDyf+l9U0oe4SLiQmXPsUHcifc4XHjH uz3g== 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=rD6DTSGjbYlpKtq+SWtmijWsysS024y9Pdlgu6tWWtg=; b=torZrivg4Sqa3aQ+6ZjINlSOH/txyC6co0bZm9uJaMWT4dn97xSPmlYhbCe/ZvfMXO NiitWs8p/u5ruR9hirJkAb8O2vnuGGxo23Nc1pH6nx5k6DwpBvOI70XqJJ3vewlSwWpg GThxoDLCEbtmZ2Fry+uxvJ9dfwEmjRZ3V08L1+/gONmwjuSgZsl8I0/KXiwhqcWZtpY2 3iUXneDkS18df/i8hQbciLo/okmBu5GGeKnREI+HouQmEszQzg69RU2T3mfvwLsZOuqo B96IaHdt6LPmdC+4nU4TR90JnTSs5WBm9Lbp/fFuGw4BKZg+b9ksvUmUvqSLpItBO6Kb m32g== X-Gm-Message-State: AOAM533yfV9h9ecJBT9yMYjKijwtS7NVWptGStAiXlqkXoraG4iZlRAv TPEGX8+4fHgtbpxJjIe9kliiHIKyFc0iWQ== X-Received: by 2002:a63:5a20:0:b0:3aa:2fd0:9e94 with SMTP id o32-20020a635a20000000b003aa2fd09e94mr27764642pgb.602.1651133449427; Thu, 28 Apr 2022 01:10:49 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id b15-20020a17090a7acf00b001cd4989ff5fsm5684259pjl.38.2022.04.28.01.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 01:10:49 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis Subject: [PATCH v5 05/17] efi_loader: export efi_locate_device_handle() Date: Thu, 28 Apr 2022 17:09:38 +0900 Message-Id: <20220428080950.23509-6-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220428080950.23509-1-masahisa.kojima@linaro.org> References: <20220428080950.23509-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 Reviewed-by: Heinrich Schuchardt 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 ba79a9afb4..effb43369d 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -595,6 +595,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;