From patchwork Mon Jun 13 09:38:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 581411 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp1797731max; Mon, 13 Jun 2022 02:38:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYKY9InqDpIu/KJrKk+PtsVQy6YjJ4zVkW6HLi/2/0F6G1JLpxKRlQtXFr8YGFayB8L/th X-Received: by 2002:a05:6e02:1b8f:b0:2d1:b707:3022 with SMTP id h15-20020a056e021b8f00b002d1b7073022mr33457560ili.71.1655113116845; Mon, 13 Jun 2022 02:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655113116; cv=none; d=google.com; s=arc-20160816; b=c7C2IQMysry76vyXwl0CoJ5UirWB/nfAGcElJrzBk2kas8zbfYFwhRVEUiqz882ytj p3Po9IfPcTf1Y8NYX2ZgpnJpdvTbTM80LlOESs942XVC1UOdU8C+X+I+iMrzg/wg3/ld hV4daJgv2Cw/RXBdYXDbk+fJgDfXFSfyMvSFh8NOHmq+cqdSu6fPGF0LVyiwwQEc5j33 iZpcMpiKksf+2L7vwVP+3EfJK+oz3PBf0pUEe23ev3TCWLvjcUxruC8MQ9KpcfFK4Dy0 41zW88CpI646mjk9lhBTjJW4wdrYnwZoVfr6fvpaLqfb80LosYMXV4h+kMM9uqXR/jIo E9ww== 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=X6aMr3BDdux3VY3eAJb7ZV/iL097awoz6J+eOVjDX2M=; b=oePNSGqwd761FtGud/dQmEocFXZd7fATDwwhEQx6fHSUxp4Imx5Dov0uQtpzM6Cbb2 3JAYTLB077gCFJUi/sd4D24q1z2jY21oH/1mjMSiFFRo9Zx9txBG56Fz14pzAyx5BunX p7UIlmTnKiU0Kii1mt6Zok2VMq90p2YoP3x9bPw+bcr42sgxdwbZGPSBqWqZ8v/RpERY p7t9F9teQLx/MpGYmspkR0mDEAqowoxA4qUquIxh8fooa77jTlwQv08DDRepG/Fh7Imo GXQm/8xCcBmdo2P3bBNwyieQGI/vLnr0la91eAtEvxRRaYECj93U9Rp6FXMuihYfAF6L zWoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VeglpB0W; 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 u20-20020a056638135400b0032ec51298fesi11662769jad.13.2022.06.13.02.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:38:36 -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=VeglpB0W; 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 9DD408442B; Mon, 13 Jun 2022 11:38:23 +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="VeglpB0W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 57EBC842E6; Mon, 13 Jun 2022 11:38:21 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 2BEF6842E6 for ; Mon, 13 Jun 2022 11:38:18 +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-pg1-x532.google.com with SMTP id h192so5066734pgc.4 for ; Mon, 13 Jun 2022 02:38:18 -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=X6aMr3BDdux3VY3eAJb7ZV/iL097awoz6J+eOVjDX2M=; b=VeglpB0WsTsLdOfStFw4pdYIrk1ew59iF8lmG/F6LToJe9dbia9j8A9d8twxlXiUvk KlIuzHR5/svDTWGgmGjv6tJMuOwSK0yOehTURFeC3O20l7vfPF3xgjUY8HsVDOzOjyJs 9LvJH6P37sOty51YsEWYcCyHBgYYSIVcLnVe3y4HcTbyXbFy2mSh9HxyrRfDA22hFcv9 mEtHxzgKxvwy6XktEvgDFCTcTfnOmihk0Z8NJOqZEj5DPoQ315ucZOppMmMfDwy/vS3a EnUo7vvb4YKI81s+5JhEn+BpVSmSncvxO3Lt9KJW2J1R4XZQPH2xmQs2V/t+EPbLMCq/ ZTAg== 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=X6aMr3BDdux3VY3eAJb7ZV/iL097awoz6J+eOVjDX2M=; b=M7afJTs1H5zQYbT7nwIhvr1LjychBskpbxjI+KjruAjnXNvPv7V6JkQo214YHfDeTr TiJqwHotv+TQ2YA9jw5oW9sRnmcP0IsXofHNDVwNyEx1SfG1QhCb0K+ti96Gfm1Rl01f Ti+p1a53h3/Iv8+Sj4aYKQrymOt2lYT4aNevAavsriJ+Blr70iA1NKGFSIJlvExA5KS0 4oOASkIcIEmRwuTQIEFnQ2QzHg0aXD9UV99fCnt12nz9I1gZSo2fI6IuDJznBzz7mdWj 3IR6gd3nK/1WCxD7gqrEKq8WGaLZifcscLW6yx5OX5rWQBzUYv7KcqdFoBGiI+NDD+jZ Wb/Q== X-Gm-Message-State: AOAM530Mzi4Pk7kHnjcpgksG7/gn/IbQDO9YzKBYYTnUSamzfxBYPT5p qdl922fAgjj7fXpffpzU8/IrrS+aa2CLpA== X-Received: by 2002:a65:6499:0:b0:3fc:dcaa:ad62 with SMTP id e25-20020a656499000000b003fcdcaaad62mr50762918pgv.63.1655113096141; Mon, 13 Jun 2022 02:38:16 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id q6-20020a170902a3c600b00163f7935772sm4629227plb.46.2022.06.13.02.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:38:15 -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 v7 1/9] efi_loader: expose END device path node Date: Mon, 13 Jun 2022 18:38:45 +0900 Message-Id: <20220613093853.23865-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220613093853.23865-1-masahisa.kojima@linaro.org> References: <20220613093853.23865-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 This commit exposes the END device path node. Signed-off-by: Masahisa Kojima --- Newly created in v7 include/efi_loader.h | 3 +++ lib/efi_loader/efi_device_path.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index f6651e2c60..c6df29993c 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -798,6 +798,9 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp, (((_dp)->type == DEVICE_PATH_TYPE_##_type) && \ ((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype)) +/* template END node: */ +extern const struct efi_device_path END; + /* Indicate supported runtime services */ efi_status_t efi_init_runtime_supported(void); diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 50a988c561..4798cec622 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -30,7 +30,7 @@ const efi_guid_t efi_guid_virtio_dev = U_BOOT_VIRTIO_DEV_GUID; #endif /* template END node: */ -static const struct efi_device_path END = { +const struct efi_device_path END = { .type = DEVICE_PATH_TYPE_END, .sub_type = DEVICE_PATH_SUB_TYPE_END, .length = sizeof(END),