[{"id":1769699,"web_url":"http://patchwork.ozlabs.org/comment/1769699/","msgid":"<CAEUhbmVtfkr1aLdEP9EOgsUmGRpdcWJZ332yq9Gb2QnxrZM==Q@mail.gmail.com>","list_archive_url":null,"date":"2017-09-17T12:50:25","subject":"Re: [U-Boot] [PATCH 02/13] Revert \"sandbox: Drop special case\n\tconsole code for sandbox\"","submitter":{"id":64981,"url":"http://patchwork.ozlabs.org/api/people/64981/","name":"Bin Meng","email":"bmeng.cn@gmail.com"},"content":"Hi Simon,\n\nOn Sun, Sep 17, 2017 at 5:23 AM, Simon Glass <sjg@chromium.org> wrote:\n> While sandbox works OK without the special-case code, it does result in\n> console output being stored in the pre-console buffer while sandbox starts\n> up. If there is a crash or a problem then there is no indication of what\n> is going on.\n>\n> For ease of debugging it seems better to revert this change also.\n>\n> This reverts commit d8c6fb8cedbc35eee27730a7fa544e499b3c81cc.\n>\n> Signed-off-by: Simon Glass <sjg@chromium.org>\n> ---\n>\n>  common/console.c          | 7 +++++++\n>  configs/sandbox_defconfig | 2 +-\n>  2 files changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/common/console.c b/common/console.c\n> index f83528ca60..18457aab3c 100644\n> --- a/common/console.c\n> +++ b/common/console.c\n> @@ -482,6 +482,13 @@ static inline void print_pre_console_buffer(int flushpoint) {}\n>\n>  void putc(const char c)\n>  {\n> +#ifdef CONFIG_SANDBOX\n> +       /* sandbox can send characters to stdout before it has a console */\n> +       if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {\n> +               os_putc(c);\n> +               return;\n> +       }\n> +#endif\n>  #ifdef CONFIG_DEBUG_UART\n>         /* if we don't have a console yet, use the debug UART */\n>         if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {\n> diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig\n> index e7a61bd61a..88ae98d312 100644\n> --- a/configs/sandbox_defconfig\n> +++ b/configs/sandbox_defconfig\n> @@ -16,7 +16,7 @@ CONFIG_CONSOLE_RECORD=y\n>  CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000\n>  CONFIG_SILENT_CONSOLE=y\n>  CONFIG_PRE_CONSOLE_BUFFER=y\n> -CONFIG_PRE_CON_BUF_ADDR=0\n> +CONFIG_PRE_CON_BUF_ADDR=0x100000\n\nLooks commit d8c6fb8cedbc35eee27730a7fa544e499b3c81cc does not have\nthis change. Why is the change from 0 to 0x100000?\n\n>  CONFIG_CMD_CPU=y\n>  CONFIG_CMD_LICENSE=y\n>  CONFIG_CMD_BOOTZ=y\n> --\n\nAnd looks there is more changes in commit\nd8c6fb8cedbc35eee27730a7fa544e499b3c81cc that is not reverted? ie:\nputs()?\n\nRegards,\nBin","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=\"aUSBtDz+\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xw8BM1rv8z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 22:50:35 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 0269FC21E48; Sun, 17 Sep 2017 12:50:30 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 5AED0C21CB3;\n\tSun, 17 Sep 2017 12:50:28 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid EE9CEC21CB3; Sun, 17 Sep 2017 12:50:26 +0000 (UTC)","from mail-wr0-f194.google.com (mail-wr0-f194.google.com\n\t[209.85.128.194])\n\tby lists.denx.de (Postfix) with ESMTPS id 9A47BC21C62\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 12:50:26 +0000 (UTC)","by mail-wr0-f194.google.com with SMTP id k20so3624078wre.1\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 05:50:26 -0700 (PDT)","by 10.223.145.3 with HTTP; Sun, 17 Sep 2017 05:50:25 -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_H2,\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=yqmdTn9WfdBn5GYRBTNAHdgrzAc43OEG8KYugvFRUr8=;\n\tb=aUSBtDz++rRMRtn4/AMxIIA1Rv9js0dLqzEiMuJXion8VQGl9H2K3n82ktVjBtYPX/\n\t8FtspcUcN9yO7Ca2t0tZrWIXfq5G71uSVUEjFmU3IViyHB1mEphtb1UCiAtatMmbY1so\n\tfUR1cW5q3Mkx+wqQ4AUrUeCJ3mAgKHlGDWrOWqlFpGcdJ8gY6gS0abPtt8IwxblT4wYq\n\tL3rbjO98/AMxonYHBhzwnDQSU0fTy1/abI44vrmjclqXHV5A+ed+rf0GC+fhnYxktGEC\n\t72SI4DFYgRdReLCrSd30h4fj9lXOJdFx14b26Vlq6acySe577d8/NM/iCgEbPFC6fb3O\n\t/JHA==","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=yqmdTn9WfdBn5GYRBTNAHdgrzAc43OEG8KYugvFRUr8=;\n\tb=GXSMm3tqTtENkrQJEa6Td9gaZi2+TwBH54y3ndcArtkjvmUr4tmhdkUXcIMp72R/wu\n\tj7I9giLBIo8tzF0BV9oQMSFFddi4FquRBPXZ+Z0bE/lhcIwbRF9hYTA+5zK9NfhaCFmF\n\tZY5PmtWy8VQkjoZnK/lsu4PHgBKECy9rHB5gsl+DZCsxaCAY9DoWpmHA/ELSO63s6xTX\n\txgRBxL2N3Ui/2dLrEDyfKh5t0ivIe1AQtUTch/C3TRg4O7O7CnQq6rkt+shz/UBQgjgq\n\t49vh9h1xVC/zkErpPkh3VmbiAQUiXqhMvz7Iz1vAalfjSv9Fg5jyg+axzievoCIjqSWT\n\tFbqg==","X-Gm-Message-State":"AHPjjUiA89A7vTu3aKHrucmVn3uknOz6RgrJpdaTOvOMqusxIy2wXk/3\n\txlQZmJK43PAdKFdVcL4AZFqkdHOVj+EAxvP8b2s=","X-Google-Smtp-Source":"ADKCNb6NU5doiw9Orb/aCzOvGXXEgc2bDJmJu2fSQhE0qtUYcLhZDEyq0QqQU002xpj/08OjngENCMKSv8dm6tNVjv8=","X-Received":"by 10.223.171.74 with SMTP id r10mr27804367wrc.86.1505652626234; \n\tSun, 17 Sep 2017 05:50:26 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170916212331.170463-3-sjg@chromium.org>","References":"<20170916212331.170463-1-sjg@chromium.org>\n\t<20170916212331.170463-3-sjg@chromium.org>","From":"Bin Meng <bmeng.cn@gmail.com>","Date":"Sun, 17 Sep 2017 20:50:25 +0800","Message-ID":"<CAEUhbmVtfkr1aLdEP9EOgsUmGRpdcWJZ332yq9Gb2QnxrZM==Q@mail.gmail.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"Tom Rini <trini@konsulko.com>, U-Boot Mailing List <u-boot@lists.denx.de>,\n\tJan Kiszka <jan.kiszka@siemens.com>,\n\t\"Andreas J. Reichel\" <Andreas.Reichel@tngtech.com>,\n\tWilson Lee <wilson.lee@ni.com>, Jagan Teki <jteki@openedev.com>,\n\tChris Packham <judge.packham@gmail.com>","Subject":"Re: [U-Boot] [PATCH 02/13] Revert \"sandbox: Drop special case\n\tconsole code for sandbox\"","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":1769808,"web_url":"http://patchwork.ozlabs.org/comment/1769808/","msgid":"<CAPnjgZ1=Oci4oHiHRgOCD08GkE+uDVsx_YktGrDrWNRHenH+-A@mail.gmail.com>","list_archive_url":null,"date":"2017-09-17T17:55:46","subject":"Re: [U-Boot] [PATCH 02/13] Revert \"sandbox: Drop special case\n\tconsole code for sandbox\"","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Bin,\n\nOn 17 September 2017 at 06:50, Bin Meng <bmeng.cn@gmail.com> wrote:\n> Hi Simon,\n>\n> On Sun, Sep 17, 2017 at 5:23 AM, Simon Glass <sjg@chromium.org> wrote:\n>> While sandbox works OK without the special-case code, it does result in\n>> console output being stored in the pre-console buffer while sandbox starts\n>> up. If there is a crash or a problem then there is no indication of what\n>> is going on.\n>>\n>> For ease of debugging it seems better to revert this change also.\n>>\n>> This reverts commit d8c6fb8cedbc35eee27730a7fa544e499b3c81cc.\n>>\n>> Signed-off-by: Simon Glass <sjg@chromium.org>\n>> ---\n>>\n>>  common/console.c          | 7 +++++++\n>>  configs/sandbox_defconfig | 2 +-\n>>  2 files changed, 8 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/common/console.c b/common/console.c\n>> index f83528ca60..18457aab3c 100644\n>> --- a/common/console.c\n>> +++ b/common/console.c\n>> @@ -482,6 +482,13 @@ static inline void print_pre_console_buffer(int flushpoint) {}\n>>\n>>  void putc(const char c)\n>>  {\n>> +#ifdef CONFIG_SANDBOX\n>> +       /* sandbox can send characters to stdout before it has a console */\n>> +       if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {\n>> +               os_putc(c);\n>> +               return;\n>> +       }\n>> +#endif\n>>  #ifdef CONFIG_DEBUG_UART\n>>         /* if we don't have a console yet, use the debug UART */\n>>         if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) {\n>> diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig\n>> index e7a61bd61a..88ae98d312 100644\n>> --- a/configs/sandbox_defconfig\n>> +++ b/configs/sandbox_defconfig\n>> @@ -16,7 +16,7 @@ CONFIG_CONSOLE_RECORD=y\n>>  CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000\n>>  CONFIG_SILENT_CONSOLE=y\n>>  CONFIG_PRE_CONSOLE_BUFFER=y\n>> -CONFIG_PRE_CON_BUF_ADDR=0\n>> +CONFIG_PRE_CON_BUF_ADDR=0x100000\n>\n> Looks commit d8c6fb8cedbc35eee27730a7fa544e499b3c81cc does not have\n> this change. Why is the change from 0 to 0x100000?\n\nIt causes a conflict with other usage of memory in sandbox. I'll split\nit into a separate patch.\n\n>>  CONFIG_CMD_CPU=y\n>>  CONFIG_CMD_LICENSE=y\n>>  CONFIG_CMD_BOOTZ=y\n>> --\n>\n> And looks there is more changes in commit\n> d8c6fb8cedbc35eee27730a7fa544e499b3c81cc that is not reverted? ie:\n> puts()?\n\nThat function doesn't have this code in it anymore. It just calls putc().\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=\"nAXOYu/z\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"CxAR2SVR\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwNWb355xz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 08:06:19 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid DC224C21D92; Sun, 17 Sep 2017 22:06:17 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 66CB1C21F29;\n\tSun, 17 Sep 2017 17:58:03 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E4AB4C21F1F; Sun, 17 Sep 2017 17:58:00 +0000 (UTC)","from mail-qk0-f171.google.com (mail-qk0-f171.google.com\n\t[209.85.220.171])\n\tby lists.denx.de (Postfix) with ESMTPS id B4640C21E50\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 17:56:08 +0000 (UTC)","by mail-qk0-f171.google.com with SMTP id c69so5579522qke.8\n\tfor <u-boot@lists.denx.de>; Sun, 17 Sep 2017 10:56:08 -0700 (PDT)","by 10.200.37.200 with HTTP; Sun, 17 Sep 2017 10:55: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=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\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=s79il3kVgbFP2sPbPA74Vn9MELHSAEpCQJPDf2ZhNPc=;\n\tb=nAXOYu/zIT3rbOxkAiNwIL/GtYdlHUw82XJSpzGI+B0NS1NXueqo9nbb2ZzybbNGGM\n\tyCATotNi7ui7OEfTyHqnoO092YQxbq5qkCO59PauIguwVQerU2J3neTkGlx928UIW+Fh\n\tVYaQTXaxEOL/TkNjzAKHldYR6WcM7XYE8U0FHuY3Ng05KeQNGmDHkVb7WgAo3U6z945V\n\tIQmu6UGutdVi1WKBOdUqaBSGDWZC6JTqZimEYstmLaPwc09laUlHuCzfTkYWOp/xg2ZG\n\tIfT47AsH88pm+hcTkozSaA1WTIr6utanEF1tk50reD2g+pR64pyonccq/BqsuURpHdeN\n\tjocA==","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=s79il3kVgbFP2sPbPA74Vn9MELHSAEpCQJPDf2ZhNPc=;\n\tb=CxAR2SVRm1BjPQA6a4JHlSPlXnqPlPF5maIQHDDXn9WUk3g7o95vAv7OE7jK/JLYk5\n\tHw+QTaW9I68rtUzywf2Dqvgq8BFROXopDhI/eYnZBPuJaDXx0Ceu09zx81CcUZ4DrbrJ\n\t0RUJthytdg7fePvvPOJ7clsveKEJNijWNss24="],"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=s79il3kVgbFP2sPbPA74Vn9MELHSAEpCQJPDf2ZhNPc=;\n\tb=gFVDezl9ITXeHzzpNMRzvvD7v64PNWbS/t6yYdoJ/IAokrWYtczHmP7mZroRARao4/\n\tAqGlqe2pRjUVOfYGvK0ediCnMXt/eDR5yTn3o5VxVXS1MhLik2ws+ctQJdgJCfPHFktT\n\tMy2gIe2Enrqo5NgVWhXbjU9CmwxDPUH/J+YRXOmEJjpCmxm3yXG4JpKSB9/7TQV7PbZ2\n\t9S23h1O+93orGx2o0qfOIxt0lacYK3w1uf3No8wMUykotZDl4rIQObf8FEceHwoKec1D\n\tQi+nVSTM7K/T/BzA/K2ovD0JqSjSE7F6l6HFEjPFn4aacrh1b6U7WMi6z2QatYC+r8qy\n\tgVHA==","X-Gm-Message-State":"AHPjjUjKDof4hGsD55QK8IIP2Y34/PeVbZbwgNeDip69eaT6rEEm8WlJ\n\t5i7IIBQG+LaO8qZVNkYSG07UzgZub7MDPcEulVzSPXeZ","X-Google-Smtp-Source":"AOwi7QBD8vXcXqQpNMZo2bTyrZGvb2gzOMsC4kYje7Y0jx0x9kCjFTTsHIh1fmC0BQtcXw6aMulu/esEPiMnfvjPxNE=","X-Received":"by 10.55.17.207 with SMTP id 76mr16328869qkr.178.1505670967402; \n\tSun, 17 Sep 2017 10:56:07 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAEUhbmVtfkr1aLdEP9EOgsUmGRpdcWJZ332yq9Gb2QnxrZM==Q@mail.gmail.com>","References":"<20170916212331.170463-1-sjg@chromium.org>\n\t<20170916212331.170463-3-sjg@chromium.org>\n\t<CAEUhbmVtfkr1aLdEP9EOgsUmGRpdcWJZ332yq9Gb2QnxrZM==Q@mail.gmail.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Sun, 17 Sep 2017 11:55:46 -0600","X-Google-Sender-Auth":"D-wr9GXTm0mIOj_6NR7zlmVPMHU","Message-ID":"<CAPnjgZ1=Oci4oHiHRgOCD08GkE+uDVsx_YktGrDrWNRHenH+-A@mail.gmail.com>","To":"Bin Meng <bmeng.cn@gmail.com>","Cc":"Tom Rini <trini@konsulko.com>, U-Boot Mailing List <u-boot@lists.denx.de>,\n\tJan Kiszka <jan.kiszka@siemens.com>,\n\t\"Andreas J. Reichel\" <Andreas.Reichel@tngtech.com>,\n\tWilson Lee <wilson.lee@ni.com>, Jagan Teki <jteki@openedev.com>,\n\tChris Packham <judge.packham@gmail.com>","Subject":"Re: [U-Boot] [PATCH 02/13] Revert \"sandbox: Drop special case\n\tconsole code for sandbox\"","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>"}}]