{"id":812139,"url":"http://patchwork.ozlabs.org/api/patches/812139/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170910132236.14318-2-robdclark@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170910132236.14318-2-robdclark@gmail.com>","list_archive_url":null,"date":"2017-09-10T13:22:22","name":"[U-Boot,v1,01/12] efi_loader: add stub EFI_DEVICE_PATH_UTILITIES_PROTOCOL","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"9de0f19de7eea34ab630c293eeaf1a1d8a94d273","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/?format=json","name":"Rob Clark","email":"robdclark@gmail.com"},"delegate":{"id":3400,"url":"http://patchwork.ozlabs.org/api/users/3400/?format=json","username":"agraf","first_name":"Alexander","last_name":"Graf","email":"agraf@suse.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170910132236.14318-2-robdclark@gmail.com/mbox/","series":[{"id":2401,"url":"http://patchwork.ozlabs.org/api/series/2401/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=2401","date":"2017-09-10T13:22:21","name":"efi_loader+video: support for Shell.efi","version":1,"mbox":"http://patchwork.ozlabs.org/series/2401/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812139/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812139/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"cnTj3IX4\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqsHM66BYz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 23:25:03 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 73560C21EE4; Sun, 10 Sep 2017 13:23:46 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id A5D56C21E40;\n\tSun, 10 Sep 2017 13:23:01 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid F01B3C21DEB; Sun, 10 Sep 2017 13:22:50 +0000 (UTC)","from mail-qt0-f196.google.com (mail-qt0-f196.google.com\n\t[209.85.216.196])\n\tby lists.denx.de (Postfix) with ESMTPS id ECC63C21EA9\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 13:22:45 +0000 (UTC)","by mail-qt0-f196.google.com with SMTP id 7so4190460qtz.3\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 06:22:45 -0700 (PDT)","from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a])\n\tby smtp.gmail.com with ESMTPSA id\n\th58sm4438932qta.82.2017.09.10.06.22.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 10 Sep 2017 06:22:43 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=LemN/4krNFCT7o7M65iutcrbnjNiKuB/STSObMRxCqM=;\n\tb=cnTj3IX4hrwrtvNfIAGaggGHWgL57KskJNjNFw6tD2rMUYAvkYmYQJ/MHydIuswxjo\n\t805l3L3TWDovdwtNEadVuYAfmQa2D7ARHaM99kGyK4T0prGZXhHG9anHSU966XjA/nrr\n\tBX9t33iCz6isTFT1iZp5i/qh0UFi9L9QIM6KAdaVFR0WjJOomHbIdaZ7b28DnbwH9mzd\n\tdxRNFF7qiUNDZKwP6vKGq4efgrXcLRft+XBpt8HKZL8wmoB2yljY61EjR3QCmtC5lwws\n\tdeukzAZ5vl7JW/qXi0578xwpPkYVk7bEpaII2ODzEnaIzW8l8oaSW8oqsTmOT9xhLGXt\n\tnwTA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=LemN/4krNFCT7o7M65iutcrbnjNiKuB/STSObMRxCqM=;\n\tb=qic6I8l79oHzX9w0iORMWKgqrQtZ0dVEr9fzqr6QzgK26R+BbV2gaAqHcDPIRGYK+Y\n\tSFrku7TxyDoI41+MajSc8bH/GN1Hig7NZIzHtnI7u+SRRX0mrS7ia2JNw8/c1A4UlneV\n\t//mzR0vcKkn9IgAHAzy/ti449+jWik8RRu0Ylve1nPpuOdAX8DPXUpW9S5p28/Qbp4ze\n\twPm75eYsAMzDOO1ZBZJlnVNXPyHOwqBvNi47gzoxtt+0b1LppPmR6WP886zNVQWQplAF\n\tsuIBi2yAz9LqXVpxoIZOP7xTp+qN13AW/8MBig8qdaUxGXEC1tqDFw5z9JaDB0vLZI/U\n\tLnhg==","X-Gm-Message-State":"AHPjjUikqU4EMJsP3ON4dqghDsDuJrk8BRnbynhN9TQ4WtUrhcoAlCml\n\t/gC3UmUk48V4ZNugUG8=","X-Google-Smtp-Source":"AOwi7QDMnsT27AC7mRHS7S8ysEDWpXaou6B9ratYeOw2y9Lpr/PhaUDZcM8qibQhMX+7VZhXJPGVUg==","X-Received":"by 10.200.26.123 with SMTP id q56mr5514604qtk.130.1505049764657; \n\tSun, 10 Sep 2017 06:22:44 -0700 (PDT)","From":"Rob Clark <robdclark@gmail.com>","To":"U-Boot Mailing List <u-boot@lists.denx.de>","Date":"Sun, 10 Sep 2017 09:22:22 -0400","Message-Id":"<20170910132236.14318-2-robdclark@gmail.com>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170910132236.14318-1-robdclark@gmail.com>","References":"<20170910132236.14318-1-robdclark@gmail.com>","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>, Peter Jones <pjones@redhat.com>,\n\tLeif Lindholm <leif.lindholm@linaro.org>","Subject":"[U-Boot] [PATCH v1 01/12] efi_loader: add stub\n\tEFI_DEVICE_PATH_UTILITIES_PROTOCOL","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"From: Leif Lindholm <leif.lindholm@linaro.org>\n\nSigned-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n---\n include/efi_api.h                          | 30 +++++++++++\n include/efi_loader.h                       |  2 +\n lib/efi_loader/Makefile                    |  1 +\n lib/efi_loader/efi_boottime.c              |  4 ++\n lib/efi_loader/efi_device_path_utilities.c | 83 ++++++++++++++++++++++++++++++\n 5 files changed, 120 insertions(+)\n create mode 100644 lib/efi_loader/efi_device_path_utilities.c","diff":"diff --git a/include/efi_api.h b/include/efi_api.h\nindex c3b9032a48..57468dd972 100644\n--- a/include/efi_api.h\n+++ b/include/efi_api.h\n@@ -506,6 +506,36 @@ struct efi_device_path_to_text_protocol\n \t\t\tbool allow_shortcuts);\n };\n \n+#define EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \\\n+\tEFI_GUID(0x0379be4e, 0xd706, 0x437d, \\\n+\t\t 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4)\n+\n+struct efi_device_path_utilities_protocol\n+{\n+\tUINTN(EFIAPI *get_device_path_size)(\n+\t\tconst struct efi_device_path *device_path);\n+\tstruct efi_device_path *(EFIAPI *duplicate_device_path)(\n+\t\tconst struct efi_device_path *device_path);\n+\tstruct efi_device_path *(EFIAPI *append_device_path)(\n+\t\tconst struct efi_device_path *src1,\n+\t\tconst struct efi_device_path *src2);\n+\tstruct efi_device_path *(EFIAPI *append_device_node)(\n+\t\tconst struct efi_device_path *device_path,\n+\t\tconst struct efi_device_path *device_node);\n+\tstruct efi_device_path *(EFIAPI *append_device_path_instance)(\n+\t\tconst struct efi_device_path *device_path,\n+\t\tconst struct efi_device_path *device_path_instance);\n+\tstruct efi_device_path *(EFIAPI *get_next_device_path_instance)(\n+\t\tstruct efi_device_path **device_path_instance,\n+\t\tUINTN *device_path_instance_size);\n+\tstruct efi_device_path *(EFIAPI *create_device_node)(\n+\t\tuint8_t node_type,\n+\t\tuint8_t node_sub_type,\n+\t\tuint16_t node_length);\n+\tbool(EFIAPI *is_device_path_multi_instance)(\n+\t\tconst struct efi_device_path *device_path);\n+};\n+\n #define EFI_GOP_GUID \\\n \tEFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n \t\t 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\ndiff --git a/include/efi_loader.h b/include/efi_loader.h\nindex 43b12b94fa..c009828db9 100644\n--- a/include/efi_loader.h\n+++ b/include/efi_loader.h\n@@ -58,6 +58,7 @@ extern const struct efi_simple_text_output_protocol efi_con_out;\n extern struct efi_simple_input_interface efi_con_in;\n extern const struct efi_console_control_protocol efi_console_control;\n extern const struct efi_device_path_to_text_protocol efi_device_path_to_text;\n+extern const struct efi_device_path_utilities_protocol efi_device_path_utilities;\n \n uint16_t *efi_dp_str(struct efi_device_path *dp);\n \n@@ -68,6 +69,7 @@ extern const efi_guid_t efi_guid_loaded_image;\n extern const efi_guid_t efi_guid_device_path_to_text_protocol;\n extern const efi_guid_t efi_simple_file_system_protocol_guid;\n extern const efi_guid_t efi_file_info_guid;\n+extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n \n extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\ndiff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\nindex 930c0e218e..f5e69dd078 100644\n--- a/lib/efi_loader/Makefile\n+++ b/lib/efi_loader/Makefile\n@@ -16,6 +16,7 @@ always := $(efiprogs-y)\n obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o\n obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o\n obj-y += efi_memory.o efi_device_path_to_text.o efi_device_path.o\n+obj-y += efi_device_path_utilities.o\n obj-y += efi_file.o efi_variable.o efi_bootmgr.o\n obj-$(CONFIG_LCD) += efi_gop.o\n obj-$(CONFIG_DM_VIDEO) += efi_gop.o\ndiff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\nindex 3860feb79b..8bb243d673 100644\n--- a/lib/efi_loader/efi_boottime.c\n+++ b/lib/efi_loader/efi_boottime.c\n@@ -775,6 +775,10 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n \tobj->protocols[3].protocol_interface =\n \t\t(void *)&efi_device_path_to_text;\n \n+\tobj->protocols[4].guid = &efi_guid_device_path_utilities_protocol;\n+\tobj->protocols[4].protocol_interface =\n+\t\t(void *)&efi_device_path_utilities;\n+\n \tinfo->file_path = file_path;\n \tinfo->device_handle = efi_dp_find_obj(device_path, NULL);\n \ndiff --git a/lib/efi_loader/efi_device_path_utilities.c b/lib/efi_loader/efi_device_path_utilities.c\nnew file mode 100644\nindex 0000000000..4b97080f35\n--- /dev/null\n+++ b/lib/efi_loader/efi_device_path_utilities.c\n@@ -0,0 +1,83 @@\n+/*\n+ *  EFI device path interface\n+ *\n+ *  Copyright (c) 2017 Leif Lindholm\n+ *\n+ *  SPDX-License-Identifier:     GPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <efi_loader.h>\n+\n+const efi_guid_t efi_guid_device_path_utilities_protocol =\n+\t\tEFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;\n+\n+static UINTN get_device_path_size(const struct efi_device_path *device_path)\n+{\n+\tEFI_ENTRY(\"%p\", device_path);\n+\treturn EFI_EXIT(0);\n+}\n+\n+static struct efi_device_path *duplicate_device_path(\n+\tconst struct efi_device_path *device_path)\n+{\n+\tEFI_ENTRY(\"%p\", device_path);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static struct efi_device_path *append_device_path(\n+\tconst struct efi_device_path *src1,\n+\tconst struct efi_device_path *src2)\n+{\n+\tEFI_ENTRY(\"%p, %p\", src1, src2);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static struct efi_device_path *append_device_node(\n+\tconst struct efi_device_path *device_path,\n+\tconst struct efi_device_path *device_node)\n+{\n+\tEFI_ENTRY(\"%p, %p\", device_path, device_node);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static struct efi_device_path *append_device_path_instance(\n+\tconst struct efi_device_path *device_path,\n+\tconst struct efi_device_path *device_path_instance)\n+{\n+\tEFI_ENTRY(\"%p, %p\", device_path, device_path_instance);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static struct efi_device_path *get_next_device_path_instance(\n+\tstruct efi_device_path **device_path_instance,\n+\tUINTN *device_path_instance_size)\n+{\n+\tEFI_ENTRY(\"%p, %p\", device_path_instance, device_path_instance_size);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static struct efi_device_path *create_device_node(\n+\tuint8_t node_type, uint8_t node_sub_type, uint16_t node_length)\n+{\n+\tEFI_ENTRY(\"%u, %u, %u\", node_type, node_sub_type, node_length);\n+\treturn EFI_EXIT(NULL);\n+}\n+\n+static bool is_device_path_multi_instance(\n+\tconst struct efi_device_path *device_path)\n+{\n+\tEFI_ENTRY(\"%p\", device_path);\n+\treturn EFI_EXIT(false);\n+}\n+\n+const struct efi_device_path_utilities_protocol efi_device_path_utilities = {\n+\t.get_device_path_size = get_device_path_size,\n+\t.duplicate_device_path = duplicate_device_path,\n+\t.append_device_path = append_device_path,\n+\t.append_device_node = append_device_node,\n+\t.append_device_path_instance = append_device_path_instance,\n+\t.get_next_device_path_instance = get_next_device_path_instance,\n+\t.create_device_node = create_device_node,\n+\t.is_device_path_multi_instance = is_device_path_multi_instance,\n+};\n","prefixes":["U-Boot","v1","01/12"]}