[{"id":1769864,"web_url":"http://patchwork.ozlabs.org/comment/1769864/","msgid":"<87c19b1f-2e1e-c21c-99b3-c224e9744722@gmx.de>","list_archive_url":null,"date":"2017-09-18T04:47:13","subject":"Re: [U-Boot] [PATCH 04/16] efi: Add a TODO to efi_init_obj_list()","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 09/18/2017 12:59 AM, Simon Glass wrote:\n> This function repeats data structures provided by driver model. They are\n> only created once so can be stale if the EFI loader is called twice (e.g.\n> for testing or on boot failure).\n> \n> Add a TODO to address this. It should be possible to attach EFI devices\n> and data structures to driver-model devices and avoid having a parallel\n> set of data structures.\n> \n> Signed-off-by: Simon Glass <sjg@chromium.org>\n> ---\n> \n>  cmd/bootefi.c | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/cmd/bootefi.c b/cmd/bootefi.c\n> index 9aa588eb1b..ee07733e3e 100644\n> --- a/cmd/bootefi.c\n> +++ b/cmd/bootefi.c\n> @@ -109,6 +109,10 @@ static struct efi_object bootefi_device_obj = {\n>  /**\n>   * efi_init_obj_list() - Initialize and populate EFI object list\n>   *\n> + * TODO(sjg@chromium.org): Move this to a dynamic list based on driver model,\n> + * so that it does not need to be created before running EFI applications\n> + * and updates when devices change.\n> + *\n\nI am not quite sure if by dynamic list you refer to linker generated\nlists or to hot plugging.\n\nThe UEFI spec 2.7 has a chapter on \"Hot-Plug Events\". This would add a\nlot of complexity. I do not think that we currently need it.\n\nThe object list also gets new entries created by the EFI application via\ncalling InstallMultipleProtocolInterfaces of InstallProtocolInterface\nwith *handle == NULL.\n\n>   * @return 0 if OK, -ve on error (in which case it prints a message)\n>   */\n>  static int efi_init_obj_list(void)\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 3xwYQW2CDQz9s78\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 14:47:31 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 17E83C21EEE; Mon, 18 Sep 2017 04:47:25 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 50B41C21D57;\n\tMon, 18 Sep 2017 04:47:23 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 21014C21D57; Mon, 18 Sep 2017 04:47:22 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.20])\n\tby lists.denx.de (Postfix) with ESMTPS id B7E05C21D19\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 04:47:21 +0000 (UTC)","from [192.168.123.58] ([84.118.154.110]) by mail.gmx.com (mrgmx103\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0MVNWU-1duK3G3jOI-00Yf3P; Mon, 18 Sep 2017 06:47:16 +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, RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable\n\tautolearn_force=no version=3.4.0","To":"Simon Glass <sjg@chromium.org>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","References":"<20170917225927.117917-1-sjg@chromium.org>\n\t<20170917225927.117917-5-sjg@chromium.org>","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Message-ID":"<87c19b1f-2e1e-c21c-99b3-c224e9744722@gmx.de>","Date":"Mon, 18 Sep 2017 06:47:13 +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":"<20170917225927.117917-5-sjg@chromium.org>","Content-Language":"en-US","X-Provags-ID":"V03:K0:Y0w+kBsIhTUt3sMrb4lvM6TUB+PyGGn/S2ANUnBUszYtM3K/fRY\n\tn/EB4YfN6yDOdZ+BOYOL6J14rwUJBU5Mj58w8n06OHaY0P9/TPFGq04/UDQ1QlCGLzcpIKu\n\tPQRK1MwV3iMdvQdDN4aRV1UykdKaey50JVa1jsiu/elI/oqeErxIKhdDzUMXFJkx+dsQjtp\n\tN1HS+v3bPfudBvI25ay/g==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:vxr32IFt/Zg=:lKuSgIdh7FG5Dc5p9YjZAd\n\tJIzGdluTyCGFwj1hTmI1veD6hS9VyKE1jrR92iVjb0N9T18vjWWOQRcI7Xz+hFrLYmnWZz9IS\n\tMGHI0I/Gixp45jr1sk0D8JEPUbTROpqiqOl78chpu9PCuge6UHfQ3AqiJbyAoKE+d4pcAO+x7\n\tywM6nknBALj6n5Looji9TfaEP2/8rB+QcgvPx9xsgrrb2TH9J6MXQ7OfMhXfzYnSopig8MEoP\n\t21Hg8SlV0t9ufGYIJMU7apInBi0McPPLkJTZGZ9fdc31rbRs2kerM/U0asN+YG0Wa1B5BJd6c\n\tPzlQ3Ht47z6sA7LSVfuVbMsiDnRg2ezaiz5Cv7rKw8UBTCqlSuF1qRZWbZcXIBAy8ns/OBsrG\n\trxKLZgnTjRiRag3GxaR0b+ZMSoN/zGFUf8t2Vm9ajlcURSD7yWRZn4VLsVtpEXjYyjTZJVLmJ\n\tJJNVWsQ0Q1ahUZhZ/mU4oy2UeMES8h6QYYy8voNHIIZx/ks/O19JNxi2Kk9Pz35MmmFwZ7jDz\n\tpzB4oJM0wmDFlmBJmYU9YLFt4ClG9bNwX3nwNTVoRFJ5Sn8k3smldXws126eHp7WbbLw+o+1s\n\tjRE9vSfhYi+4e0JV9g0wMrhVYbedTM3bIiDVa8mri3J4PEYJy7W5duyABnFlL+d1+cFjyrnGX\n\t3Jz+0BAxda8TTBZx/CPIOicKiUiOAZBkFju3lMjmXkC2pQR9uJmfJAHhpujc/RlvSivuxifqD\n\tNT/gg5CW2+wrkc24ZaAsiQY/dKlFfArMTKMVaoSkNoMIIhS0YAoMLn6Q2AqPNnyFEDz4f096t\n\tOFR+CXG1PDdWvyvEEMrZtpMtyamCW5NZzPMKvwKA118X+HX368=","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>","Subject":"Re: [U-Boot] [PATCH 04/16] efi: Add a TODO to efi_init_obj_list()","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":1815662,"web_url":"http://patchwork.ozlabs.org/comment/1815662/","msgid":"<CAPnjgZ0RH7QRbFeURwJQQg1B4v=3Sw4U9u7qtWp87SvwC5PYTg@mail.gmail.com>","list_archive_url":null,"date":"2017-12-04T22:45:06","subject":"Re: [U-Boot] [PATCH 04/16] efi: Add a TODO to efi_init_obj_list()","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Heinrich,\n\nOn 17 September 2017 at 22:47, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:\n> On 09/18/2017 12:59 AM, Simon Glass wrote:\n>> This function repeats data structures provided by driver model. They are\n>> only created once so can be stale if the EFI loader is called twice (e.g.\n>> for testing or on boot failure).\n>>\n>> Add a TODO to address this. It should be possible to attach EFI devices\n>> and data structures to driver-model devices and avoid having a parallel\n>> set of data structures.\n>>\n>> Signed-off-by: Simon Glass <sjg@chromium.org>\n>> ---\n>>\n>>  cmd/bootefi.c | 4 ++++\n>>  1 file changed, 4 insertions(+)\n>>\n>> diff --git a/cmd/bootefi.c b/cmd/bootefi.c\n>> index 9aa588eb1b..ee07733e3e 100644\n>> --- a/cmd/bootefi.c\n>> +++ b/cmd/bootefi.c\n>> @@ -109,6 +109,10 @@ static struct efi_object bootefi_device_obj = {\n>>  /**\n>>   * efi_init_obj_list() - Initialize and populate EFI object list\n>>   *\n>> + * TODO(sjg@chromium.org): Move this to a dynamic list based on driver model,\n>> + * so that it does not need to be created before running EFI applications\n>> + * and updates when devices change.\n>> + *\n>\n> I am not quite sure if by dynamic list you refer to linker generated\n> lists or to hot plugging.\n>\n> The UEFI spec 2.7 has a chapter on \"Hot-Plug Events\". This would add a\n> lot of complexity. I do not think that we currently need it.\n>\n> The object list also gets new entries created by the EFI application via\n> calling InstallMultipleProtocolInterfaces of InstallProtocolInterface\n> with *handle == NULL.\n\nHere I am referring to what I see as duplicate device tables, brought\nin from driver model. I am wondering if we can make the EFI info come\nfrom the driver-model directly.\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=\"uPitxMN4\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"ZuyiwG1W\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3yrKkw3xZvz9s74\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Dec 2017 09:47:20 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 362BDC22090; Mon,  4 Dec 2017 22:45:53 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 42E1DC21D78;\n\tMon,  4 Dec 2017 22:45:50 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 5A2ECC22017; Mon,  4 Dec 2017 22:45:32 +0000 (UTC)","from mail-qt0-f195.google.com (mail-qt0-f195.google.com\n\t[209.85.216.195])\n\tby lists.denx.de (Postfix) with ESMTPS id 0FBF2C2204C\n\tfor <u-boot@lists.denx.de>; Mon,  4 Dec 2017 22:45:29 +0000 (UTC)","by mail-qt0-f195.google.com with SMTP id e2so24895873qti.0\n\tfor <u-boot@lists.denx.de>; Mon, 04 Dec 2017 14:45:29 -0800 (PST)","by 10.140.100.167 with HTTP; Mon, 4 Dec 2017 14:45:06 -0800 (PST)"],"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\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=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=pmZ06dyiTq1Y/01D1hhJabQBcEvudlZg2kdPryCZwqc=;\n\tb=uPitxMN4Le4RRpbWn/bx610Qv3QX/jMSlLEktugrhkcml3Zs5OqtI5Z75naVS8QaKO\n\ta9/+WdQYY7oBAYSovutDfnpHnyVaiIkJsLM143S1n4UMfGXjnNfYYq69YzOVR6ZM1+Mz\n\tnGF2v/3zbDDK+BZ1nJNClhoJp8qmrzmXVGArIWzb8NKGreURjlwcqn2WqOoqUU4jXyv9\n\tkpkbb+7v2gNyMhzKyJFDC5dg36ppZu3T4OnKyIvaK51P0QW8SPqjiVnko6RLHKdWfIK6\n\tiGImNiN/8vV3AQWRx9l4pc4ltdREtUIx5bnI+p9Mi9GSWJMzqBCB1EDP/8agPHAZJi+I\n\t05Dw==","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=pmZ06dyiTq1Y/01D1hhJabQBcEvudlZg2kdPryCZwqc=;\n\tb=ZuyiwG1W0FrtmY0nl4WdCDbVn767IHIc0Lc9pbt6S/cuf/PYawrAJLr7C078T+eCJj\n\tQg5WGTkwqz4tS+0NuyGQm6WTI3OetG2RdddpeJuUAPuUdi0zOZSe+SFctky0GcUZHZCU\n\t4po4xUChVqHBPBPnoTSUdM1Fh9c6uQw3JzFR8="],"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=pmZ06dyiTq1Y/01D1hhJabQBcEvudlZg2kdPryCZwqc=;\n\tb=cE6tImn7hEaWrEOET4Ks94He8pO8x5wZm44S4mPgIzwOqYiakh+96ZwyBRUZk2D05z\n\tb6oJ4r85hkdsm17Y7r0fLGUPle0W1AbN81CR537SRGWIo7DfzqvDThn5vqBhh2TfXy6R\n\tS9zL8mib51PLdhsHZ/vMg7Xpzf8h4roaLSDSdWuPPlrV7loUHUiRCkd8rXKiRpw5DGwd\n\tHOU9yhh6J6wLIVnIvWs1aTMp1DCTVKyP0NMAVfT5gGaElOPdDjjC24PZg1zAVKYX4WQY\n\tY/eRWhLKxRTVI0DzsbB8Mt+NlaPN47WrpRg4eI2w4Bnzf7NUHEsN5JoaJQluUNcx4aQd\n\tvG6A==","X-Gm-Message-State":"AKGB3mJV+Jid6KZVqxM5h0yCoW3cNlmB7bcW4o/45LR9pRyVsO9P6kio\n\ti7f/W3cTH9LIct9562gVsbZDExteI1Fqhgc3rBruHw==","X-Google-Smtp-Source":"AGs4zMbjoIQx5Ffstz6lS5nbTWZ1d2fixFv0Fzpc2r6NU9V5M662wkFTRbiuiKWWFlnkgO/i5gEhEcmSG+15G3BIGvA=","X-Received":"by 10.200.44.187 with SMTP id 56mr328794qtw.238.1512427527623;\n\tMon, 04 Dec 2017 14:45:27 -0800 (PST)","MIME-Version":"1.0","In-Reply-To":"<87c19b1f-2e1e-c21c-99b3-c224e9744722@gmx.de>","References":"<20170917225927.117917-1-sjg@chromium.org>\n\t<20170917225927.117917-5-sjg@chromium.org>\n\t<87c19b1f-2e1e-c21c-99b3-c224e9744722@gmx.de>","From":"Simon Glass <sjg@chromium.org>","Date":"Mon, 4 Dec 2017 15:45:06 -0700","X-Google-Sender-Auth":"NwDISsyuwtd6ES8OChzav_Hq3pQ","Message-ID":"<CAPnjgZ0RH7QRbFeURwJQQg1B4v=3Sw4U9u7qtWp87SvwC5PYTg@mail.gmail.com>","To":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tAlexander Graf <agraf@suse.de>, \n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>","Subject":"Re: [U-Boot] [PATCH 04/16] efi: Add a TODO to efi_init_obj_list()","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>"}}]