Files
OpenCellular/chip
Mulin Chao 20c3de1c36 npcx: bypasses for SHM reading fail via eSPI and CSAE impact efficiency
In eSPI systems, when the host performs a data read from the Shared
Memory space, the returned data may be corrupted. This is a result of
the Core-to-Host access enable bit being toggled (by toggling CSAE bit
in SIBCTRL register) during an eSPI transaction. The bypass for this
symptom is to set CSAE bit to 1 during initialization and remove the
toggling of CSAE bit from other EC firmware code.

But keeping the CSAE bit at 1 forever also impacts the eSPI performance
a lots. When the core clock is stalled by sleep, deep sleep or wfi
instruction, the eSPI Peripheral Channel transaction is stalled if this
bit is set. The bypass for this symptom is to wake up the core by eSPI
peripheral channel transaction and let eSPI module handle the remaining
packet.

BRANCH=eve
BUG=b:64730183
TEST=No build errors for make buildall. Flash poppy ec image, make sure
     it can boot to OS. Run "ectool version" over 100000 times, no error
     occurs. Use following script "count=0; while :; do echo "---
     iteration --- $count"; time flashrom -p ec -r ec.bin; sleep 5;
     count=$((${count}+1)); done" to test eSPI performances over 1000
     times. No errors occur and all tests' efficiency are the same as
     removing CSAE bypass.

Change-Id: I1b9051c5a3d368a5917882d9d1c3bb00481a53ad
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/620301
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-08-21 23:48:13 -07:00
..