From patchwork Sun Jun 19 04:55:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 582991 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:7814:0:0:0:0 with SMTP id b20csp747441mav; Sat, 18 Jun 2022 21:55:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vVWVvlHz6NNJ6I59LXmhuKD3z6NO/ohoSuF3FYdpcLr/A/TX5oe3rZW60c26ggARR0w0k8 X-Received: by 2002:a17:907:e91:b0:707:c7af:93aa with SMTP id ho17-20020a1709070e9100b00707c7af93aamr15896998ejc.382.1655614533012; Sat, 18 Jun 2022 21:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655614533; cv=none; d=google.com; s=arc-20160816; b=RoN9EqYCimkR25NlGSRScvqJZX0/nROISbHXifV3RCTxFZjjKHHcW5LBbxuNTkK8un wLanVkKuGB9SxAe00axgFkwpPc7FPR9JKvahEz72oEVzs4aAD/D4T0gA96Q9AQaT22Zu Cgo2Aep/PVBnJGYvSjZ43WPQfOGISVwYQKjsnPdUpXqvoJ1uPcNbTO25yZgakd3qU8DQ RPa5SLbVjujKRFhaO6b6x7t8blkKNGuxM3gtbFNqj55oElnqtJhY/h91rVKjjyR2OUz8 VLkre7W8NvwsfdP+g5Gsna5X2Rn2mdME36hGPNe/2cp9Sb4mA9mKxLZWxujihMYXylA9 AygQ== 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=WU1FIAvj64o9s7UuJIaIDn0QkIa48MBrl4j4ORMKwTA=; b=O0rY0nupNNqjLDb15Wv+LbfLSI5OQkuPVfE+opLWANhvPzBFtc81D94YgLUyDIvowD VMBvJPG3Fm+OlXvIK1fe3Iyyp+kYOcbS/+45CA+Nsyi0ocVMCh/qzi7mJim4oTp66gLm KiWRpuYpIVKyz9uIiNsH2Q0czssvZRtt7nmt431rf4GcJGHugrI6IFuOPelwIXsZCLx5 GEj/9A4dyyUUNQLuLEYBEJZTn4aBUW+7GKHnr6AdiYl80QmMAPMMAqnxWALPJrA8JvgN mBz2iiIwwaZ87Nm03BgcpU0uTldK6bpy8GHp6JTI6/hG4shEPQCwACKfE8HLBCkHWnKn 6afw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sJyA6LAx; 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 ht20-20020a170907609400b006fec271359asi6524035ejc.57.2022.06.18.21.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 21:55:33 -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=sJyA6LAx; 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 C1EA88433F; Sun, 19 Jun 2022 06:55:24 +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="sJyA6LAx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29D27843D8; Sun, 19 Jun 2022 06:55:23 +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-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (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 C1F09842FA for ; Sun, 19 Jun 2022 06:55:20 +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-pj1-x1036.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso7468872pjk.0 for ; Sat, 18 Jun 2022 21:55:20 -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=WU1FIAvj64o9s7UuJIaIDn0QkIa48MBrl4j4ORMKwTA=; b=sJyA6LAxSfJraUdKtVBt4zlT3LA/UQOEq4iG0e941ElzzdZBVfZw9TBa/sr8JFMbRv oPlsXsYJIwrkD2IqQax9zSTmseAAFOYatPja4aTMuf494bI9mqIKvLFYs1out6PH+Wuw /sgHIPhHx5qEWQqE4WVepHJCnbL378K9nD1I2wEDiGqS7IRTVP0OL2yV+FBkNrwCZGEx CTOjoAgPTMKSl8/hGz5ilcf8YGWOec/oc0jx+CR+DSFFxch2V6yignWLVRWDB34YDGAw GJ8FgfkFPsF+DuQTk027cGt7YhAj+KV/3pyh4eSUTO/HWKQGjZQo9D3fKF+hzBpXtT3p puUw== 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=WU1FIAvj64o9s7UuJIaIDn0QkIa48MBrl4j4ORMKwTA=; b=i3qoDhXBenfzdmHKghScVsjCTxK+5BQdlCIp43UFhvAIg20ZBjueksP9JKq5c60L9Y 1hu9feTBgEuZDWApZTXTGUHqF9v/ZjqMeqJsYKewX5iOYpmxVdG9nqc0e8tPIC6UOo3A P4GL53ETL+Yau8FaLa7OSaaEKolaMqYOKVGxHrIi4+t98IKjiMBJ7Ey9caN6P5EPdjDG 0Yh4FVKiwPAef/zL/lgiMArgbGIVCeqqtO/N3HFChTygUYRDchjhphDHQHaughYw/w1Q x7i6xvdPFx+00BzK3GIMCQi+p16jvrsW7i76Bdof3aD7mveThHcnOqCk2lXSu/4q8Apk VH7g== X-Gm-Message-State: AJIora+zzkYWBjGJw5T0SKh/6YI9YKIjDJ3+dTjI4R6AkxrO4peC1bQh cmxoBn1NPNuGnPvyJRy2kOWyoMvzpi4iLQ== X-Received: by 2002:a17:902:7486:b0:16a:cfc:7f49 with SMTP id h6-20020a170902748600b0016a0cfc7f49mr8482415pll.135.1655614518941; Sat, 18 Jun 2022 21:55:18 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id 9-20020aa79149000000b00518424f8922sm6381848pfi.77.2022.06.18.21.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 21:55:18 -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 v8 1/9] efi_loader: expose END device path node Date: Sun, 19 Jun 2022 13:55:59 +0900 Message-Id: <20220619045607.1669-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220619045607.1669-1-masahisa.kojima@linaro.org> References: <20220619045607.1669-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 Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- No change in v8 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),