summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-25 15:27:25 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-06-01 06:22:08 +0000
commit7d71b3fba9e365c129054417bf02334b4c867d4f (patch)
treed2e81f91881a2626a36b973fc4437bdca6245f4a
parentc85c8ae8a2a2158b9b9bd41e792f0ee574454ca7 (diff)
downloadchrome-ec-7d71b3fba9e365c129054417bf02334b4c867d4f.tar.gz
console: Do not flush the console in console_init
Currently, console_init calls cflush() twice, once before "Console is enabled" string is printed, once afterwards. The reason is that firmware_ECBootTime looks for that string, and it may get corrupted/interleaved with others if the EC is busy during initialization. The problem here is that the CONSOLE task may have higher priority than other tasks (for good reasons), but, on boot, there are other more critical tasks that need to run (e.g. RW image verification), rather than busy-looping waiting for the console to be flushed. By fixing firmware_ECBootTime to not look for the string anymore, we do not need those 2 console flush. BRANCH=poppy BUG=b:35647963 BUG=chromium:687228 CQ-DEPEND=CL:1075832 TEST=Flash staff, see that RW verification starts at 0.001037 instead of 0.028087 (=> 27 ms faster). TEST=test_that -b $BOARD $IP firmware_ECBootTime Change-Id: I794e48eb69cc647c4595fd80265adee4a434d566 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1073180 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1081767 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--common/console.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/common/console.c b/common/console.c
index 0a8fc3c679..872f7beac1 100644
--- a/common/console.c
+++ b/common/console.c
@@ -269,13 +269,11 @@ command_has_error:
static void console_init(void)
{
*input_buf = '\0';
- cflush();
#ifdef CONFIG_EXPERIMENTAL_CONSOLE
ccprintf("Enhanced Console is enabled (v1.0.0); type HELP for help.\n");
#else
ccprintf("Console is enabled; type HELP for help.\n");
#endif /* defined(CONFIG_EXPERIMENTAL_CONSOLE) */
- cflush();
ccputs(PROMPT);
}