diff options
author | Andrew McRae <amcrae@google.com> | 2022-03-15 16:49:21 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-03-29 22:05:58 +0000 |
commit | 788cdadccbf49f7bd9a7bff83718b0eaac4105da (patch) | |
tree | 42502dbd1ea9a4ce6cf0bc41144b5f046cc9618e | |
parent | cd70889abfe59865efa29ce47bd1bff11dbb9acd (diff) | |
download | chrome-ec-788cdadccbf49f7bd9a7bff83718b0eaac4105da.tar.gz |
zephyr: Consolidate stack size configuration
Consolidate the task stack size configuration in one config
file for clarity.
BUG=none
TEST=zmake build {nivviks,nereid}
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Id4b818e40e2d1a5c324da9f9b49bc4d912bbba80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522467
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/Kconfig.stacks | 128 | ||||
-rw-r--r-- | zephyr/boards/riscv/it8xxx2/Kconfig.defconfig | 42 | ||||
-rw-r--r-- | zephyr/projects/nissa/prj_nereid.conf | 9 |
3 files changed, 54 insertions, 125 deletions
diff --git a/zephyr/Kconfig.stacks b/zephyr/Kconfig.stacks index 3e13d2ed33..e61d434399 100644 --- a/zephyr/Kconfig.stacks +++ b/zephyr/Kconfig.stacks @@ -3,110 +3,90 @@ # found in the LICENSE file. ############################################################################## -if SOC_SERIES_NPCX7 # Zephyr internal stack sizes +# +# The intent is to try and keep the stack sizes in one place. + +config MAIN_STACK_SIZE + default 1536 if SOC_SERIES_RISCV32_IT8XXX2 + default 1200 if SOC_SERIES_NPCX7 + default 1200 if SOC_SERIES_NPCX9 config IDLE_STACK_SIZE - default 192 + default 400 if SOC_SERIES_RISCV32_IT8XXX2 + default 192 if SOC_SERIES_NPCX7 + default 400 if SOC_SERIES_NPCX9 config ISR_STACK_SIZE - default 1024 + default 800 if SOC_SERIES_RISCV32_IT8XXX2 + default 1024 if SOC_SERIES_NPCX7 + default 1024 if SOC_SERIES_NPCX9 config SHELL_STACK_SIZE - default 1536 + default 1536 if SOC_SERIES_RISCV32_IT8XXX2 + default 1536 if SOC_SERIES_NPCX7 + default 1536 if SOC_SERIES_NPCX9 config SYSTEM_WORKQUEUE_STACK_SIZE - default 1024 + default 1536 if SOC_SERIES_RISCV32_IT8XXX2 + default 1024 if SOC_SERIES_NPCX7 + default 1024 if SOC_SERIES_NPCX9 # Chromium EC stack sizes config TASK_CHARGER_STACK_SIZE - default 704 - -config TASK_CHG_RAMP_STACK_SIZE - default 608 + default 1280 if SOC_SERIES_RISCV32_IT8XXX2 + default 704 if SOC_SERIES_NPCX7 + default 1056 if SOC_SERIES_NPCX9 config TASK_CHIPSET_STACK_SIZE + default 820 if SOC_SERIES_RISCV32_IT8XXX2 default 1056 if AP_x86 - default 684 if AP_ARM - default 1200 # Safe default + default 684 if AP_ARM && SOC_SERIES_NPCX7 + default 1056 if AP_ARM && SOC_SERIES_NPCX9 config TASK_HOSTCMD_STACK_SIZE - default 1024 + default 1152 if SOC_SERIES_RISCV32_IT8XXX2 + default 800 if SOC_SERIES_NPCX7 + default 800 if SOC_SERIES_NPCX9 config TASK_KEYPROTO_STACK_SIZE - default 640 + default 1152 if SOC_SERIES_RISCV32_IT8XXX2 + default 640 if SOC_SERIES_NPCX7 + default 640 if SOC_SERIES_NPCX9 config TASK_KEYSCAN_STACK_SIZE - default 1024 + default 1280 if SOC_SERIES_RISCV32_IT8XXX2 + default 1024 if SOC_SERIES_NPCX7 + default 1024 if SOC_SERIES_NPCX9 config TASK_MOTIONSENSE_STACK_SIZE - default 800 + default 1280 if SOC_SERIES_RISCV32_IT8XXX2 + default 800 if SOC_SERIES_NPCX7 + default 800 if SOC_SERIES_NPCX9 config TASK_POWERBTN_STACK_SIZE - default 672 + default 1280 if SOC_SERIES_RISCV32_IT8XXX2 + default 672 if SOC_SERIES_NPCX7 + default 672 if SOC_SERIES_NPCX9 config TASK_PD_STACK_SIZE - default 1184 + default 1536 if SOC_SERIES_RISCV32_IT8XXX2 + default 1184 if SOC_SERIES_NPCX7 + default 1184 if SOC_SERIES_NPCX9 config TASK_PD_INT_STACK_SIZE - default 736 + default 1152 if SOC_SERIES_RISCV32_IT8XXX2 + default 736 if SOC_SERIES_NPCX7 + default 736 if SOC_SERIES_NPCX9 config TASK_USB_CHG_STACK_SIZE - default 800 - -endif # SOC_SERIES_NPCX7 -############################################################################## - - -############################################################################## -if SOC_SERIES_NPCX9 - -# Zephyr internal stack sizes - -config IDLE_STACK_SIZE - default 400 - -config MAIN_STACK_SIZE - default 1200 - -config ISR_STACK_SIZE - default 1024 - -config SHELL_STACK_SIZE - default 1536 - -config SYSTEM_WORKQUEUE_STACK_SIZE - default 1024 - -# Chromium EC stack sizes - -config TASK_CHARGER_STACK_SIZE - default 1056 - -config TASK_CHIPSET_STACK_SIZE - default 1056 if AP_x86 - default 1056 if AP_ARM - default 1200 # Safe default - -config TASK_HOSTCMD_STACK_SIZE - default 800 - -config TASK_KEYSCAN_STACK_SIZE - default 1024 - -config TASK_MOTIONSENSE_STACK_SIZE - default 812 - -config TASK_PD_STACK_SIZE - default 1184 - -config TASK_PD_INT_STACK_SIZE - default 736 - -config TASK_USB_CHG_STACK_SIZE - default 800 - -endif # SOC_SERIES_NPCX9 -############################################################################## + default 1152 if SOC_SERIES_RISCV32_IT8XXX2 + default 800 if SOC_SERIES_NPCX7 + default 800 if SOC_SERIES_NPCX9 + +config TASK_USB_MUX_STACK_SIZE + default 1280 if SOC_SERIES_RISCV32_IT8XXX2 + default 1024 if SOC_SERIES_NPCX7 + default 1024 if SOC_SERIES_NPCX9 diff --git a/zephyr/boards/riscv/it8xxx2/Kconfig.defconfig b/zephyr/boards/riscv/it8xxx2/Kconfig.defconfig index 20d07c332f..6cf9bd039b 100644 --- a/zephyr/boards/riscv/it8xxx2/Kconfig.defconfig +++ b/zephyr/boards/riscv/it8xxx2/Kconfig.defconfig @@ -7,48 +7,6 @@ if BOARD_IT8XXX2 config BOARD default "it8xxx2" -# Zephyr internal stack sizes - -config MAIN_STACK_SIZE - default 1536 - -config IDLE_STACK_SIZE - default 384 - -config ISR_STACK_SIZE - default 800 - -config SHELL_STACK_SIZE - default 1560 - -config SYSTEM_WORKQUEUE_STACK_SIZE - default 1200 - - -# Chromium EC stack sizes - -config TASK_CHARGER_STACK_SIZE - default 1280 - -config TASK_CHIPSET_STACK_SIZE - default 820 - -config TASK_HOSTCMD_STACK_SIZE - default 1024 - -config TASK_KEYSCAN_STACK_SIZE - default 1088 - -config TASK_MOTIONSENSE_STACK_SIZE - default 920 - -config TASK_PD_STACK_SIZE - default 1536 - -config TASK_USB_CHG_STACK_SIZE - default 1024 - - choice PLATFORM_EC_HOSTCMD_DEBUG_MODE default HCDEBUG_OFF endchoice # PLATFORM_EC_HOSTCMD_DEBUG_MODE diff --git a/zephyr/projects/nissa/prj_nereid.conf b/zephyr/projects/nissa/prj_nereid.conf index 89bf8b89ce..4afb2492df 100644 --- a/zephyr/projects/nissa/prj_nereid.conf +++ b/zephyr/projects/nissa/prj_nereid.conf @@ -18,17 +18,8 @@ CONFIG_LOG_BUFFER_SIZE=512 CONFIG_THREAD_MAX_NAME_LEN=12 # Task stacks, tuned by experiment. Most expanded to prevent overflow, and a few # shrunk to save RAM. -CONFIG_TASK_KEYPROTO_STACK_SIZE=1152 -CONFIG_TASK_KEYSCAN_STACK_SIZE=1280 -CONFIG_TASK_HOSTCMD_STACK_SIZE=1152 -CONFIG_TASK_MOTIONSENSE_STACK_SIZE=1280 -CONFIG_TASK_PD_INT_STACK_SIZE=1152 -CONFIG_TASK_POWERBTN_STACK_SIZE=1280 -CONFIG_TASK_USB_CHG_STACK_SIZE=1152 -CONFIG_TASK_USB_MUX_STACK_SIZE=1280 CONFIG_AP_PWRSEQ_STACK_SIZE=1408 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=512 -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 # Sensor drivers CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C=y |