diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-05-25 15:27:25 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-31 03:50:20 -0700 |
commit | 3dff02fa73108a5d0d68fc9bc0c11a1b32cae478 (patch) | |
tree | a567b4617ab9e60b44062135a4c02b3451eb98b1 /common/console.c | |
parent | f730193824dac4294c58e97eed60c8d8c39f28bc (diff) | |
download | chrome-ec-3dff02fa73108a5d0d68fc9bc0c11a1b32cae478.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>
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/common/console.c b/common/console.c index f4bf0b5c39..7cd876e966 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); } |