summaryrefslogtreecommitdiff
path: root/include/host_command.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-11 15:56:34 -0700
committerGerrit <chrome-bot@google.com>2012-07-12 11:32:06 -0700
commit02f0ad7ea8b955d456e1e692e6e6e1a7199f2de1 (patch)
tree587675bd9d001646cd1540e2c3124fed4e8bd797 /include/host_command.h
parent347b5062a429922cabfa49de8f11fe8cebf8f9f1 (diff)
downloadchrome-ec-02f0ad7ea8b955d456e1e692e6e6e1a7199f2de1.tar.gz
Pass maximum size of response buffer in via host command handler args
BUG=chrome-os-partner:11275 TEST=from u-boot prompt, 'mkbp hash' Change-Id: I4cf37acfdd8e4edfe2cb6259b0fc6d0860ef0f79 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27225
Diffstat (limited to 'include/host_command.h')
-rw-r--r--include/host_command.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 566d90f190..fa2a52119d 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -19,11 +19,17 @@ struct host_cmd_handler_args {
uint8_t params_size; /* Size of input parameters in bytes */
/*
* Pointer to output response data buffer. On input to the handler,
- * points to a EC_PARAM_SIZE-byte buffer. Command handler can change
+ * points to a buffer of size response_max. Command handler can change
* this to point to a different location instead of memcpy()'ing data
* into the provided buffer.
*/
uint8_t *response;
+ /*
+ * Maximum size of response buffer provided to command handler. If the
+ * handler changes response to point to its own larger buffer, it may
+ * return a response_size greater than response_max.
+ */
+ uint8_t response_max;
uint8_t response_size; /* Size of data pointed to by resp_ptr */
};