[{"id":1760962,"web_url":"http://patchwork.ozlabs.org/comment/1760962/","msgid":"<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>","list_archive_url":null,"date":"2017-08-31T12:52:04","subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"On 27 August 2017 at 06:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n> ---\n>  lib/efi_loader/efi_boottime.c | 77 ++++++++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 76 insertions(+), 1 deletion(-)\n>\n> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n> index 1069da7d79..c5a17b6252 100644\n> --- a/lib/efi_loader/efi_boottime.c\n> +++ b/lib/efi_loader/efi_boottime.c\n> @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle,\n>                                                      void *driver_image_handle,\n>                                                      void *child_handle)\n\nCan you add a function comment?\n\n>  {\n> +       struct efi_driver_binding_protocol *binding_protocol;\n> +       efi_handle_t child_handle_buffer;\n> +       unsigned long driver_count;\n> +       efi_handle_t *driver_handle_buffer;\n> +       size_t i;\n> +       UINTN number_of_children;\n\nCan we somehow use a lower-case type for this? Otherwise U-Boot will\nstart to look like EFI and I will have to start taking\nantidepressants.\n\n> +       efi_status_t r;\n> +       size_t stop_count = 0;\n> +\n>         EFI_ENTRY(\"%p, %p, %p\", controller_handle, driver_image_handle,\n>                   child_handle);\n> -       return EFI_EXIT(EFI_INVALID_PARAMETER);\n> +\n> +       if (!efi_search_obj(controller_handle)) {\n> +               r = EFI_INVALID_PARAMETER;\n> +               goto out;\n> +       }\n> +\n> +       /* Create list of driver handles */\n> +       if (driver_image_handle) {\n> +               driver_handle_buffer = &driver_image_handle,\n> +               driver_count = 1;\n> +               /* Check that the handle supports driver binding protocol */\n> +               r = efi_search_protocol(driver_image_handle,\n> +                                       &efi_guid_driver_binding_protocol,\n> +                                       NULL);\n> +       } else {\n> +               /* Get buffer with all handles with driver binding protocol */\n> +               r = EFI_CALL(efi_locate_handle_buffer(\n> +                            by_protocol, &efi_guid_driver_binding_protocol,\n> +                            NULL, &driver_count, &driver_handle_buffer));\n> +       }\n> +       if (r != EFI_SUCCESS)\n> +               goto out;\n> +\n> +       /* Create list of child handles */\n> +       if (child_handle) {\n> +               number_of_children = 1;\n> +               child_handle_buffer = &child_handle;\n> +       } else {\n> +               /*\n> +                * We do not fully support child handles.\n> +                *\n> +                * It is unclear from which handle and which protocols the\n> +                * list of child controllers should be collected.\n> +                */\n> +               number_of_children = 0;\n> +               child_handle_buffer = NULL;\n> +       }\n> +\n> +       for (i = 0; i < driver_count; ++i) {\n> +               r = EFI_CALL(efi_open_protocol(\n> +                            driver_handle_buffer[i],\n> +                            &efi_guid_driver_binding_protocol,\n> +                            (void **)&binding_protocol,\n> +                            driver_handle_buffer[i], NULL,\n> +                            EFI_OPEN_PROTOCOL_GET_PROTOCOL));\n> +               if (r != EFI_SUCCESS)\n> +                       continue;\n> +\n> +               r = EFI_CALL(binding_protocol->stop(binding_protocol,\n> +                                                   controller_handle,\n> +                                                   number_of_children,\n> +                                                   child_handle_buffer));\n> +               if (r == EFI_SUCCESS)\n> +                       ++stop_count;\n> +               EFI_CALL(efi_close_protocol(driver_handle_buffer[i],\n> +                                           &efi_guid_driver_binding_protocol,\n> +                                           driver_handle_buffer[i], NULL));\n> +       }\n> +\n> +       if (driver_image_handle)\n> +               efi_free_pool(driver_handle_buffer);\n> +       if (stop_count)\n> +               r = EFI_SUCCESS;\n> +       else\n> +               r = EFI_NOT_FOUND;\n> +out:\n> +       return EFI_EXIT(r);\n>  }\n>\n>  efi_status_t EFIAPI efi_close_protocol(void *handle, const efi_guid_t *protocol,\n> --\n> 2.14.1\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=google.com header.i=@google.com\n\theader.b=\"D5+BKV3p\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"l+D78/Q8\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjjK05gHSz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 23:05:08 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 80C09C21E5D; Thu, 31 Aug 2017 13:00:31 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 362CBC21E4E;\n\tThu, 31 Aug 2017 13:00:29 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 15BA6C21E3C; Thu, 31 Aug 2017 12:52:29 +0000 (UTC)","from mail-qt0-f170.google.com (mail-qt0-f170.google.com\n\t[209.85.216.170])\n\tby lists.denx.de (Postfix) with ESMTPS id 53619C21E1B\n\tfor <u-boot@lists.denx.de>; Thu, 31 Aug 2017 12:52:26 +0000 (UTC)","by mail-qt0-f170.google.com with SMTP id w42so2337098qtg.5\n\tfor <u-boot@lists.denx.de>; Thu, 31 Aug 2017 05:52:26 -0700 (PDT)","by 10.200.28.106 with HTTP; Thu, 31 Aug 2017 05:52:04 -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=RCVD_IN_DNSWL_NONE,\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=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=vEiwSu3Pc1P9VKe5NCfm4PKboFByXGnjbq/fg9xpP+E=;\n\tb=D5+BKV3p1yzQ6UoZVlsHvWog37rm9cxrxyIeMNRVXWwf02fvjqHe8MmlzH5f12TZQY\n\tUTcYI3xl9YDMBypip/yxKQlwmJZiddv6b1Lcub4UmWjK534hJJRttxvWfRuklL/rrriR\n\tEpUJdTV50LnsUQu3+Gb1hSACKogX222Hmd5FSaElJXgN/jJEvH4b8KnuX7/G7dcOg8Wq\n\tlV/Tt5uLAvgZCr24k/1uJHx2Qt79N26krEnZSTQTlhvfPafu/wS/F7xWvffrrLM5MmS3\n\t5Po754xX+dO4Zy3knyjFBdZs7IR5DIv91TN6PoUh36eWJRVvNLEhcid1uA33VmMRki4i\n\t4Yrg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=vEiwSu3Pc1P9VKe5NCfm4PKboFByXGnjbq/fg9xpP+E=;\n\tb=l+D78/Q8MrZ/FDlIKdkJFJQtueSJHiLoLRIJrU1Jma5TVMXv3DOimu7HqSgYtHRpqv\n\tvWPHLdC8LoEmBxPBgHuCJdlNtKgUGEh/Q1g5pHBfhnrim+rpYIpiqjfHb4joYU3mY2G4\n\tMZTDWNKNWsnAQmPUCjt5QsyQbRO2S/0Byfjvc="],"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:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=vEiwSu3Pc1P9VKe5NCfm4PKboFByXGnjbq/fg9xpP+E=;\n\tb=cmp70JW7l/HKXDu98E7M6RjVI0A8TjuBp00bnf80AuF+5+MEcdYnI6QvVJc3u49H3Z\n\tewoKetkRNbsuXT0LeWvNBetwRax/pDyBogQzHnSss/t11x+kRidgdHMFI5mjbPUtmmy3\n\twnJUeKcZ82+KDQR9tU2TlROHo2RqGPG1Ai2eu5AOSDAd/CPMl6H7qnaud2VL7kdPuuDH\n\taRUIzaTajtcVnIi7pf68JAx0BACCVmCR+d092Zy7mUc76VQh1KTOQmMZFB95rI01bPny\n\tKoRCpYD/FO70hHKt1wrfXKxIpixS6OMghAG89Dvd0hI4ObzaN2wDsHq76IAjPypYE3H0\n\tugpg==","X-Gm-Message-State":"AHYfb5hxCVbV6OW3nur/zPm+nOnMZXOFTlt2Ppkt7zwqiKC5gVl/YYyJ\n\tiVWagqbrkTYfuEHLzEljze4a1d72lyih","X-Google-Smtp-Source":"ADKCNb5GCNP+QvkxEVk7MvBNE8BQJ8XZl9HNzxwYYKaESyGUoTtU7yqz8fvf9zV+aBLG25Yrw2qhhXNXBOAOGZbfduU=","X-Received":"by 10.200.47.73 with SMTP id k9mr7512245qta.137.1504183945043;\n\tThu, 31 Aug 2017 05:52:25 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170826225328.7550-7-xypron.glpk@gmx.de>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-7-xypron.glpk@gmx.de>","From":"Simon Glass <sjg@chromium.org>","Date":"Thu, 31 Aug 2017 20:52:04 +0800","X-Google-Sender-Auth":"9NRRNWZE9I9IAi0co6GWl_y4OnM","Message-ID":"<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>","To":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","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":1768960,"web_url":"http://patchwork.ozlabs.org/comment/1768960/","msgid":"<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>","list_archive_url":null,"date":"2017-09-15T06:35:51","subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 08/31/2017 02:52 PM, Simon Glass wrote:\n> On 27 August 2017 at 06:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n>> ---\n>>  lib/efi_loader/efi_boottime.c | 77 ++++++++++++++++++++++++++++++++++++++++++-\n>>  1 file changed, 76 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>> index 1069da7d79..c5a17b6252 100644\n>> --- a/lib/efi_loader/efi_boottime.c\n>> +++ b/lib/efi_loader/efi_boottime.c\n>> @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle,\n>>                                                      void *driver_image_handle,\n>>                                                      void *child_handle)\n> \n> Can you add a function comment?\n\nHello Simon,\n\nthe API functions (here DisconnectController) are documented in the UEFI\nspec. Is your idea that we should duplicate part of this information for\nall API functions? Or do you miss a comment on implementation details?\n\n> \n>>  {\n>> +       struct efi_driver_binding_protocol *binding_protocol;\n>> +       efi_handle_t child_handle_buffer;\n>> +       unsigned long driver_count;\n>> +       efi_handle_t *driver_handle_buffer;\n>> +       size_t i;\n>> +       UINTN number_of_children;\n> \n> Can we somehow use a lower-case type for this? Otherwise U-Boot will\n> start to look like EFI and I will have to start taking\n> antidepressants.\n> \n\nIn different places the EFI API requires a bitness dependent unsigned\ninteger.\n\nShall we globally rename UINTN to uintn?\nThis is my patch to blame:\n503f2695548 (efi_loader: correct size for tpl level)\n\nRegards\n\nHeinrich\n\n>> +       efi_status_t r;\n>> +       size_t stop_count = 0;\n>> +\n>>         EFI_ENTRY(\"%p, %p, %p\", controller_handle, driver_image_handle,\n>>                   child_handle);\n>> -       return EFI_EXIT(EFI_INVALID_PARAMETER);\n>> +\n>> +       if (!efi_search_obj(controller_handle)) {\n>> +               r = EFI_INVALID_PARAMETER;\n>> +               goto out;\n>> +       }\n>> +\n>> +       /* Create list of driver handles */\n>> +       if (driver_image_handle) {\n>> +               driver_handle_buffer = &driver_image_handle,\n>> +               driver_count = 1;\n>> +               /* Check that the handle supports driver binding protocol */\n>> +               r = efi_search_protocol(driver_image_handle,\n>> +                                       &efi_guid_driver_binding_protocol,\n>> +                                       NULL);\n>> +       } else {\n>> +               /* Get buffer with all handles with driver binding protocol */\n>> +               r = EFI_CALL(efi_locate_handle_buffer(\n>> +                            by_protocol, &efi_guid_driver_binding_protocol,\n>> +                            NULL, &driver_count, &driver_handle_buffer));\n>> +       }\n>> +       if (r != EFI_SUCCESS)\n>> +               goto out;\n>> +\n>> +       /* Create list of child handles */\n>> +       if (child_handle) {\n>> +               number_of_children = 1;\n>> +               child_handle_buffer = &child_handle;\n>> +       } else {\n>> +               /*\n>> +                * We do not fully support child handles.\n>> +                *\n>> +                * It is unclear from which handle and which protocols the\n>> +                * list of child controllers should be collected.\n>> +                */\n>> +               number_of_children = 0;\n>> +               child_handle_buffer = NULL;\n>> +       }\n>> +\n>> +       for (i = 0; i < driver_count; ++i) {\n>> +               r = EFI_CALL(efi_open_protocol(\n>> +                            driver_handle_buffer[i],\n>> +                            &efi_guid_driver_binding_protocol,\n>> +                            (void **)&binding_protocol,\n>> +                            driver_handle_buffer[i], NULL,\n>> +                            EFI_OPEN_PROTOCOL_GET_PROTOCOL));\n>> +               if (r != EFI_SUCCESS)\n>> +                       continue;\n>> +\n>> +               r = EFI_CALL(binding_protocol->stop(binding_protocol,\n>> +                                                   controller_handle,\n>> +                                                   number_of_children,\n>> +                                                   child_handle_buffer));\n>> +               if (r == EFI_SUCCESS)\n>> +                       ++stop_count;\n>> +               EFI_CALL(efi_close_protocol(driver_handle_buffer[i],\n>> +                                           &efi_guid_driver_binding_protocol,\n>> +                                           driver_handle_buffer[i], NULL));\n>> +       }\n>> +\n>> +       if (driver_image_handle)\n>> +               efi_free_pool(driver_handle_buffer);\n>> +       if (stop_count)\n>> +               r = EFI_SUCCESS;\n>> +       else\n>> +               r = EFI_NOT_FOUND;\n>> +out:\n>> +       return EFI_EXIT(r);\n>>  }\n>>\n>>  efi_status_t EFIAPI efi_close_protocol(void *handle, const efi_guid_t *protocol,\n>> --\n>> 2.14.1\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 3xtm0K1xMcz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 16:37:05 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 0AC07C21F26; Fri, 15 Sep 2017 06:36:59 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 38BE5C21DAA;\n\tFri, 15 Sep 2017 06:36:57 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 2BAFCC21DAA; Fri, 15 Sep 2017 06:36:55 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.22])\n\tby lists.denx.de (Postfix) with ESMTPS id D4C09C21D7B\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 06:36:54 +0000 (UTC)","from [192.168.8.100] ([94.197.120.111]) by mail.gmx.com (mrgmx103\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0M1FAK-1dZ1SN1Els-00tCUt; Fri, 15 Sep 2017 08:36:04 +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.7 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","To":"Simon Glass <sjg@chromium.org>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-7-xypron.glpk@gmx.de>\n\t<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Message-ID":"<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>","Date":"Fri, 15 Sep 2017 08:35:51 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>","Content-Language":"en-US","X-Provags-ID":"V03:K0:SgnQgk6KcVz+bT/YgCXfehEadNIU7xJy9SWBO3q905j4kQTn2oD\n\tJwFjIqkePw0RO53JFAN89juco6x7zItFsdiqsIwke58qdbfG7BrOCHtDPaXTeqN9MfDXhMI\n\tAmG04NU3l+oceylZG69RmypK6FqX7j4EufQx/uq9bKrMIPmDTjyowyFRsEXS6xTpgU+xxHr\n\tbMzBZGZAs/DsU9xHE5j+A==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:WBne5cpzCog=:EoZqUPhvu0IEuZ51aSMWum\n\tA6NqDwfWKA+5S1B1vbwDyxP8n2ja61H1rvVtrpIfeEZpHGFogRD7tc8MRRAdJP2G69Nh7rNBx\n\ttxlFzQRJq+lK6zrcp7AN1qs+LaXI/7TKkOpPy2+7K7XSQQJZ2BXxV7UlM1Zilo/6+GSuepQXN\n\tjTbhpz+V2mw8cKWOopMtYOPlk6/9GaKFueYoA+1l7DR1OmtXAiMjWR0WSYNOpy+ufp9IyZzzv\n\t/sdPRvEZS2Deaq0V3nuzvXxcE/xm9L9jlObJrM0q793TNi4moA1p9QD88+WUlp0UsMQzB8o0c\n\ttoRoyUcVHDWOqXSrog9InzB4n6DJTDWmExMSzpWHBn7kZ3W/D4mdoINImSg00IsRoWLCpc110\n\tUftKhXDCfD2pPUEtyodHgIg7enXuL2P3ctvkzdzitXQ98uodYeMRf+l4EsDeaKJRZEa4ILb2t\n\tsSG4sCW9PZUO3pBAfUpGdd8DvUTcaTl9KxpiDcumu2rfyZJWqVYQcgZmGBJ/jqQMtfGXeikFC\n\tWd03j101+o9XUA/FXyFsVMmtStP10EQUQvPE+nkTldcioRSKD05wJdYlN/S1e1crKRd1GUKKk\n\tHD3am6bFnJPaN+Z6qw1DIKfQuPiZ9NhqsYOgiV8dCOtt7q9F6+QL54wQbLAeLMlBq7lgnId4h\n\t96trfFWuuiRhrESUFcjzKY107YNPYpDPcxYztrPJJPDCiwQNo2T5AsBRxly9/g69WZqWpIJuY\n\tbbpBaaYwVj7+RVjliNVRM7XtcFesJxP5dbH7UaRBOoCav59N8Cz8f+R7OZwFH90dXPTUNRFBR\n\tk9GuRY+UCjlYongRy8ExzBpItYxENgzwPvHQB7t4AuEAzv7eCQ=","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","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":1771870,"web_url":"http://patchwork.ozlabs.org/comment/1771870/","msgid":"<CAPnjgZ2MLtcdCuUOV8Qg_4mvefgEAhMABTxf7y-6uduuOxKBNA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-20T13:49:37","subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Heinrich,\n\nOn 15 September 2017 at 00:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n> On 08/31/2017 02:52 PM, Simon Glass wrote:\n>> On 27 August 2017 at 06:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n>>> ---\n>>>  lib/efi_loader/efi_boottime.c | 77 ++++++++++++++++++++++++++++++++++++++++++-\n>>>  1 file changed, 76 insertions(+), 1 deletion(-)\n>>>\n>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>>> index 1069da7d79..c5a17b6252 100644\n>>> --- a/lib/efi_loader/efi_boottime.c\n>>> +++ b/lib/efi_loader/efi_boottime.c\n>>> @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle,\n>>>                                                      void *driver_image_handle,\n>>>                                                      void *child_handle)\n>>\n>> Can you add a function comment?\n>\n> Hello Simon,\n>\n> the API functions (here DisconnectController) are documented in the UEFI\n> spec. Is your idea that we should duplicate part of this information for\n> all API functions? Or do you miss a comment on implementation details?\n\nI think the code in U-Boot should stand alone, so arguments should be\ndescribed here along with a one-line function description. The args\nare all void which is not good, but makes it even more important to\ndocument.\n\n>\n>>\n>>>  {\n>>> +       struct efi_driver_binding_protocol *binding_protocol;\n>>> +       efi_handle_t child_handle_buffer;\n>>> +       unsigned long driver_count;\n>>> +       efi_handle_t *driver_handle_buffer;\n>>> +       size_t i;\n>>> +       UINTN number_of_children;\n>>\n>> Can we somehow use a lower-case type for this? Otherwise U-Boot will\n>> start to look like EFI and I will have to start taking\n>> antidepressants.\n>>\n>\n> In different places the EFI API requires a bitness dependent unsigned\n> integer.\n>\n> Shall we globally rename UINTN to uintn?\n> This is my patch to blame:\n> 503f2695548 (efi_loader: correct size for tpl level)\n\nWhat does bitness-dependent mean? Do you mean 32-bit?  It looks like\nthis is just passed to a function, so could be uint or instead?\n\nIf it is 32-bit then uint32_t should do.\n\nRegards,\nSimon","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=google.com header.i=@google.com\n\theader.b=\"tSuhGm/s\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"crJtqtmB\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xy1Nd4D8Bz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 23:50:57 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 44D29C21F35; Wed, 20 Sep 2017 13:50:12 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 177F3C21F61;\n\tWed, 20 Sep 2017 13:50:11 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 3F15BC21F3A; Wed, 20 Sep 2017 13:50:02 +0000 (UTC)","from mail-qt0-f182.google.com (mail-qt0-f182.google.com\n\t[209.85.216.182])\n\tby lists.denx.de (Postfix) with ESMTPS id 9E7A8C21F1A\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 13:50:01 +0000 (UTC)","by mail-qt0-f182.google.com with SMTP id 47so2790165qts.10\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 06:50:01 -0700 (PDT)","by 10.200.37.200 with HTTP; Wed, 20 Sep 2017 06:49:37 -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.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\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=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=jZe6tkGV2577PCQcRwGoVBtkl5aZ0NV+jaNCtZbBMOo=;\n\tb=tSuhGm/sFzHhp/sFCvD2+mMY0CtHttxk1A4bSJLUOYwfnyz6rHU523x++lhrd6MvTj\n\tPZE2weXHC2SJ6N8YiC+OmIuCAEY+TMEA2IZPjVlSf9WCSzgxmklx6K0nq91O1kWMrQxb\n\temEX1bhF+pFt24rbSZt3oYCW5ZmyPf2DNlqwKd1ksuOJm5vrzhbplhVTl1Se+uqcNSNp\n\tbodDcoxaJSiOFzClc6j29HadCoQGpWYupIO5Jpn74i5y+FJTtdt310oxlDZpQqcfAiL4\n\tG1xYgprS6sBAEvzLVnnkOFJ8Qhq5gOh5zUUAe10/r5o/wxM6SxXPniN2WTYWsu4JCSwk\n\tmbEQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=jZe6tkGV2577PCQcRwGoVBtkl5aZ0NV+jaNCtZbBMOo=;\n\tb=crJtqtmBdY4Kt/8k2Hta1E3r1604qhaI9P9cmQnOeMM9N+weX50YgBLxNQWHPAhUC3\n\tuKU17WDzmfmMUFY1qmP5jGMGQMfGfNAnaN5fB16lwQXvEQ4xQBp94r6ky5beQXgJbiil\n\tKHw3/XfweaxAzVAn2LRFi/o9f0lfVpck/Zorc="],"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:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=jZe6tkGV2577PCQcRwGoVBtkl5aZ0NV+jaNCtZbBMOo=;\n\tb=RXLkfmz7R6q0MilXn8J8CSeI+FZ/KWl5JbG07Z2fEAHxaOZEMNXozHP2Ehr3AAHbuX\n\tWQYDnZPpRW4NRiYrMxI/sqGelMjcjgY5IDxovC0k64D576JnteYs9glyofFIhDNF7vVz\n\t93wTHEFaF1mZCDzTStzAspDnaSNrGbvU4mbR5b9nKqcBTQnsAmvLWPBSj63kw2tv+uY7\n\ttBIndJ00smKce9RSsrtzmhcfdIrqVY3Se9mtcClperlkY4qFRn2wSAlpBuWYwbUi2S2P\n\tsLIu7b0t2gdj/cJEL+sff1T18G9dE2useBJWcF+UKFfZdQ/saD3ThIhyPSVMge9hnHmO\n\tg/lQ==","X-Gm-Message-State":"AHPjjUjjT4rS2yoWFTKJBGEVKahZ/Ye/TtWYo40n9xOuw9WMbRZRZ7Xs\n\trBtN7EBLSxzLAScHK4E2S+/ySK2jpsmTnmLSOYwT9A==","X-Google-Smtp-Source":"AOwi7QCt3RQPpvGuwa5Zlj7m+HHnKP36H3hkh7GoGgqdWmueSPDor5m9nZbo0qxY4gTtcHbuAbfmJpsuMiNsivZefFQ=","X-Received":"by 10.237.37.182 with SMTP id x51mr7376792qtc.5.1505915400375;\n\tWed, 20 Sep 2017 06:50:00 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-7-xypron.glpk@gmx.de>\n\t<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>\n\t<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>","From":"Simon Glass <sjg@chromium.org>","Date":"Wed, 20 Sep 2017 07:49:37 -0600","X-Google-Sender-Auth":"ypdLVm3BSH41VE4ddm0F0B3pME4","Message-ID":"<CAPnjgZ2MLtcdCuUOV8Qg_4mvefgEAhMABTxf7y-6uduuOxKBNA@mail.gmail.com>","To":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","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":1771916,"web_url":"http://patchwork.ozlabs.org/comment/1771916/","msgid":"<CAF6AEGs2wQPBjZh-XTsuUsEgD5WvNbCr=sNn-CtC=VOmz=n++Q@mail.gmail.com>","list_archive_url":null,"date":"2017-09-20T14:23:23","subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Wed, Sep 20, 2017 at 9:49 AM, Simon Glass <sjg@chromium.org> wrote:\n> Hi Heinrich,\n>\n> On 15 September 2017 at 00:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>> On 08/31/2017 02:52 PM, Simon Glass wrote:\n>>> On 27 August 2017 at 06:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n>>>> ---\n>>>>  lib/efi_loader/efi_boottime.c | 77 ++++++++++++++++++++++++++++++++++++++++++-\n>>>>  1 file changed, 76 insertions(+), 1 deletion(-)\n>>>>\n>>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>>>> index 1069da7d79..c5a17b6252 100644\n>>>> --- a/lib/efi_loader/efi_boottime.c\n>>>> +++ b/lib/efi_loader/efi_boottime.c\n>>>> @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle,\n>>>>                                                      void *driver_image_handle,\n>>>>                                                      void *child_handle)\n>>>\n>>> Can you add a function comment?\n>>\n>> Hello Simon,\n>>\n>> the API functions (here DisconnectController) are documented in the UEFI\n>> spec. Is your idea that we should duplicate part of this information for\n>> all API functions? Or do you miss a comment on implementation details?\n>\n> I think the code in U-Boot should stand alone, so arguments should be\n> described here along with a one-line function description. The args\n> are all void which is not good, but makes it even more important to\n> document.\n\ncouple notes, fwiw..\n\n1) As someone else implementing parts of UEFI interface, I'd find link\nto section in spec (or perhaps to http://wiki.phoenix.com/) to be more\nuseful than re-writing the spec in our own words (and possibly getting\nit wrong)\n\n2) Leif introduced (iirc, in the stub HII or unicode patch)\nefi_handle_t, and efi_string_t (and maybe we should add efi_char_t)..\nwhich we should probably use more extensively.  Although I haven't\nwanted to go on a major housecleaning while we still have so many\npatches pending on list..  but would be a nice cleanup to make at some\npoint.\n\nBR,\n-R\n\n\n>>\n>>>\n>>>>  {\n>>>> +       struct efi_driver_binding_protocol *binding_protocol;\n>>>> +       efi_handle_t child_handle_buffer;\n>>>> +       unsigned long driver_count;\n>>>> +       efi_handle_t *driver_handle_buffer;\n>>>> +       size_t i;\n>>>> +       UINTN number_of_children;\n>>>\n>>> Can we somehow use a lower-case type for this? Otherwise U-Boot will\n>>> start to look like EFI and I will have to start taking\n>>> antidepressants.\n>>>\n>>\n>> In different places the EFI API requires a bitness dependent unsigned\n>> integer.\n>>\n>> Shall we globally rename UINTN to uintn?\n>> This is my patch to blame:\n>> 503f2695548 (efi_loader: correct size for tpl level)\n>\n> What does bitness-dependent mean? Do you mean 32-bit?  It looks like\n> this is just passed to a function, so could be uint or instead?\n>\n> If it is 32-bit then uint32_t should do.\n>\n> Regards,\n> Simon","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=\"srh5Cg6l\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xy26L3ycBz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 00:23:38 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 291F1C21F70; Wed, 20 Sep 2017 14:23:31 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 9F17AC21F03;\n\tWed, 20 Sep 2017 14:23:28 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 65EC3C21F03; Wed, 20 Sep 2017 14:23:26 +0000 (UTC)","from mail-lf0-f45.google.com (mail-lf0-f45.google.com\n\t[209.85.215.45])\n\tby lists.denx.de (Postfix) with ESMTPS id CC25DC21EC8\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 14:23:24 +0000 (UTC)","by mail-lf0-f45.google.com with SMTP id k9so2862951lfe.10\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 07:23:24 -0700 (PDT)","by 10.46.41.75 with HTTP; Wed, 20 Sep 2017 07:23:23 -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=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=5zkSnWFcX7ZIu4zTAiOE0moSWAeOAOS9xCy8KzfWuCE=;\n\tb=srh5Cg6lNNsJs/5E6IOnDvbklQIwiodD7NCZoXFWDkx4bI9nI9Msh6jSXMZ1lwRXl0\n\tSvep3LOQzOGMzF1600OQra7ffDZa/CSjoCTM/AhHXYvABEfgkANaty43394mQyHARLLx\n\tUC3BtSMQpgp12aEjadH6/PotBS04NF2NWLNoUrrk0+fpr7+gLEEUt42pi9RnCa4Zcy0c\n\tcNlsYr5Gn9yPa3Q6Dt9WTx8OnJdyA9tnizQtvi8N4U28DQ9GhYU2OEctQHWTjvE61B1a\n\tYWoVi8m3BA6rlyMkwiO+KMucfIwQ3p/GpFeSHt0GKYYlQLBBh7CJDhyxrGZu2c+C/NRB\n\t8F+A==","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=5zkSnWFcX7ZIu4zTAiOE0moSWAeOAOS9xCy8KzfWuCE=;\n\tb=jnAeq3pO8zB8LYl/Bt3/Alq/hYpe0Bv8jgvAFr2X6+81j5xB8cbxi5KvSHQitRBRe1\n\thdB7WwUU6Z1Kc4AgFvj1HU2kTQRucIJOBL2rEy2vrusLknGtj4Fu09LYhBtX0x97cflJ\n\tzlUEdM5qtfkSwq9Owj5QJCUt/744NVU87hlMf+OlU9PUYLwPCk+CCZgSawlHMyUn5/CL\n\tOvsuFgI7Wqg6wUvCNnnsgQgBGj4rcr6IE+5PhpxYmuzUx3pdZwaYYMzN9DyQWxtAOYAd\n\tVW9k7i/88PphSyutybaqgzuVgNrq+KMdoM+Au0sYzEOFGXZf6KDyMHmLtt6LWzbnOlcG\n\t6Gow==","X-Gm-Message-State":"AHPjjUhUVbKIfAzPCJjWsoeZlSFpAeZzZC7aMLERQQ/FczX7AQJWZezI\n\tlsKXQnuF2CK7p1vDpYsn73C8mKcQDYZjovQ1LvE=","X-Google-Smtp-Source":"AOwi7QARsz1GUnIcZCCLTBRfQPqa2vSZiPqps1R8GWua9BNG/MAPazi1BMxQDu//PpLyXsdGc3JDM1BlNu4N7sW8IdE=","X-Received":"by 10.46.19.26 with SMTP id 26mr2352999ljt.20.1505917404271; Wed,\n\t20 Sep 2017 07:23:24 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAPnjgZ2MLtcdCuUOV8Qg_4mvefgEAhMABTxf7y-6uduuOxKBNA@mail.gmail.com>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-7-xypron.glpk@gmx.de>\n\t<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>\n\t<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>\n\t<CAPnjgZ2MLtcdCuUOV8Qg_4mvefgEAhMABTxf7y-6uduuOxKBNA@mail.gmail.com>","From":"Rob Clark <robdclark@gmail.com>","Date":"Wed, 20 Sep 2017 10:23:23 -0400","Message-ID":"<CAF6AEGs2wQPBjZh-XTsuUsEgD5WvNbCr=sNn-CtC=VOmz=n++Q@mail.gmail.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tHeinrich Schuchardt <xypron.glpk@gmx.de>","Subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","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":1772410,"web_url":"http://patchwork.ozlabs.org/comment/1772410/","msgid":"<CAPnjgZ3gxccSpwbcAucazJQ4XTqtYJS55kd8iTF3XAhPRpKxcg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-21T04:58:42","subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Rob,\n\nOn 20 September 2017 at 08:23, Rob Clark <robdclark@gmail.com> wrote:\n> On Wed, Sep 20, 2017 at 9:49 AM, Simon Glass <sjg@chromium.org> wrote:\n>> Hi Heinrich,\n>>\n>> On 15 September 2017 at 00:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>>> On 08/31/2017 02:52 PM, Simon Glass wrote:\n>>>> On 27 August 2017 at 06:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n>>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n>>>>> ---\n>>>>>  lib/efi_loader/efi_boottime.c | 77 ++++++++++++++++++++++++++++++++++++++++++-\n>>>>>  1 file changed, 76 insertions(+), 1 deletion(-)\n>>>>>\n>>>>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>>>>> index 1069da7d79..c5a17b6252 100644\n>>>>> --- a/lib/efi_loader/efi_boottime.c\n>>>>> +++ b/lib/efi_loader/efi_boottime.c\n>>>>> @@ -1052,9 +1052,84 @@ static efi_status_t EFIAPI efi_disconnect_controller(void *controller_handle,\n>>>>>                                                      void *driver_image_handle,\n>>>>>                                                      void *child_handle)\n>>>>\n>>>> Can you add a function comment?\n>>>\n>>> Hello Simon,\n>>>\n>>> the API functions (here DisconnectController) are documented in the UEFI\n>>> spec. Is your idea that we should duplicate part of this information for\n>>> all API functions? Or do you miss a comment on implementation details?\n>>\n>> I think the code in U-Boot should stand alone, so arguments should be\n>> described here along with a one-line function description. The args\n>> are all void which is not good, but makes it even more important to\n>> document.\n>\n> couple notes, fwiw..\n>\n> 1) As someone else implementing parts of UEFI interface, I'd find link\n> to section in spec (or perhaps to http://wiki.phoenix.com/) to be more\n> useful than re-writing the spec in our own words (and possibly getting\n> it wrong)\n\nThe problem is that there are 3 void pointers and I have no idea what\nthey really are and what to pass. We have to have some coding\nstandards in U-Boot. I am not looking for a detailed description of\nthe purpose of the function, but one line and a description of the\narguments is the minimum we should have for exported functions.\n\nI think it is a great idea to link to the spec as well, particularly\nif it can be a URL.\n\n>\n> 2) Leif introduced (iirc, in the stub HII or unicode patch)\n> efi_handle_t, and efi_string_t (and maybe we should add efi_char_t)..\n> which we should probably use more extensively.  Although I haven't\n> wanted to go on a major housecleaning while we still have so many\n> patches pending on list..  but would be a nice cleanup to make at some\n> point.\n\nSounds good to me. No hurry, but it's nice to know that this is\nheading in the right direction. The EFI API is really awful IMO. The\nobfuscation is so painful.\n\nRegards,\nSimon","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=google.com header.i=@google.com\n\theader.b=\"i/UkAr4E\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"jLSok3XG\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyPZW2yxzz9ryv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 15:00:51 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 2E473C21F09; Thu, 21 Sep 2017 04:59:28 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 4842EC21EAB;\n\tThu, 21 Sep 2017 04:59:27 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E574CC21E76; Thu, 21 Sep 2017 04:59:09 +0000 (UTC)","from mail-qt0-f169.google.com (mail-qt0-f169.google.com\n\t[209.85.216.169])\n\tby lists.denx.de (Postfix) with ESMTPS id CC4E3C21EA5\n\tfor <u-boot@lists.denx.de>; Thu, 21 Sep 2017 04:59:04 +0000 (UTC)","by mail-qt0-f169.google.com with SMTP id q8so4877483qtb.5\n\tfor <u-boot@lists.denx.de>; Wed, 20 Sep 2017 21:59:04 -0700 (PDT)","by 10.200.37.200 with HTTP; Wed, 20 Sep 2017 21:58:42 -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=RCVD_IN_DNSWL_NONE,\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=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=Wp45LP8CoY3wFUl3eau9+0PC5oImMInlsvCiLKpfPuo=;\n\tb=i/UkAr4EPx/WJEMRNYRkz7Elsd3lKUi0UnGPYEVP/bX2dEn69+BB1o/VzwBuxUig+o\n\tL0BPk3kFjUVbhYsMMP7LLn94URcC7prfBQ9Geo6HJmPlD+71Jf49GS+X7Cx7WO4jJWIB\n\twrnJtdAOFGEmhgv8AFOc69BE/22aHfOkvFKa6e1aCHXc9qIFU7u+idusKvqv41GOJGiH\n\tGu8TmY7pFshgQv6Low88GbpBulhnDF6+ZP7BlpUNtStfq1Y4f50VQY3kR9hTfIAepKDU\n\t03yzXKC9Th58O067NROlxwuE9+QU5eG5tjsdXxTdCydySPT5NKLkSje+dZYjzPMxdpsM\n\tu78Q==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=Wp45LP8CoY3wFUl3eau9+0PC5oImMInlsvCiLKpfPuo=;\n\tb=jLSok3XGLmrQLbYM7145qnQ76tBswRUfTldwtkaAPLTbYKf7/5yMnMmAWxQ3m8VdWM\n\tfijJnMU91XjCNTYDLEJNNkon1TKVLFREWovxANODpE1hA0RPpiAGRCzFARAzeI4MryGw\n\troykGtgiBUw+ww8A2wzOiMg84AAXn/FHDz+lM="],"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:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=Wp45LP8CoY3wFUl3eau9+0PC5oImMInlsvCiLKpfPuo=;\n\tb=Bvmm5GQyLPkq8FTLQT8C3nHfOehdhYA0+i2E1FF5bD0IuPP+tpr4kUxCbmzxKDQftj\n\tirIiz5bekZqPuhUPtxh8WXuIT+AgKeWZ8gxQ49keBwVvvlDR+wkPbIb7vbXLNMW+ASaT\n\tNDnOanOCUZKtsCrpkq87y0egj6YcKq4mBp9LuBv5k1UVAfqzAYNsrHUwumDQHFYJSGvT\n\tbmYhMHjVeKA4a/F1DFo4Kg33mC+JfWRZfgFbScG8IzjtxX9YZ0aInFmYzzLg0D0gWVkc\n\tKHnyinSSeQMFIEhbuR4hGgvgxQJu1eih4tfsG4HWYfaS9VgbFbwl8YVAHpomrW/u8PDJ\n\t/hkA==","X-Gm-Message-State":"AHPjjUji3NsOM5OGo+0cvpqwFtvUETgidUbmYv+Ac805TNoq1x+4guPz\n\t7YSyZ/NGxkyKcTWpQqMVi2t/ue328qxoJou9NCHr5A==","X-Google-Smtp-Source":"AOwi7QCiTByML0OZek2BxOyRprMThAx5h6p+z5KNveQzB5lHgQ4NTI0PXyyKCvC081wtlED2V7buCD6wV5qxpYrfJlQ=","X-Received":"by 10.200.63.154 with SMTP id d26mr1470572qtk.212.1505969943473; \n\tWed, 20 Sep 2017 21:59:03 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAF6AEGs2wQPBjZh-XTsuUsEgD5WvNbCr=sNn-CtC=VOmz=n++Q@mail.gmail.com>","References":"<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-1-xypron.glpk@gmx.de>\n\t<20170826225328.7550-7-xypron.glpk@gmx.de>\n\t<CAPnjgZ3h5EuVrM=k169PhKg6EndhoG-HEWWmwd4=tifgb66KtA@mail.gmail.com>\n\t<b5d7c651-09c1-5b37-771c-20dbb82cf9e3@gmx.de>\n\t<CAPnjgZ2MLtcdCuUOV8Qg_4mvefgEAhMABTxf7y-6uduuOxKBNA@mail.gmail.com>\n\t<CAF6AEGs2wQPBjZh-XTsuUsEgD5WvNbCr=sNn-CtC=VOmz=n++Q@mail.gmail.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Wed, 20 Sep 2017 22:58:42 -0600","X-Google-Sender-Auth":"Qc7ydR73jskngbQBvDhPYMfaVBM","Message-ID":"<CAPnjgZ3gxccSpwbcAucazJQ4XTqtYJS55kd8iTF3XAhPRpKxcg@mail.gmail.com>","To":"Rob Clark <robdclark@gmail.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tHeinrich Schuchardt <xypron.glpk@gmx.de>","Subject":"Re: [U-Boot] [PATCH 16/23] efi_loader: implement\n\tDisconnectController","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>"}}]