From dbfb5c1deeb6ee54663baaee6052849b8cba5bd5 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Sun, 20 Sep 2015 13:58:56 -0700 Subject: [PATCH] stm32: Define a larger task size for HOST_CMD The current largest task size is not big enough, we get stack overflow after one or several calibration requests. BRANCH=smaug BUG=chrome-os-partner:45570 TEST=After the change a loop of calibrate does not crash the EC. Change-Id: I9681a890eddf274ab496e8ca6249c7ebca5edab5 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/301215 Reviewed-by: Vincent Palatin --- board/ryu/ec.tasklist | 2 +- chip/stm32/config_chip.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/board/ryu/ec.tasklist b/board/ryu/ec.tasklist index 94c1885393..19438fef29 100644 --- a/board/ryu/ec.tasklist +++ b/board/ryu/ec.tasklist @@ -24,6 +24,6 @@ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_NOTEST(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_NOTEST(HOSTCMD, host_command_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(PD, pd_task, NULL, LARGER_TASK_STACK_SIZE) diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h index b2fdecdc2f..3668d1b7e5 100644 --- a/chip/stm32/config_chip.h +++ b/chip/stm32/config_chip.h @@ -57,14 +57,17 @@ /* Idle task stack size */ #define IDLE_TASK_STACK_SIZE 256 +/* Smaller task stack size */ +#define SMALLER_TASK_STACK_SIZE 384 + /* Default task stack size */ #define TASK_STACK_SIZE 488 /* Larger task stack size, for hook task */ #define LARGER_TASK_STACK_SIZE 640 -/* Smaller task stack size */ -#define SMALLER_TASK_STACK_SIZE 384 +/* Even bigger */ +#define VENTI_TASK_STACK_SIZE 768 /* Interval between HOOK_TICK notifications */ #define HOOK_TICK_INTERVAL_MS 500