[{"id":1780022,"web_url":"http://patchwork.ozlabs.org/comment/1780022/","msgid":"<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>","list_archive_url":null,"date":"2017-10-04T17:57:50","subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 09/10/2017 03:22 PM, Rob Clark wrote:\n> From: Leif Lindholm <leif.lindholm@linaro.org>\n\nThe commit message is missing.\n\nFix all issues reported by checkpatch.\n\n> \n> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n> ---\n>  include/efi_api.h             | 33 +++++++++++++++++++\n>  include/efi_loader.h          |  2 ++\n>  lib/efi_loader/Makefile       |  2 +-\n>  lib/efi_loader/efi_boottime.c |  3 ++\n>  lib/efi_loader/efi_unicode.c  | 73 +++++++++++++++++++++++++++++++++++++++++++\n>  5 files changed, 112 insertions(+), 1 deletion(-)\n>  create mode 100644 lib/efi_loader/efi_unicode.c\n> \n> diff --git a/include/efi_api.h b/include/efi_api.h\n> index 932a3429a8..25f774f253 100644\n> --- a/include/efi_api.h\n> +++ b/include/efi_api.h\n> @@ -740,6 +740,39 @@ struct efi_hii_string_protocol\n>  \t\tUINTN *secondary_languages_size);\n>  };\n>  \n> +#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \\\n> +\tEFI_GUID(0xa4c751fc, 0x23ae, 0x4c3e, \\\n> +\t\t 0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49)\n> +\n> +struct efi_unicode_collation_protocol\n> +{\n\nERROR: open brace '{' following struct go on the same line\n#30: FILE: include/efi_api.h:748:\n+struct efi_unicode_collation_protocol\n+{\n\n> +\tINTN(EFIAPI *stri_coll)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t s1,\n> +\t\tefi_string_t s2);\n> +\tbool(EFIAPI *metai_match)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t string,\n> +\t\tefi_string_t pattern);\n> +\tvoid(EFIAPI *str_lwr)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t string);\n> +\tvoid(EFIAPI *str_upr)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t string);\n> +\tvoid(EFIAPI *fat_to_str)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tUINTN fat_size,\n> +\t\tuint8_t *fat,\n> +\t\tefi_string_t string);\n> +\tbool(EFIAPI *str_to_fat)(\n> +\t\tstruct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t string,\n> +\t\tUINTN fat_size,\n> +\t\tuint8_t *fat);\n> +\tuint8_t *supported_languages;\n> +};\n> +\n>  #define EFI_GOP_GUID \\\n>  \tEFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n>  \t\t 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\n> diff --git a/include/efi_loader.h b/include/efi_loader.h\n> index a89bb2fcd9..6668338d0b 100644\n> --- a/include/efi_loader.h\n> +++ b/include/efi_loader.h\n> @@ -62,6 +62,7 @@ extern const struct efi_device_path_utilities_protocol efi_device_path_utilities\n>  extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;\n>  extern const struct efi_hii_database_protocol efi_hii_database;\n>  extern const struct efi_hii_string_protocol efi_hii_string;\n> +extern const struct efi_unicode_collation_protocol efi_unicode_collation;\n>  \n>  uint16_t *efi_dp_str(struct efi_device_path *dp);\n>  \n> @@ -76,6 +77,7 @@ extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n>  extern const efi_guid_t efi_guid_hii_config_routing_protocol;\n>  extern const efi_guid_t efi_guid_hii_database_protocol;\n>  extern const efi_guid_t efi_guid_hii_string_protocol;\n> +extern const efi_guid_t efi_guid_unicode_collation_protocol2;\n>  \n>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\n> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\n> index e8fd6823a3..82b703bb39 100644\n> --- a/lib/efi_loader/Makefile\n> +++ b/lib/efi_loader/Makefile\n> @@ -16,7 +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 efi_hii.o\n> +obj-y += efi_device_path_utilities.o efi_hii.o efi_unicode.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\n> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n> index 4d1a16051b..04358e8aca 100644\n> --- a/lib/efi_loader/efi_boottime.c\n> +++ b/lib/efi_loader/efi_boottime.c\n> @@ -788,6 +788,9 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>  \tobj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n>  \tobj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n>  \n\nDo not add a protocol that is not properly implemented yet.\n\n> +\tobj->protocols[8].guid = &efi_guid_unicode_collation_protocol2;\n> +\tobj->protocols[8].protocol_interface = (void *)&efi_unicode_collation;\n> +\n>  \tinfo->file_path = file_path;\n>  \tinfo->device_handle = efi_dp_find_obj(device_path, NULL);\n>  \n> diff --git a/lib/efi_loader/efi_unicode.c b/lib/efi_loader/efi_unicode.c\n> new file mode 100644\n> index 0000000000..fdf1a99812\n> --- /dev/null\n> +++ b/lib/efi_loader/efi_unicode.c\n> @@ -0,0 +1,73 @@\n> +/*\n> +*  EFI Unicode 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_unicode_collation_protocol2 =\n> +\tEFI_UNICODE_COLLATION_PROTOCOL2_GUID;\n> +\n\nNone of the functions matches the definitions in the structure.\n\nAdd the missing EFIAPI.\n\nRegards\n\nHeinrich\n\n> +INTN stri_coll(struct efi_unicode_collation_protocol *this,\n> +\t       efi_string_t s1,\n> +\t       efi_string_t s2)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, s1, s2);\n> +\treturn EFI_EXIT(0);\n> +}\n> +\n> +bool metai_match(struct efi_unicode_collation_protocol *this,\n> +\t\t efi_string_t string,\n> +\t\t efi_string_t pattern)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, string, pattern);\n> +\treturn EFI_EXIT(false);\n> +}\n> +\n> +void str_lwr(struct efi_unicode_collation_protocol *this,\n> +\t     efi_string_t string)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n> +\tEFI_EXIT(0);\n\nEFI_EXIT(EFI_SUCCESS);\n\n> +\treturn;\n> +}\n> +\n> +void str_upr(struct efi_unicode_collation_protocol *this,\n> +\t     efi_string_t string)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n> +\tEFI_EXIT(0);\n\nEFI_EXIT(EFI_SUCCESS);\n\n> +\treturn;\n> +}\n> +\n> +void fat_to_str(struct efi_unicode_collation_protocol *this,\n> +\t\tUINTN fat_size,\n> +\t\tuint8_t *fat,\n> +\t\tefi_string_t string)\n> +{\n> +\tEFI_ENTRY(\"%p, %lu, \\\"%s\\\", %p\", this, fat_size, fat, string);\n> +\tEFI_EXIT(0);\n\nEFI_EXIT(EFI_SUCCESS);\n\n> +\treturn;\n> +}\n> +\n> +bool str_to_fat(struct efi_unicode_collation_protocol *this,\n> +\t\tefi_string_t string,\n> +\t\tUINTN fat_size,\n> +\t\tuint8_t *fat)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %lu, %p\", this, string, fat_size, fat);\n> +\treturn EFI_EXIT(false);\n> +}\n> +\n> +const struct efi_unicode_collation_protocol efi_unicode_collation = {\n> +\t.stri_coll = stri_coll,\n> +\t.metai_match = metai_match,\n> +\t.str_lwr = str_lwr,\n> +\t.str_upr = str_upr,\n> +\t.fat_to_str = fat_to_str,\n> +\t.str_to_fat = str_to_fat\n> +};\n>","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>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6kDm0Kbzz9t7R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 04:59:19 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 29293C21F8D; Wed,  4 Oct 2017 17:59:17 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 16205C21DA6;\n\tWed,  4 Oct 2017 17:59:13 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid B9E0DC21DA6; Wed,  4 Oct 2017 17:59:11 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.22])\n\tby lists.denx.de (Postfix) with ESMTPS id 3AA20C21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 17:59:11 +0000 (UTC)","from [192.168.123.82] ([94.114.42.150]) by mail.gmx.com (mrgmx102\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0LgvEY-1dUaG21ZoM-00oIhI; Wed, 04 Oct 2017 19:59:00 +0200"],"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\tautolearn=unavailable autolearn_force=no version=3.4.0","To":"Rob Clark <robdclark@gmail.com>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-4-robdclark@gmail.com>","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Message-ID":"<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>","Date":"Wed, 4 Oct 2017 19:57:50 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170910132236.14318-4-robdclark@gmail.com>","Content-Language":"en-US","X-Provags-ID":"V03:K0:wuoesfGx8p2xTMi9mJMv6WGQr2fNXQ6JkRXBLwaafFo6W+OXEOE\n\tMB0AtbXiNFFusODtazcGl6VmO+Bi3EuJstUxQcqhGLahunzlJrxRWNvYMAtcoo9+wV9BNye\n\tODkomqOYBgO6YEpuHrj/3HWQglFXcFOTeqayKuur+HiR6UIYRvt529726WED8BqJlTqEjxW\n\tKrZXJzOOSidz7dulA3X6w==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:1ixbd9W8hYE=:qaQIHECv41n/CLBcUzuSNu\n\tF99bxgZahP/+Ou1X5m4Fc/laUXYlF+U6GlOm352iei1MBf5tXi8GzISkr524a+WRchnAtkTw+\n\tWBNmkY7EM/4sUynt514MsBbPCwOsXwVUfV0y0/4+G6X6HltPmKt6XbndCAcZJAJKIRFqDKzo6\n\td9QU7lzuVCRhM3VR0FjcLmOllygq6ZABaXBTNXYk6wvy9/YQZ8ZjC785LTF+aLTVnAegzUfgc\n\tOJdzXa+9QI10CTtmy/xqH4Qmfp5i8P4F5WN+VcITUuJwWPDK+R4QbQ20bDCiGJz/HpI/t41R9\n\t5U4q8wFJkMM9mhQ7EYBf5fFda46qOwRezwoLbTiak8NkS276Px5Q+7mDIel/o1PMPCc7xO+72\n\thGf2IiQrFUo5e08XnUqFMKtMdmgzW68tjr8rgPgIYh0OGzPGvKC5tYH4IMN3wrJNZB3fIGDfa\n\tBqJrjBMJGbWTxYs/wt3Do7pf7jSsFfmaIiJhhzU7SQdz3a/+GeeDlcJA4H/1EilUDshPJ0/r+\n\tqAS4nX+su4H2DjpduThBj1F+TBcS2u7/rqjh8CaNAdi/HZpStdlIXsAk6sKmQm5iabQboTtv0\n\tGrlgKTo7ighuGxsl+aWsZp+iiLDOKsQ2VY3rihl2WtCpipISh2xLYjigVSLQVT4wMHat5HqB1\n\tKMd0st1u2DlAZ9s24rw9S3b/5Y4LobVkwN7slL0+HZJSk4yVsiKjhsFqFzf/4NdU8Nu+g9LpO\n\tD0ukVxKfZAEppVYN/mTff/YKD1Fr9cEGQz1rTIIsPrY6i/f3OWqOKnPQJ8famjJOZA3GIgcSh\n\tYcNjTvaMtslB3+SeUW+2HkO4tM59q3HmeM3D7tdaM/98R5Anpg=","Cc":"Peter Jones <pjones@redhat.com>, Leif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","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>","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>"}},{"id":1780046,"web_url":"http://patchwork.ozlabs.org/comment/1780046/","msgid":"<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","list_archive_url":null,"date":"2017-10-04T18:35:46","subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Wed, Oct 4, 2017 at 1:57 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n> On 09/10/2017 03:22 PM, Rob Clark wrote:\n>> From: Leif Lindholm <leif.lindholm@linaro.org>\n>\n> The commit message is missing.\n>\n> Fix all issues reported by checkpatch.\n>\n>>\n>> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n>> ---\n>>  include/efi_api.h             | 33 +++++++++++++++++++\n>>  include/efi_loader.h          |  2 ++\n>>  lib/efi_loader/Makefile       |  2 +-\n>>  lib/efi_loader/efi_boottime.c |  3 ++\n>>  lib/efi_loader/efi_unicode.c  | 73 +++++++++++++++++++++++++++++++++++++++++++\n>>  5 files changed, 112 insertions(+), 1 deletion(-)\n>>  create mode 100644 lib/efi_loader/efi_unicode.c\n>>\n>> diff --git a/include/efi_api.h b/include/efi_api.h\n>> index 932a3429a8..25f774f253 100644\n>> --- a/include/efi_api.h\n>> +++ b/include/efi_api.h\n>> @@ -740,6 +740,39 @@ struct efi_hii_string_protocol\n>>               UINTN *secondary_languages_size);\n>>  };\n>>\n>> +#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \\\n>> +     EFI_GUID(0xa4c751fc, 0x23ae, 0x4c3e, \\\n>> +              0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49)\n>> +\n>> +struct efi_unicode_collation_protocol\n>> +{\n>\n> ERROR: open brace '{' following struct go on the same line\n> #30: FILE: include/efi_api.h:748:\n> +struct efi_unicode_collation_protocol\n> +{\n>\n>> +     INTN(EFIAPI *stri_coll)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t s1,\n>> +             efi_string_t s2);\n>> +     bool(EFIAPI *metai_match)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t string,\n>> +             efi_string_t pattern);\n>> +     void(EFIAPI *str_lwr)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t string);\n>> +     void(EFIAPI *str_upr)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t string);\n>> +     void(EFIAPI *fat_to_str)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             UINTN fat_size,\n>> +             uint8_t *fat,\n>> +             efi_string_t string);\n>> +     bool(EFIAPI *str_to_fat)(\n>> +             struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t string,\n>> +             UINTN fat_size,\n>> +             uint8_t *fat);\n>> +     uint8_t *supported_languages;\n>> +};\n>> +\n>>  #define EFI_GOP_GUID \\\n>>       EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n>>                0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\n>> diff --git a/include/efi_loader.h b/include/efi_loader.h\n>> index a89bb2fcd9..6668338d0b 100644\n>> --- a/include/efi_loader.h\n>> +++ b/include/efi_loader.h\n>> @@ -62,6 +62,7 @@ extern const struct efi_device_path_utilities_protocol efi_device_path_utilities\n>>  extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;\n>>  extern const struct efi_hii_database_protocol efi_hii_database;\n>>  extern const struct efi_hii_string_protocol efi_hii_string;\n>> +extern const struct efi_unicode_collation_protocol efi_unicode_collation;\n>>\n>>  uint16_t *efi_dp_str(struct efi_device_path *dp);\n>>\n>> @@ -76,6 +77,7 @@ extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n>>  extern const efi_guid_t efi_guid_hii_config_routing_protocol;\n>>  extern const efi_guid_t efi_guid_hii_database_protocol;\n>>  extern const efi_guid_t efi_guid_hii_string_protocol;\n>> +extern const efi_guid_t efi_guid_unicode_collation_protocol2;\n>>\n>>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n>>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\n>> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\n>> index e8fd6823a3..82b703bb39 100644\n>> --- a/lib/efi_loader/Makefile\n>> +++ b/lib/efi_loader/Makefile\n>> @@ -16,7 +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 efi_hii.o\n>> +obj-y += efi_device_path_utilities.o efi_hii.o efi_unicode.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\n>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>> index 4d1a16051b..04358e8aca 100644\n>> --- a/lib/efi_loader/efi_boottime.c\n>> +++ b/lib/efi_loader/efi_boottime.c\n>> @@ -788,6 +788,9 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>>       obj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n>>       obj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n>>\n>\n> Do not add a protocol that is not properly implemented yet.\n\nThere is *no possible way* that I am going to completely implement\nHII, so big nak on this comment!\n\nIn general, my plan was to implement the minimal parts of these\nprotocols to get to the point where we can run SCT before implementing\nthe rest, so we at least have a way to test implementation against\ncompliance tests written against the spec (instead of our own tests\nwritten against our interpretation of the spec).  In the particular\ncase of HII, it includes things like forms based UI rendering, so I\ndon't think we'll ever implement the entire thing.  Or if someone did,\nwe'd probably want to make it something that can be disabled at\ncompile time to keep footprint down.\n\nAnyways, until we get to the point of loading option ROMs from PCI\ncards in u-boot I don't think we really need a setup menu or complete\nHII implementation ;-)\n\n>> +     obj->protocols[8].guid = &efi_guid_unicode_collation_protocol2;\n>> +     obj->protocols[8].protocol_interface = (void *)&efi_unicode_collation;\n>> +\n>>       info->file_path = file_path;\n>>       info->device_handle = efi_dp_find_obj(device_path, NULL);\n>>\n>> diff --git a/lib/efi_loader/efi_unicode.c b/lib/efi_loader/efi_unicode.c\n>> new file mode 100644\n>> index 0000000000..fdf1a99812\n>> --- /dev/null\n>> +++ b/lib/efi_loader/efi_unicode.c\n>> @@ -0,0 +1,73 @@\n>> +/*\n>> +*  EFI Unicode 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_unicode_collation_protocol2 =\n>> +     EFI_UNICODE_COLLATION_PROTOCOL2_GUID;\n>> +\n>\n> None of the functions matches the definitions in the structure.\n>\n> Add the missing EFIAPI.\n\nI was talking to Peter Jones about this, and he suggested something\nthat makes *way* more sense.. just build u-boot with '-mabi=ms_abi' on\nx86_64 (at least conditionally if EFI_LOADER is enabled).  That would\ntake a bit of work to annotate the os layer in sandbox to use sysv\nabi, but that is a lot smaller of an interface than EFI_LOADER (which\nis only going to continue to grow).\n\nAnyways, other than that, I'll double check the function order issues\nyou mentioned, I mostly assumed that Leif had it right (and I don't\nremember encountering any issues with that so far with\nShell.efi/SCT.efi).\n\nSome of your comments could be resolved by just squashing my\n\"implement\" patches with Leif's \"stub\" patches, but I didn't want to\ndo that without Leif's permission.\n\nBR,\n-R\n\n> Regards\n>\n> Heinrich\n>\n>> +INTN stri_coll(struct efi_unicode_collation_protocol *this,\n>> +            efi_string_t s1,\n>> +            efi_string_t s2)\n>> +{\n>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, s1, s2);\n>> +     return EFI_EXIT(0);\n>> +}\n>> +\n>> +bool metai_match(struct efi_unicode_collation_protocol *this,\n>> +              efi_string_t string,\n>> +              efi_string_t pattern)\n>> +{\n>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, string, pattern);\n>> +     return EFI_EXIT(false);\n>> +}\n>> +\n>> +void str_lwr(struct efi_unicode_collation_protocol *this,\n>> +          efi_string_t string)\n>> +{\n>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>> +     EFI_EXIT(0);\n>\n> EFI_EXIT(EFI_SUCCESS);\n>\n>> +     return;\n>> +}\n>> +\n>> +void str_upr(struct efi_unicode_collation_protocol *this,\n>> +          efi_string_t string)\n>> +{\n>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>> +     EFI_EXIT(0);\n>\n> EFI_EXIT(EFI_SUCCESS);\n>\n>> +     return;\n>> +}\n>> +\n>> +void fat_to_str(struct efi_unicode_collation_protocol *this,\n>> +             UINTN fat_size,\n>> +             uint8_t *fat,\n>> +             efi_string_t string)\n>> +{\n>> +     EFI_ENTRY(\"%p, %lu, \\\"%s\\\", %p\", this, fat_size, fat, string);\n>> +     EFI_EXIT(0);\n>\n> EFI_EXIT(EFI_SUCCESS);\n>\n>> +     return;\n>> +}\n>> +\n>> +bool str_to_fat(struct efi_unicode_collation_protocol *this,\n>> +             efi_string_t string,\n>> +             UINTN fat_size,\n>> +             uint8_t *fat)\n>> +{\n>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", %lu, %p\", this, string, fat_size, fat);\n>> +     return EFI_EXIT(false);\n>> +}\n>> +\n>> +const struct efi_unicode_collation_protocol efi_unicode_collation = {\n>> +     .stri_coll = stri_coll,\n>> +     .metai_match = metai_match,\n>> +     .str_lwr = str_lwr,\n>> +     .str_upr = str_upr,\n>> +     .fat_to_str = fat_to_str,\n>> +     .str_to_fat = str_to_fat\n>> +};\n>>\n>","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=\"YWH0nxaB\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6l352Vp8z9t7n\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 05:35:59 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 5301EC21F07; Wed,  4 Oct 2017 18:35:53 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id CEA1EC21DA6;\n\tWed,  4 Oct 2017 18:35:49 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 63098C21DA6; Wed,  4 Oct 2017 18:35:48 +0000 (UTC)","from mail-lf0-f44.google.com (mail-lf0-f44.google.com\n\t[209.85.215.44])\n\tby lists.denx.de (Postfix) with ESMTPS id D037AC21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 18:35:47 +0000 (UTC)","by mail-lf0-f44.google.com with SMTP id l23so7548301lfk.10\n\tfor <u-boot@lists.denx.de>; Wed, 04 Oct 2017 11:35:47 -0700 (PDT)","by 10.46.34.134 with HTTP; Wed, 4 Oct 2017 11:35:46 -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_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=+XUN2U3eUe8LBw+vp3JF0ePwg68khivgcHhhd6po4sY=;\n\tb=YWH0nxaBs+XpSNoL9CGckKymr9r+FaPa4BRDKOrTtkq9nzXFPYuvVwCDWAOKvsYIXs\n\ttt/8hzmAQSemSeetR70JERCHDjNWsZ+e36sCdTRKgUPZYCIfx52++4NHxRTXwx32g5Zp\n\tzsnqI8hPYk9MeGmi2MY5Z1woYuwuCeyylJOlGf4P7zrM7oJKD3Hz9hVRV9oQNKGfi0Sa\n\tzI3nYRSrBxuEqDr+L2OAX0/DPXtuiXfvJeX1XBChRGUgBB7LwhYKA8wqzTqWSuHrlEtb\n\tV3CawrsC9BD2W6uxZUOmeW17Za3dWbTi8DUV+3JzKb3jcIyBeHcUO1hrb3sHv+u9uKV+\n\tRdGw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=+XUN2U3eUe8LBw+vp3JF0ePwg68khivgcHhhd6po4sY=;\n\tb=T60mxGVEtzzeSpG+v7dgGgyGPyMLoLkw05apVJRGDjBOhp2Cx9bFTm5FksFPcCbGDe\n\t7TjGEQ0GlEL/A7xi5J/u668rhjXQH9R6wTGljslh8T3fvusoSMTxOt+BJIAYG47d+TSL\n\tlXW/se6NGOZDZwLLOEAFFI1VKjmWs9bOq8uaNErl84t46U/2/cAq2LFpDDCYwklXtieQ\n\tfORTWRr3mw2sQx7d0Cvwl2rijDXd2DeagTnAVsuf0LlSiUWi6oQ27WlA/eUvHMkW8UY6\n\tge3i2RELAb7uIaWhjd8h5pte5zf2I7IsaGs7zNWcGrqKAp/ej2tanW33Cip/jr7kWDSX\n\tMLyQ==","X-Gm-Message-State":"AMCzsaVPVtpI2n7Qb21csSfqC8YhMOdbkQ3OXxlgASiWX3+46JZw44VN\n\tyQLISUblJrlJY3fWWmnZomlqo6bYzTM5jEpHMzo=","X-Google-Smtp-Source":"AOwi7QDsGS75ADhEuhRSfpcAHS5WdtI1HG5qWUHASWlNOykkd+LgTxLZVigmhEnpBwftvVjQKPFUt8Pg0So+TZjzOYk=","X-Received":"by 10.25.41.147 with SMTP id p141mr6779834lfp.56.1507142147142; \n\tWed, 04 Oct 2017 11:35:47 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-4-robdclark@gmail.com>\n\t<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>","From":"Rob Clark <robdclark@gmail.com>","Date":"Wed, 4 Oct 2017 14:35:46 -0400","Message-ID":"<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","To":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tPeter Jones <pjones@redhat.com>, \n\tLeif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","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>","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>"}},{"id":1780065,"web_url":"http://patchwork.ozlabs.org/comment/1780065/","msgid":"<31eef36e-c093-ffc3-7584-65078708e979@gmx.de>","list_archive_url":null,"date":"2017-10-04T18:57:17","subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 10/04/2017 08:35 PM, Rob Clark wrote:\n> On Wed, Oct 4, 2017 at 1:57 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>> On 09/10/2017 03:22 PM, Rob Clark wrote:\n>>> From: Leif Lindholm <leif.lindholm@linaro.org>\n>>\n>> The commit message is missing.\n>>\n>> Fix all issues reported by checkpatch.\n>>\n>>>\n>>> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n>>> ---\n>>>  include/efi_api.h             | 33 +++++++++++++++++++\n>>>  include/efi_loader.h          |  2 ++\n>>>  lib/efi_loader/Makefile       |  2 +-\n>>>  lib/efi_loader/efi_boottime.c |  3 ++\n>>>  lib/efi_loader/efi_unicode.c  | 73 +++++++++++++++++++++++++++++++++++++++++++\n>>>  5 files changed, 112 insertions(+), 1 deletion(-)\n>>>  create mode 100644 lib/efi_loader/efi_unicode.c\n>>>\n>>> diff --git a/include/efi_api.h b/include/efi_api.h\n>>> index 932a3429a8..25f774f253 100644\n>>> --- a/include/efi_api.h\n>>> +++ b/include/efi_api.h\n>>> @@ -740,6 +740,39 @@ struct efi_hii_string_protocol\n>>>               UINTN *secondary_languages_size);\n>>>  };\n>>>\n>>> +#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \\\n>>> +     EFI_GUID(0xa4c751fc, 0x23ae, 0x4c3e, \\\n>>> +              0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49)\n>>> +\n>>> +struct efi_unicode_collation_protocol\n>>> +{\n>>\n>> ERROR: open brace '{' following struct go on the same line\n>> #30: FILE: include/efi_api.h:748:\n>> +struct efi_unicode_collation_protocol\n>> +{\n>>\n>>> +     INTN(EFIAPI *stri_coll)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t s1,\n>>> +             efi_string_t s2);\n>>> +     bool(EFIAPI *metai_match)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t string,\n>>> +             efi_string_t pattern);\n>>> +     void(EFIAPI *str_lwr)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t string);\n>>> +     void(EFIAPI *str_upr)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t string);\n>>> +     void(EFIAPI *fat_to_str)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             UINTN fat_size,\n>>> +             uint8_t *fat,\n>>> +             efi_string_t string);\n>>> +     bool(EFIAPI *str_to_fat)(\n>>> +             struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t string,\n>>> +             UINTN fat_size,\n>>> +             uint8_t *fat);\n>>> +     uint8_t *supported_languages;\n>>> +};\n>>> +\n>>>  #define EFI_GOP_GUID \\\n>>>       EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n>>>                0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\n>>> diff --git a/include/efi_loader.h b/include/efi_loader.h\n>>> index a89bb2fcd9..6668338d0b 100644\n>>> --- a/include/efi_loader.h\n>>> +++ b/include/efi_loader.h\n>>> @@ -62,6 +62,7 @@ extern const struct efi_device_path_utilities_protocol efi_device_path_utilities\n>>>  extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;\n>>>  extern const struct efi_hii_database_protocol efi_hii_database;\n>>>  extern const struct efi_hii_string_protocol efi_hii_string;\n>>> +extern const struct efi_unicode_collation_protocol efi_unicode_collation;\n>>>\n>>>  uint16_t *efi_dp_str(struct efi_device_path *dp);\n>>>\n>>> @@ -76,6 +77,7 @@ extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n>>>  extern const efi_guid_t efi_guid_hii_config_routing_protocol;\n>>>  extern const efi_guid_t efi_guid_hii_database_protocol;\n>>>  extern const efi_guid_t efi_guid_hii_string_protocol;\n>>> +extern const efi_guid_t efi_guid_unicode_collation_protocol2;\n>>>\n>>>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n>>>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\n>>> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\n>>> index e8fd6823a3..82b703bb39 100644\n>>> --- a/lib/efi_loader/Makefile\n>>> +++ b/lib/efi_loader/Makefile\n>>> @@ -16,7 +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 efi_hii.o\n>>> +obj-y += efi_device_path_utilities.o efi_hii.o efi_unicode.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\n>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>>> index 4d1a16051b..04358e8aca 100644\n>>> --- a/lib/efi_loader/efi_boottime.c\n>>> +++ b/lib/efi_loader/efi_boottime.c\n>>> @@ -788,6 +788,9 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>>>       obj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n>>>       obj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n>>>\n>>\n>> Do not add a protocol that is not properly implemented yet.\n> \n> There is *no possible way* that I am going to completely implement\n> HII, so big nak on this comment!\n> \n> In general, my plan was to implement the minimal parts of these\n> protocols to get to the point where we can run SCT before implementing\n> the rest, so we at least have a way to test implementation against\n> compliance tests written against the spec (instead of our own tests\n> written against our interpretation of the spec).  In the particular\n> case of HII, it includes things like forms based UI rendering, so I\n> don't think we'll ever implement the entire thing.  Or if someone did,\n> we'd probably want to make it something that can be disabled at\n> compile time to keep footprint down.\n> \n> Anyways, until we get to the point of loading option ROMs from PCI\n> cards in u-boot I don't think we really need a setup menu or complete\n> HII implementation ;-)\n> \n>>> +     obj->protocols[8].guid = &efi_guid_unicode_collation_protocol2;\n>>> +     obj->protocols[8].protocol_interface = (void *)&efi_unicode_collation;\n>>> +\n>>>       info->file_path = file_path;\n>>>       info->device_handle = efi_dp_find_obj(device_path, NULL);\n>>>\n>>> diff --git a/lib/efi_loader/efi_unicode.c b/lib/efi_loader/efi_unicode.c\n>>> new file mode 100644\n>>> index 0000000000..fdf1a99812\n>>> --- /dev/null\n>>> +++ b/lib/efi_loader/efi_unicode.c\n>>> @@ -0,0 +1,73 @@\n>>> +/*\n>>> +*  EFI Unicode 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_unicode_collation_protocol2 =\n>>> +     EFI_UNICODE_COLLATION_PROTOCOL2_GUID;\n>>> +\n>>\n>> None of the functions matches the definitions in the structure.\n>>\n>> Add the missing EFIAPI.\n> \n> I was talking to Peter Jones about this, and he suggested something\n> that makes *way* more sense.. just build u-boot with '-mabi=ms_abi' on\n> x86_64 (at least conditionally if EFI_LOADER is enabled).  That would\n> take a bit of work to annotate the os layer in sandbox to use sysv\n> abi, but that is a lot smaller of an interface than EFI_LOADER (which\n> is only going to continue to grow).\n\nLet's first get your patch series in before starting a new job.\n\nOtherwise we will never stop blocking each other.\n\nRegards\n\nHeinrich\n\n> \n> Anyways, other than that, I'll double check the function order issues\n> you mentioned, I mostly assumed that Leif had it right (and I don't\n> remember encountering any issues with that so far with\n> Shell.efi/SCT.efi).\n> \n> Some of your comments could be resolved by just squashing my\n> \"implement\" patches with Leif's \"stub\" patches, but I didn't want to\n> do that without Leif's permission.\n> \n> BR,\n> -R\n> \n>> Regards\n>>\n>> Heinrich\n>>\n>>> +INTN stri_coll(struct efi_unicode_collation_protocol *this,\n>>> +            efi_string_t s1,\n>>> +            efi_string_t s2)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, s1, s2);\n>>> +     return EFI_EXIT(0);\n>>> +}\n>>> +\n>>> +bool metai_match(struct efi_unicode_collation_protocol *this,\n>>> +              efi_string_t string,\n>>> +              efi_string_t pattern)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, string, pattern);\n>>> +     return EFI_EXIT(false);\n>>> +}\n>>> +\n>>> +void str_lwr(struct efi_unicode_collation_protocol *this,\n>>> +          efi_string_t string)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>>> +     EFI_EXIT(0);\n>>\n>> EFI_EXIT(EFI_SUCCESS);\n>>\n>>> +     return;\n>>> +}\n>>> +\n>>> +void str_upr(struct efi_unicode_collation_protocol *this,\n>>> +          efi_string_t string)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>>> +     EFI_EXIT(0);\n>>\n>> EFI_EXIT(EFI_SUCCESS);\n>>\n>>> +     return;\n>>> +}\n>>> +\n>>> +void fat_to_str(struct efi_unicode_collation_protocol *this,\n>>> +             UINTN fat_size,\n>>> +             uint8_t *fat,\n>>> +             efi_string_t string)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, %lu, \\\"%s\\\", %p\", this, fat_size, fat, string);\n>>> +     EFI_EXIT(0);\n>>\n>> EFI_EXIT(EFI_SUCCESS);\n>>\n>>> +     return;\n>>> +}\n>>> +\n>>> +bool str_to_fat(struct efi_unicode_collation_protocol *this,\n>>> +             efi_string_t string,\n>>> +             UINTN fat_size,\n>>> +             uint8_t *fat)\n>>> +{\n>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", %lu, %p\", this, string, fat_size, fat);\n>>> +     return EFI_EXIT(false);\n>>> +}\n>>> +\n>>> +const struct efi_unicode_collation_protocol efi_unicode_collation = {\n>>> +     .stri_coll = stri_coll,\n>>> +     .metai_match = metai_match,\n>>> +     .str_lwr = str_lwr,\n>>> +     .str_upr = str_upr,\n>>> +     .fat_to_str = fat_to_str,\n>>> +     .str_to_fat = str_to_fat\n>>> +};\n>>>\n>>\n>","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>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6lYV291tz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 05:58:54 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 0CBBEC21F96; Wed,  4 Oct 2017 18:58:52 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1F0D2C21DA6;\n\tWed,  4 Oct 2017 18:58:48 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 8FE2CC21DA6; Wed,  4 Oct 2017 18:58:46 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.15.19])\n\tby lists.denx.de (Postfix) with ESMTPS id 1B4E3C21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 18:58:46 +0000 (UTC)","from [192.168.123.82] ([94.114.42.150]) by mail.gmx.com (mrgmx002\n\t[212.227.17.190]) with ESMTPSA (Nemesis) id\n\t0ML72n-1dzXlC3dxp-000MeN; Wed, 04 Oct 2017 20:58:35 +0200"],"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\tautolearn=unavailable autolearn_force=no version=3.4.0","To":"Rob Clark <robdclark@gmail.com>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-4-robdclark@gmail.com>\n\t<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>\n\t<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Message-ID":"<31eef36e-c093-ffc3-7584-65078708e979@gmx.de>","Date":"Wed, 4 Oct 2017 20:57:17 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","Content-Language":"en-US","X-Provags-ID":"V03:K0:fAUsgpjWjNcdwvuUNI07M+4Rt+iwsK+joEdNxeo/6VrNZs+drf3\n\tBHBw64Xp4WWGSDPRScz4e1e49gPR4TOHRHVGQW0Wy9RcHAwl/zNC7jIgLkzg50hQlIMKXaA\n\to+syUmin8OSltpOHzS4Dolv/vcrNImm7AiMucKgpUGDBjugDZOdt4d+atkJ6CNTUm4xkqQa\n\tLagjkFGP3Mgvx9Msps9Xg==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:aDqPijTeg3w=:2BsNAjwtzTOhe99gIxOJwS\n\tnnP1lh8mmy+kUeXv5YUDai3G3OETi2g2lj6RLOI81a4AXOJCGPRzpdj5z/zQrN702xPKehoVz\n\tnE2ROqABsF6RwJB2SCH6JV/JS5EKzQslcX6nEkGUUR7qn1aD6uvZb9h6hTVaHAzCVcOLWL1zN\n\tly3e6VR+GiMZWmnUfOI8OcQhsLIvboLcBq4z/4APvOjcawShJqwa/uy/Sp9bElFHikPrTM4qq\n\tkypuoP5Jrxcm2IWUiM5TQGlkJR86lj0/iuFTTR/5JudXAXe5nX/5KpiChUiLXXyi27Cj5eXQp\n\tv+sNeyd0VltgksC9L8/QhBgt/w49nnfXYoRLx3T4iLd0E0/hmcSSCxoOJjmXzbA0OebsAwPR8\n\tiDdxdi/8XV++7+fHnr+nxMoSrm9h083RenKfkwiVrf71aWAEzebSlzfPhc6ffdumhuKhMO9GX\n\txLytlN0k3Y4NuifWQuMtI80le3rtKgzECpM9HjwcenlzlIqrZ7sr+oDcsafHBv33D9MiFpEZ1\n\tUyCUnc5M5ffy0gnCjwn/i7MNLT0pMGuLuL50I+fyI6gm2y+dnoioN5ea0oTDjcHGjLs0y6Jv1\n\tR0446fUerkp0BpNIfQ8vIBMmglErmPybwpmhlHJcmcZeDdYoR2SpVMd421BxrUXxdWEExpnVF\n\tM9oTEw+fXqQ3UHvmqfGYlb9Fqgte4jueu+PvFBoKYlsvPKO3Kw2wlDA5XC3e+YqEGH11tuVcy\n\tsoZPPGhoLJ5Jw2VIP0OWDyh2jEekDFxxmxYQwNRyrFoVYxfTQNPfto2iuXTwmZQIxeTeZyHrL\n\ttCIvTHpfx8UyNl+Oo+rZ1+MYhwY08r2j3hiichm7xSu/3CvabM=","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tPeter Jones <pjones@redhat.com>, \n\tLeif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","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>","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>"}},{"id":1780072,"web_url":"http://patchwork.ozlabs.org/comment/1780072/","msgid":"<20171004190144.fchg2a4dzduz4eqs@redhat.com>","list_archive_url":null,"date":"2017-10-04T19:01:44","subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","submitter":{"id":43746,"url":"http://patchwork.ozlabs.org/api/people/43746/","name":"Peter Jones","email":"pjones@redhat.com"},"content":"On Wed, Oct 04, 2017 at 06:35:46PM +0000, Rob Clark wrote:\n> > Add the missing EFIAPI.\n> \n> I was talking to Peter Jones about this, and he suggested something\n> that makes *way* more sense.. just build u-boot with '-mabi=ms_abi' on\n> x86_64 (at least conditionally if EFI_LOADER is enabled).  That would\n> take a bit of work to annotate the os layer in sandbox to use sysv\n> abi, but that is a lot smaller of an interface than EFI_LOADER (which\n> is only going to continue to grow).\n\nWorth noting that if we went this route, we'd also need to do\n-mregparm=0 on 32-bit x86.","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>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pjones@redhat.com"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6ldB2gs7z9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 06:02:06 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 21908C21EBC; Wed,  4 Oct 2017 19:02:01 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id D71EAC21DA6;\n\tWed,  4 Oct 2017 19:01:58 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid BDCC9C21DA6; Wed,  4 Oct 2017 19:01:57 +0000 (UTC)","from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby lists.denx.de (Postfix) with ESMTPS id 3A94CC21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 19:01:57 +0000 (UTC)","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 8FF8B806AC;\n\tWed,  4 Oct 2017 19:01:55 +0000 (UTC)","from redhat.com (dhcp-10-20-1-221.bss.redhat.com [10.20.1.221])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id E7D8C6362C;\n\tWed,  4 Oct 2017 19:01:54 +0000 (UTC)"],"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=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tSPF_HELO_PASS autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 8FF8B806AC","Date":"Wed, 4 Oct 2017 15:01:44 -0400","From":"Peter Jones <pjones@redhat.com>","To":"Rob Clark <robdclark@gmail.com>","Message-ID":"<20171004190144.fchg2a4dzduz4eqs@redhat.com>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-4-robdclark@gmail.com>\n\t<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>\n\t<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]); Wed, 04 Oct 2017 19:01:55 +0000 (UTC)","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>,\n\tLeif Lindholm <leif.lindholm@linaro.org>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","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>","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>"}},{"id":1780074,"web_url":"http://patchwork.ozlabs.org/comment/1780074/","msgid":"<98098d34-0a83-c52a-d539-5b30a2d7c34a@gmx.de>","list_archive_url":null,"date":"2017-10-04T19:02:47","subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 10/04/2017 08:57 PM, Heinrich Schuchardt wrote:\n> On 10/04/2017 08:35 PM, Rob Clark wrote:\n>> On Wed, Oct 4, 2017 at 1:57 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>>> On 09/10/2017 03:22 PM, Rob Clark wrote:\n>>>> From: Leif Lindholm <leif.lindholm@linaro.org>\n>>>\n>>> The commit message is missing.\n>>>\n>>> Fix all issues reported by checkpatch.\n>>>\n>>>>\n>>>> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n>>>> ---\n>>>>  include/efi_api.h             | 33 +++++++++++++++++++\n>>>>  include/efi_loader.h          |  2 ++\n>>>>  lib/efi_loader/Makefile       |  2 +-\n>>>>  lib/efi_loader/efi_boottime.c |  3 ++\n>>>>  lib/efi_loader/efi_unicode.c  | 73 +++++++++++++++++++++++++++++++++++++++++++\n>>>>  5 files changed, 112 insertions(+), 1 deletion(-)\n>>>>  create mode 100644 lib/efi_loader/efi_unicode.c\n>>>>\n>>>> diff --git a/include/efi_api.h b/include/efi_api.h\n>>>> index 932a3429a8..25f774f253 100644\n>>>> --- a/include/efi_api.h\n>>>> +++ b/include/efi_api.h\n>>>> @@ -740,6 +740,39 @@ struct efi_hii_string_protocol\n>>>>               UINTN *secondary_languages_size);\n>>>>  };\n>>>>\n>>>> +#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \\\n>>>> +     EFI_GUID(0xa4c751fc, 0x23ae, 0x4c3e, \\\n>>>> +              0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49)\n>>>> +\n>>>> +struct efi_unicode_collation_protocol\n>>>> +{\n>>>\n>>> ERROR: open brace '{' following struct go on the same line\n>>> #30: FILE: include/efi_api.h:748:\n>>> +struct efi_unicode_collation_protocol\n>>> +{\n>>>\n>>>> +     INTN(EFIAPI *stri_coll)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t s1,\n>>>> +             efi_string_t s2);\n>>>> +     bool(EFIAPI *metai_match)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t string,\n>>>> +             efi_string_t pattern);\n>>>> +     void(EFIAPI *str_lwr)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t string);\n>>>> +     void(EFIAPI *str_upr)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t string);\n>>>> +     void(EFIAPI *fat_to_str)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             UINTN fat_size,\n>>>> +             uint8_t *fat,\n>>>> +             efi_string_t string);\n>>>> +     bool(EFIAPI *str_to_fat)(\n>>>> +             struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t string,\n>>>> +             UINTN fat_size,\n>>>> +             uint8_t *fat);\n>>>> +     uint8_t *supported_languages;\n>>>> +};\n>>>> +\n>>>>  #define EFI_GOP_GUID \\\n>>>>       EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n>>>>                0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\n>>>> diff --git a/include/efi_loader.h b/include/efi_loader.h\n>>>> index a89bb2fcd9..6668338d0b 100644\n>>>> --- a/include/efi_loader.h\n>>>> +++ b/include/efi_loader.h\n>>>> @@ -62,6 +62,7 @@ extern const struct efi_device_path_utilities_protocol efi_device_path_utilities\n>>>>  extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;\n>>>>  extern const struct efi_hii_database_protocol efi_hii_database;\n>>>>  extern const struct efi_hii_string_protocol efi_hii_string;\n>>>> +extern const struct efi_unicode_collation_protocol efi_unicode_collation;\n>>>>\n>>>>  uint16_t *efi_dp_str(struct efi_device_path *dp);\n>>>>\n>>>> @@ -76,6 +77,7 @@ extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n>>>>  extern const efi_guid_t efi_guid_hii_config_routing_protocol;\n>>>>  extern const efi_guid_t efi_guid_hii_database_protocol;\n>>>>  extern const efi_guid_t efi_guid_hii_string_protocol;\n>>>> +extern const efi_guid_t efi_guid_unicode_collation_protocol2;\n>>>>\n>>>>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n>>>>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\n>>>> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\n>>>> index e8fd6823a3..82b703bb39 100644\n>>>> --- a/lib/efi_loader/Makefile\n>>>> +++ b/lib/efi_loader/Makefile\n>>>> @@ -16,7 +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 efi_hii.o\n>>>> +obj-y += efi_device_path_utilities.o efi_hii.o efi_unicode.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\n>>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>>>> index 4d1a16051b..04358e8aca 100644\n>>>> --- a/lib/efi_loader/efi_boottime.c\n>>>> +++ b/lib/efi_loader/efi_boottime.c\n>>>> @@ -788,6 +788,9 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>>>>       obj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n>>>>       obj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n>>>>\n>>>\n>>> Do not add a protocol that is not properly implemented yet.\n>>\n>> There is *no possible way* that I am going to completely implement\n>> HII, so big nak on this comment!\n\nBut this patch implements nothing.\n\nSo move adding the protocol to the image to your follow-up patch.\n\nRegards\n\nHeinrich\n\n>>\n>> In general, my plan was to implement the minimal parts of these\n>> protocols to get to the point where we can run SCT before implementing\n>> the rest, so we at least have a way to test implementation against\n>> compliance tests written against the spec (instead of our own tests\n>> written against our interpretation of the spec).  In the particular\n>> case of HII, it includes things like forms based UI rendering, so I\n>> don't think we'll ever implement the entire thing.  Or if someone did,\n>> we'd probably want to make it something that can be disabled at\n>> compile time to keep footprint down.\n>>\n>> Anyways, until we get to the point of loading option ROMs from PCI\n>> cards in u-boot I don't think we really need a setup menu or complete\n>> HII implementation ;-)\n>>\n>>>> +     obj->protocols[8].guid = &efi_guid_unicode_collation_protocol2;\n>>>> +     obj->protocols[8].protocol_interface = (void *)&efi_unicode_collation;\n>>>> +\n>>>>       info->file_path = file_path;\n>>>>       info->device_handle = efi_dp_find_obj(device_path, NULL);\n>>>>\n>>>> diff --git a/lib/efi_loader/efi_unicode.c b/lib/efi_loader/efi_unicode.c\n>>>> new file mode 100644\n>>>> index 0000000000..fdf1a99812\n>>>> --- /dev/null\n>>>> +++ b/lib/efi_loader/efi_unicode.c\n>>>> @@ -0,0 +1,73 @@\n>>>> +/*\n>>>> +*  EFI Unicode 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_unicode_collation_protocol2 =\n>>>> +     EFI_UNICODE_COLLATION_PROTOCOL2_GUID;\n>>>> +\n>>>\n>>> None of the functions matches the definitions in the structure.\n>>>\n>>> Add the missing EFIAPI.\n>>\n>> I was talking to Peter Jones about this, and he suggested something\n>> that makes *way* more sense.. just build u-boot with '-mabi=ms_abi' on\n>> x86_64 (at least conditionally if EFI_LOADER is enabled).  That would\n>> take a bit of work to annotate the os layer in sandbox to use sysv\n>> abi, but that is a lot smaller of an interface than EFI_LOADER (which\n>> is only going to continue to grow).\n> \n> Let's first get your patch series in before starting a new job.\n> \n> Otherwise we will never stop blocking each other.\n> \n> Regards\n> \n> Heinrich\n> \n>>\n>> Anyways, other than that, I'll double check the function order issues\n>> you mentioned, I mostly assumed that Leif had it right (and I don't\n>> remember encountering any issues with that so far with\n>> Shell.efi/SCT.efi).\n>>\n>> Some of your comments could be resolved by just squashing my\n>> \"implement\" patches with Leif's \"stub\" patches, but I didn't want to\n>> do that without Leif's permission.\n>>\n>> BR,\n>> -R\n>>\n>>> Regards\n>>>\n>>> Heinrich\n>>>\n>>>> +INTN stri_coll(struct efi_unicode_collation_protocol *this,\n>>>> +            efi_string_t s1,\n>>>> +            efi_string_t s2)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, s1, s2);\n>>>> +     return EFI_EXIT(0);\n>>>> +}\n>>>> +\n>>>> +bool metai_match(struct efi_unicode_collation_protocol *this,\n>>>> +              efi_string_t string,\n>>>> +              efi_string_t pattern)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", \\\"%ls\\\"\", this, string, pattern);\n>>>> +     return EFI_EXIT(false);\n>>>> +}\n>>>> +\n>>>> +void str_lwr(struct efi_unicode_collation_protocol *this,\n>>>> +          efi_string_t string)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>>>> +     EFI_EXIT(0);\n>>>\n>>> EFI_EXIT(EFI_SUCCESS);\n>>>\n>>>> +     return;\n>>>> +}\n>>>> +\n>>>> +void str_upr(struct efi_unicode_collation_protocol *this,\n>>>> +          efi_string_t string)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\"\", this, string);\n>>>> +     EFI_EXIT(0);\n>>>\n>>> EFI_EXIT(EFI_SUCCESS);\n>>>\n>>>> +     return;\n>>>> +}\n>>>> +\n>>>> +void fat_to_str(struct efi_unicode_collation_protocol *this,\n>>>> +             UINTN fat_size,\n>>>> +             uint8_t *fat,\n>>>> +             efi_string_t string)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, %lu, \\\"%s\\\", %p\", this, fat_size, fat, string);\n>>>> +     EFI_EXIT(0);\n>>>\n>>> EFI_EXIT(EFI_SUCCESS);\n>>>\n>>>> +     return;\n>>>> +}\n>>>> +\n>>>> +bool str_to_fat(struct efi_unicode_collation_protocol *this,\n>>>> +             efi_string_t string,\n>>>> +             UINTN fat_size,\n>>>> +             uint8_t *fat)\n>>>> +{\n>>>> +     EFI_ENTRY(\"%p, \\\"%ls\\\", %lu, %p\", this, string, fat_size, fat);\n>>>> +     return EFI_EXIT(false);\n>>>> +}\n>>>> +\n>>>> +const struct efi_unicode_collation_protocol efi_unicode_collation = {\n>>>> +     .stri_coll = stri_coll,\n>>>> +     .metai_match = metai_match,\n>>>> +     .str_lwr = str_lwr,\n>>>> +     .str_upr = str_upr,\n>>>> +     .fat_to_str = fat_to_str,\n>>>> +     .str_to_fat = str_to_fat\n>>>> +};\n>>>>\n>>>\n>>\n> \n>","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>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6lgt5yfbz9t5q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 06:04:26 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 949CCC21DA0; Wed,  4 Oct 2017 19:04:24 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id AAF76C21DA6;\n\tWed,  4 Oct 2017 19:04:18 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid ADD10C21DAB; Wed,  4 Oct 2017 19:04:16 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.15.15])\n\tby lists.denx.de (Postfix) with ESMTPS id 39884C21DA6\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 19:04:16 +0000 (UTC)","from [192.168.123.82] ([94.114.42.150]) by mail.gmx.com (mrgmx002\n\t[212.227.17.190]) with ESMTPSA (Nemesis) id\n\t0LptId-1dLWfS3Exj-00fjVt; Wed, 04 Oct 2017 21:04:05 +0200"],"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\tautolearn=unavailable autolearn_force=no version=3.4.0","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","To":"Rob Clark <robdclark@gmail.com>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-4-robdclark@gmail.com>\n\t<8df92857-7c4f-13ab-b1ad-1f929005aa9e@gmx.de>\n\t<CAF6AEGvMU2nW-q8X-W=vv1g94Xz_fe5VQ_pGZ9+3kHLXvJ4Zug@mail.gmail.com>\n\t<31eef36e-c093-ffc3-7584-65078708e979@gmx.de>","Message-ID":"<98098d34-0a83-c52a-d539-5b30a2d7c34a@gmx.de>","Date":"Wed, 4 Oct 2017 21:02:47 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<31eef36e-c093-ffc3-7584-65078708e979@gmx.de>","Content-Language":"en-US","X-Provags-ID":"V03:K0:ucdTtoiuTrtGaDGHO8oyh8CA77Bdi/ZxQg/EQKCF8ynSBt58Thx\n\tqKZBli34WTqphFi1e5yQUOJgnXAo3bbVxswzJUXlnbAbbAIJcFBY3tEsGce2PLxwcU6llhB\n\tuBBiKF25F1PgSUo93gjP/GtK/Z+g5MZ5fT9+GpFoPHhUXDPa0G0EVqBd8ffTuv1uh/zTH3p\n\tEjkvcysa3Ha3ZEfIbn3eQ==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:S1WNLdc4sPA=:FOXWwiwwU5YAw1bLYO3yIW\n\tUxB6x8w0hYrUApFcYuh58qvNdQCOVQBopUvDhdvK2NiRBevS7oiUWM+CYYYWdgJ7xwXjNaUWo\n\tQvMZ+TS9UzP9U11eq+RR2bxyMXz/wyYQI2yy0waXOR437Y9vYwPkuNSMbVdr45AwyiZ25Qjxo\n\tr1sZ884jyajC4Z1d9S+mpesMhXuBLpYAEO45kS3+G6HAucJmhe04vTMCf7ZdNT4rgeruxwuay\n\tmq1CufaXjwhTTjMhq3UP9Zi8tfpO4H2XzJAfXf/mRQIWMz+NbC0NVj47yXyqZyw9Hw78SGe62\n\tiWLGIMhVe+DjF3Fxf68QaT+rJsJtENrE+OnwXqmJHJBNNzVto4bvEZjWF45pQBexbt0Ifg/zz\n\tDoxZDR1pX+dRK244AwcIg98BvtckI1izvVDOXm+jVri5tVbxJmb3DAkVrJAuuglLMYqjatJth\n\tsaNjW2VP769/dTthBfGUwtUWVTbRmlXaONKHYnaGsssTOYB1coQ4qPIe731CYgN+/JZ8NYmIC\n\tyi20c/SdI9JPCdTPZbJ1tEJe1yxkCKg7NQ46Lp5v2PW9I6VnRAYBvo+Cw4TuoZkYxtjnGBLkJ\n\tUpBc4u4pys/6YkRrzHphoKjxHQhgDHrWY65gD6I90PLm+j5KAplecxwj3IG2dQDSCys0u7gTm\n\tQ9hgNMBbU5ctzd0zR9nrRUtcnAVBLB0d4T9XtkliTKRr07tjIbnLuqoXeTPx5106XI0hzxMjV\n\twjtbLvoqaLMWecbHkEQ6eqMffjnR7xoES6KZUlF6LfSFtrVV1cUwihEJKRmv2Hdkrl8GiLdNr\n\t4CVWWat5z1TQMmNd5j7gQhqVntqSYt/7DrfNbdmZ5H3GWUv5mg=","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tPeter Jones <pjones@redhat.com>, \n\tLeif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 03/12] efi_loader: add\n\tEFI_UNICODE_COLLATION_PROTOCOL stub","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>","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>"}}]