summaryrefslogtreecommitdiff
path: root/chip/ish/heci.c
Commit message (Collapse)AuthorAgeFilesLines
* drop unnecessary boards, chips and cts testsVadim Bendebury2020-01-071-1026/+0
| | | | | | | | | | | | | | | | | | | | The only board which would be built from this branch is Cr50. bds, fizz and host boards are necessary for proper make infrastructure operation and tests. lm4 and npcx are chips used by the bds and fizz boards, so they are also kept around. BRANCH=cr50, cr50-mp BUG=b:145912698 TEST='make buildall -j' succeeds Change-Id: I937b2b8642c1fe91578fc9615438ae22c165b20f Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986942 Reviewed-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
* printf: Add support for %zEvan Green2019-10-051-2/+2
| | | | | | | | | | | | | | | | When printing size_t sized integers, utilize the standard %z modifier so that the specifier format is correct. This will enable us to turn on compile-time printf format verification. BUG=chromium:984041 TEST=make -j buildall BRANCH=none Cq-Depend:chrome-internal:1860160 Change-Id: I2c95df5c0d87677cb9fcbde33ab8846708a774a1 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1819651 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: fix to follow HECI specHyungwoo Yang2019-06-061-39/+71
| | | | | | | | | | | | | | | | Some of current implementaion doesn't follow HECI spec. This patch fixes those wrong implementation. BRANCH=none BUG=b:133300213 TEST=Tested on Arcada platform, HECI bus&clients are working fine. Change-Id: I3a7e242d3414187342aca33aa1efc789e66af105 Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637140 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* tasks: convert TASK_EVENT_CUSTOM macro to bitJett Rink2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | We should ensure that all custom task definition are non-zero and fit with the globally defined events. Add compile time check and change semantics to specify bit number (instead of making all callers use the BIT macro). This also fixes an error with TASK_EVENT_PHY_TX_DONE for ITE being 0. The bug that made that happen hasn't landed on any firmware branches that use it though. BRANCH=none BUG=none TEST=builds Cq-Depend:chrome-internal:1178968,chrome-internal:1178952 Change-Id: I5e1d1312382d200280c548e9128e53f4eddd3e61 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1570607 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
* mkbp: take timestamp closer to hardware interruptJett Rink2019-04-241-5/+19
| | | | | | | | | | | | | | | | | We want to ensure that the timestamp we take for last mkbp is as close to the actual hardware interrupt from EC->AP. BRANCH=none BUG=b:129159505 TEST=passing CTS sensor run (except test 133 nullptr) with this change Change-Id: I94b214f021f0b63ff2883e5fe8e32acc83ce208f Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1560390 Tested-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Enrico Granata <egranata@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
* ish: wait for heci bus instead of errorJett Rink2019-04-101-8/+52
| | | | | | | | | | | | | | | | | | | | Callers of send_heci don't need to all implement retry logic for a unavailable bus. Ensure the send call blocks until the bus is ready. This is not a complete fix for b:129937881 since I still saw issue with this change. This change is still worthwhile. BRANCH=none BUG=b:129937881 TEST=Bus failure between ISH and AP is greatly improved with this change. Change-Id: Ia493b28146b30813fd737da341e7277e130ad619 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1554844 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: reduce hostcmd size to fit within HECIJett Rink2019-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | We only want to send single HECI packets as a response to the AP. 120 bytes should be enough for all commands. The EC_CMD_CONSOLE_READ Host command was consistently using 2 HECI packets and this seems to cause issues in the kernel driver. Also setting a guard variable in a more protected way BRANCH=none BUG=b:129937881 TEST=Lock up is much less frequent but not completely gone. Change-Id: Ifd9dbfdb053fee9894a876fa689f9adf7766fdd5 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1553306 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: report errors on consoleJett Rink2019-04-101-0/+2
| | | | | | | | | | | | | | | If we failed to send communication to the AP, we should log it. We should also log the disconnection path. BRANCH=none BUG=none TEST=Verify console message when HC fails Change-Id: I82a2209740c3813da64abb5c0eb4033c924c8007 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1554843 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ish: print heci error messages when occurJett Rink2019-04-051-6/+0
| | | | | | | | | | | | | | | | | | | | The error message for the HECI bus should print to the console if errors occur. Only the spammy debug message should be guarded by the debug compiler option. BRANCH=none BUG=none TEST=see prints on console This exposes that we are failing to send HECI (ISHTP) messages due to a flow control issue (no cred) Change-Id: I7ca8d47531df8a206165d4b3f14cb367d9d5d745 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1553299 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
* ISH: HECI: implement HECI layerHyungwoo Yang2018-12-281-0/+940
Introduce Host Embedeed Controller Interface for ISH. HECI is bi-directional fully asynchronous communication interface between host and ISH. It enables a host software to communicate with a ISH software(a HECI client). BUG=b:79676054 BRANCH=none TEST=Tested on Atlas board. CQ-DEPEND=CL:1279363 Change-Id: I5fdc3018e9575c5fd0c804a883293f6c9f8aa2e7 Reviewed-on: https://chromium-review.googlesource.com/1279432 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org>