summaryrefslogtreecommitdiff
path: root/include/host_command.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-11-22 08:52:23 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-26 19:32:21 +0000
commit3842121022bc7a9f30a879f9715ff9d416eae7ba (patch)
treea190558dd8d4c5ceb55b706ff1600b668d6e6ca8 /include/host_command.h
parentbd7f034b6cf01380cc7e14f28c3bd72ad42daaf2 (diff)
downloadchrome-ec-3842121022bc7a9f30a879f9715ff9d416eae7ba.tar.gz
host_command: clear any leftover data
We want to ensure that the entire buffer we may be sending back to the host from the EC does not contain any data from previous host command responses. Clear the data in common code so all chips do not have to implement this functionality. BRANCH=none BUG=b:144878983,chromium:1026994 TEST=new unit test shows cleared data Change-Id: I93ad4d36923ba1bf171f740e94830640d3fde3b0 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1930931
Diffstat (limited to 'include/host_command.h')
-rw-r--r--include/host_command.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 10d7fc37ea..8ace629505 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -67,7 +67,12 @@ struct host_packet {
*/
void (*send_response)(struct host_packet *pkt);
- /* Input request data */
+ /*
+ * Input request data. If request and response buffers overlap,
+ * then request_temp must be non-null and be large enough to store the
+ * entire request buffer. The request_temp buffer will then be used
+ * as the buffer passed into the command handlers.
+ */
const void *request;
/*