summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian J. Nemec <bnemec@chromium.org>2020-04-01 16:07:22 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-02 09:44:59 +0000
commitb5066dcf3f0ed9bfc5df4ccc5e41583bf3b8fca7 (patch)
treef58ca44d41533ca394f7fd5c1c24c9fe8dd9ad81
parent28f07760f384789a6a28801c0c42d9d61af2f99b (diff)
downloadchrome-ec-b5066dcf3f0ed9bfc5df4ccc5e41583bf3b8fca7.tar.gz
ec: Enlarged Task Stack size on platforms
The task stack size of is small enough that the process was triggering stack overflows when responding to commands. These actions had a small chance of causing EC hardfaults. This was apparent with the gpioget command which had the attributes of performing many calls to a printf function which also has many parameters. Since the structure of a printf with 10 or more parameters is common when constructing console responses, this enlarges the stack for that task. This is more important since the probability of it creating a hardfault is low. To reduce the chance of this issue on other platforms, the platforms with 488 byte tasks were also enlarged to 512 bytes. BUG=chromium:1056780 BRANCH=none TEST=Connected servod to servo_v4 looped the command 'dut-control servo_v4_uart_cmd:gpioget' 1000 times TEST=make buildall -j Verified free ram space remains over 60 bytes on impacted platforms Change-Id: I6b50b204c83a10068153f3e01bc134446047f235 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2133130 Tested-by: Brian Nemec <bnemec@chromium.org> Commit-Queue: Brian Nemec <bnemec@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
-rw-r--r--chip/mt_scp/config_chip.h2
-rw-r--r--chip/nrf51/config_chip.h2
-rw-r--r--chip/stm32/config_chip.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/chip/mt_scp/config_chip.h b/chip/mt_scp/config_chip.h
index 245c9f1bc6..89311cda38 100644
--- a/chip/mt_scp/config_chip.h
+++ b/chip/mt_scp/config_chip.h
@@ -52,7 +52,7 @@
#define CONFIG_STACK_SIZE 1024
#define IDLE_TASK_STACK_SIZE 256
#define SMALLER_TASK_STACK_SIZE 384
-#define TASK_STACK_SIZE 488
+#define TASK_STACK_SIZE 512
#define LARGER_TASK_STACK_SIZE 640
#define VENTI_TASK_STACK_SIZE 768
diff --git a/chip/nrf51/config_chip.h b/chip/nrf51/config_chip.h
index 401ac4779f..7295ab9360 100644
--- a/chip/nrf51/config_chip.h
+++ b/chip/nrf51/config_chip.h
@@ -15,7 +15,7 @@
#define IDLE_TASK_STACK_SIZE 256
/* Default task stack size */
-#define TASK_STACK_SIZE 488
+#define TASK_STACK_SIZE 512
/* Larger task stack size, for hook task */
#define LARGER_TASK_STACK_SIZE 640
diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h
index 0c38038b6f..a2905ce946 100644
--- a/chip/stm32/config_chip.h
+++ b/chip/stm32/config_chip.h
@@ -97,7 +97,7 @@
#define SMALLER_TASK_STACK_SIZE 384
/* Default task stack size */
-#define TASK_STACK_SIZE 488
+#define TASK_STACK_SIZE 512
/* Larger task stack size, for hook task */
#define LARGER_TASK_STACK_SIZE 640