summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-10-27 15:36:46 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-29 00:21:40 +0000
commitff7df1d7d255fa0cefba3f78d71a0589feb30935 (patch)
tree4b56b49af5902092cf6f5afdc466b9536622cf2d /baseboard
parentc5cb1cd10c416e4a17726033dcea63e8de4b5626 (diff)
downloadchrome-ec-ff7df1d7d255fa0cefba3f78d71a0589feb30935.tar.gz
brya: Update stack sizes based on stack analyzer
This adjusts the task stack sizes on brya and variants. Many task stacks had to be increased, only CONSOLE could be reduced. Task stack size constants are added at the baseboard level for several tasks that tend to behave very similarly among variants. before: Task: CHARGER, Max size: 932, Allocated size: 928 Task: CHG_RAMP, Max size: 900, Allocated size: 672 Task: CHIPSET, Max size: 988, Allocated size: 928 Task: CONSOLE, Max size: 612, Allocated size: 928 Task: HOOKS, Max size: 580, Allocated size: 800 Task: HOSTCMD, Max size: 612, Allocated size: 800 Task: KEYPROTO, Max size: 660, Allocated size: 672 Task: KEYSCAN, Max size: 708, Allocated size: 672 Task: MOTIONSENSE, Max size: 796, Allocated size: 928 Task: PD_C0, Max size: 1052, Allocated size: 1056 Task: PD_C1, Max size: 1052, Allocated size: 1056 Task: PD_C2, Max size: 1052, Allocated size: 1056 Task: PD_INT_C0, Max size: 644, Allocated size: 672 Task: PD_INT_C1, Max size: 644, Allocated size: 672 Task: POWERBTN, Max size: 964, Allocated size: 800 Task: USB_CHG_P0, Max size: 508, Allocated size: 672 Task: USB_CHG_P1, Max size: 508, Allocated size: 672 Task: USB_CHG_P2, Max size: 508, Allocated size: 672 after: Task: CHARGER, Max size: 932, Allocated size: 1088 Task: CHG_RAMP, Max size: 900, Allocated size: 1088 Task: CHIPSET, Max size: 988, Allocated size: 1152 Task: CONSOLE, Max size: 612, Allocated size: 800 Task: HOOKS, Max size: 580, Allocated size: 800 Task: HOSTCMD, Max size: 612, Allocated size: 800 Task: KEYPROTO, Max size: 660, Allocated size: 800 Task: KEYSCAN, Max size: 708, Allocated size: 928 Task: MOTIONSENSE, Max size: 796, Allocated size: 928 Task: PD_C0, Max size: 1052, Allocated size: 1216 Task: PD_C1, Max size: 1052, Allocated size: 1216 Task: PD_C2, Max size: 1052, Allocated size: 1216 Task: PD_INT_C0, Max size: 644, Allocated size: 800 Task: PD_INT_C1, Max size: 644, Allocated size: 800 Task: POWERBTN, Max size: 964, Allocated size: 1088 Task: USB_CHG_P0, Max size: 508, Allocated size: 672 Task: USB_CHG_P1, Max size: 508, Allocated size: 672 Task: USB_CHG_P2, Max size: 508, Allocated size: 672 BRANCH=none BUG=b:204362187,b:204102039,b:204280744 TEST=brya EC no longer reboots due to stack overflow in PD task TEST=task command now reports 200 bytes of stack headroom for chipset TEST=boots on brya Change-Id: I081228da6d850bf69b431475b81025045c1c521d Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3248976 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/brya/baseboard.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h
index dbee995546..9a6e16784d 100644
--- a/baseboard/brya/baseboard.h
+++ b/baseboard/brya/baseboard.h
@@ -229,6 +229,19 @@
/* Device version of product. */
#define CONFIG_USB_BCD_DEV 0x0000
+/*
+ * These stack sizes were determined using "make analyzestack" for brya
+ * and include about 15% headroom. Sizes are rounded to multiples of 64
+ * bytes. Task stack sizes not listed here use more generic values (see
+ * ec.tasklist).
+ */
+#define BASEBOARD_CHARGER_TASK_STACK_SIZE 1088
+#define BASEBOARD_CHG_RAMP_TASK_STACK_SIZE 1088
+#define BASEBOARD_CHIPSET_TASK_STACK_SIZE 1152
+#define BASEBOARD_PD_INT_TASK_STACK_SIZE 800
+#define BASEBOARD_PD_TASK_STACK_SIZE 1216
+#define BASEBOARD_POWERBTN_TASK_STACK_SIZE 1088
+
#ifndef __ASSEMBLER__
#include <stdbool.h>