summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2020-06-17 22:13:52 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-11 23:38:49 +0000
commitdeabc8588f6fef7522175b31757aa749bc62b54f (patch)
treef74e8757433aa9e7332ec65ee2b69aee5c9aedcc
parente3755a6ec28687438492e21481acb31a6b783fed (diff)
downloadchrome-ec-deabc8588f6fef7522175b31757aa749bc62b54f.tar.gz
ec.tasklist: increase stack for console task for development mode
Due to changes in internal structures, stack consumption for SHA2, HMAC, HMAC_DRBG grew up, and when combined with stack growth due to changes in cprintf cause crash for some development console commands. This patch increase console stack for CR50_DEV and CRYPTO_TEST modes. BUG=none TEST=manual, build with CR50_DEV or CRYPTO_TEST, run taskinfo Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I7170c65e4b8092d165c478f505a435f834744ed9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2251382 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org> (cherry picked from commit 08b1e22d83bd1d6c07619065fded9d0496f90e58) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311235 Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org> (cherry picked from commit 48b402f628608856950b4cd6b843351645a08586) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2350283
-rw-r--r--board/cr50/ec.tasklist10
1 files changed, 9 insertions, 1 deletions
diff --git a/board/cr50/ec.tasklist b/board/cr50/ec.tasklist
index 547bc305ae..66a12a0623 100644
--- a/board/cr50/ec.tasklist
+++ b/board/cr50/ec.tasklist
@@ -16,7 +16,15 @@
* 'd' in an opaque parameter passed to the routine at startup
* 's' is the stack size in bytes; must be a multiple of 8
*/
+
+#ifdef CRYPTO_TEST_SETUP
+/* some crypto testing console commands require larger stack */
+#define CONSOLE_STACK_SIZE (CONFIG_STACK_SIZE + 512)
+#else
+#define CONSOLE_STACK_SIZE CONFIG_STACK_SIZE
+#endif
+
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, CONFIG_STACK_SIZE) \
TASK_NOTEST(TPM, tpm_task, NULL, 8192) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, CONFIG_STACK_SIZE)
+ TASK_ALWAYS(CONSOLE, console_task, NULL, CONSOLE_STACK_SIZE)