New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826592 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

cros_ec: Add host event to tell kernel to read logs when available

Project Member Reported by drinkcat@chromium.org, Mar 28 2018

Issue description

Currently, the kernel polls every 10 seconds to fetch EC logs. When the system is relatively quiet, this is ok.

For example, on lux, there is about 30 bytes/s of console traffic in S0 (so every 10 seconds, 300+ bytes are fetched, from a 1024 bytes buffer).

However, we still regularly overflow the 1024 bytes buffer when the EC is particularly active.

EC should send a host event when the buffer is getting full (say, at 80% watermark), so that the kernel can fetch data more regularly.
 
Owner: drinkcat@chromium.org
Status: Started (was: Available)
Cc: furquan@chromium.org
Struggled a bit with this... I first tried to send an host event, but realized that the handling is very different on ARM vs x86 (so we'd need additional support in coreboot for that), and that 64-bit host events are partially broken (https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/989514), and not fully implemented on ARM platform/kernel.

Anyway, sending a new MKBP event type is _far_ simpler. CLs:
- https://chromium-review.googlesource.com/#/c/chromiumos/platform/ec/+/989892 uart_buffering: Send EC_MKBP_EVENT_CONSOLE when log buffer gets full
- https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/989378 CHROMIUM: cros-ec: Update cros_ec_commands header to latest version
- https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/989379 CHROMIUM: cros_ec: Receive MKBP console events to fetch log      
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 7 2018

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/84c9fdbaa59a0377fe161c8187bb07fb21ebcfa6

commit 84c9fdbaa59a0377fe161c8187bb07fb21ebcfa6
Author: Nicolas Boichat <drinkcat@chromium.org>
Date: Sat Apr 07 07:05:52 2018

CHROMIUM: cros-ec: Update cros_ec_commands header to latest version

BUG=chromium:826592
TEST=emerge-poppy -v chromeos-kernel-4_4

Change-Id: If6483fe057741284a893ca0ed7de8e118d38015b
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/989378
Reviewed-by: Furquan Shaikh <furquan@chromium.org>

[modify] https://crrev.com/84c9fdbaa59a0377fe161c8187bb07fb21ebcfa6/include/linux/mfd/cros_ec_commands.h

Cc: vpalatin@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/f5816b497231c9fbd78353c581f44f2f8dd1c837

commit f5816b497231c9fbd78353c581f44f2f8dd1c837
Author: Jett Rink <jettrink@chromium.org>
Date: Thu Aug 30 21:41:51 2018

nautilus: decrease UART buffer

We are running out of RAM space for nautilus and the UART buffer does
not need to be 4KB. 1KB is almost enough, so 2KB should be plenty. In
the long term chromium:826592 will allow us to use even smaller buffers.

BRANCH=none
BUG=chromium:826592,b:112088135
TEST=builds and links with child CL stack

Change-Id: I054f884fea5761de26888a5b4fe26ded6c2ffbd9
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1194082
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>

[modify] https://crrev.com/f5816b497231c9fbd78353c581f44f2f8dd1c837/board/nautilus/board.h

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/088b21fb3008c60d28894f8da62b5ba44e2ab63c

commit 088b21fb3008c60d28894f8da62b5ba44e2ab63c
Author: Jett Rink <jettrink@chromium.org>
Date: Sat Sep 01 02:03:19 2018

rammus: decrease UART buffer

We are running out of RAM space for rammus  and the UART buffer does
not need to be 4KB. 1KB is almost enough, so 2KB should be plenty. In
the long term chromium:826592 will allow us to use even smaller buffers.

BRANCH=none
BUG=chromium:826592,b:112088135
TEST=builds and links with child CL stack

Change-Id: I31bee3a8c5093e05dc5f27bcc99b8b19a8f022d5
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1200262
Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>

[modify] https://crrev.com/088b21fb3008c60d28894f8da62b5ba44e2ab63c/board/rammus/board.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 1

Labels: merge-merged-firmware-nocturne-10984.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/43df77b94faee952deab010cb615347ac341169b

commit 43df77b94faee952deab010cb615347ac341169b
Author: Jett Rink <jettrink@chromium.org>
Date: Mon Oct 01 18:25:28 2018

rammus: decrease UART buffer

We are running out of RAM space for rammus  and the UART buffer does
not need to be 4KB. 1KB is almost enough, so 2KB should be plenty. In
the long term chromium:826592 will allow us to use even smaller buffers.

BRANCH=none
BUG=chromium:826592,b:112088135
TEST=builds and links with child CL stack

Change-Id: I31bee3a8c5093e05dc5f27bcc99b8b19a8f022d5
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1200262
Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1255164
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/43df77b94faee952deab010cb615347ac341169b/board/rammus/board.h

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/54c3ac427fac96ba8ea3f4e002cf4be635741a3e

commit 54c3ac427fac96ba8ea3f4e002cf4be635741a3e
Author: Jett Rink <jettrink@chromium.org>
Date: Mon Oct 01 18:25:29 2018

nautilus: decrease UART buffer

We are running out of RAM space for nautilus and the UART buffer does
not need to be 4KB. 1KB is almost enough, so 2KB should be plenty. In
the long term chromium:826592 will allow us to use even smaller buffers.

BRANCH=none
BUG=chromium:826592,b:112088135
TEST=builds and links with child CL stack

Change-Id: I054f884fea5761de26888a5b4fe26ded6c2ffbd9
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1194082
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1255165
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/54c3ac427fac96ba8ea3f4e002cf4be635741a3e/board/nautilus/board.h

Sign in to add a comment