summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.stacks
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* nissa: nereid: Adjust ISR and idle stackAndrew McRae2022-05-161-2/+2
| | | | | | | | | | | | | | | | | | Stack margins were getting small with FAFTSetup test: idle (real size 400): unused 100 usage 300 / 400 (75 %) IRQ 00 (real size 800): unused 132 usage 668 / 800 (83 %) Increase stacks to provide a bit more space. BUG=b:231784294 TEST=zmake build nereid; run FAFTSetup test BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I7edf76325004b2cf6299c50a2027ddf5a97d41f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3644559 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: increase PD interrupt stack sizeDeepti Deshatty2022-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | TASK_PD_INT_STACK_SIZE size changed from 736 to 880. Increased the size by 20%. BRANCH=none BUG=b:228815123 TEST=Verify USBC power role swap test on Nivviks Before including CL (Idle state) ec:~$ kernel stacks PD_INT_C1 (real size 736): unused 244 usage 492 / 736 (66 %) PD_INT_C0 (real size 736): unused 284 usage 452 / 736 (61 %) After including CL (Idle state) ec:~$ kernel stacks PD_INT_C1 (real size 880): unused 388 usage 492 / 880 (55 %) PD_INT_C0 (real size 880): unused 428 usage 452 / 880 (51 %) Change-Id: I9f0ef0ed48d530439265df5e3f418be350631323 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581824 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: Increase Nivviks task stack sizesAndrew McRae2022-04-061-4/+4
| | | | | | | | | | | | | | MOTIONSENSE Stack was showing 36 bytes free, now 292. POWERBTN has 220 unused. BUG=b:228253040 TEST=zmake build nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I16bb1b3dcd6ca14753b4cb3f8a676ff3db5d7be6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573428 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Adjust stack sizesAndrew McRae2022-04-011-3/+9
| | | | | | | | | | | | | | Adjust the KEYPROTO task stack size and the AP_PWRSEQ stack size. BUG=b:225756599 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: If9f72bd76c5fab1378d8ddb8ef19f1aa9bbbff98 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3562205 Reviewed-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: Consolidate stack size configurationAndrew McRae2022-03-291-74/+54
| | | | | | | | | | | | | | 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>
* zephyr: increase ec idle stack size for npcx9Deepti Deshatty2022-03-021-1/+1
| | | | | | | | | | | | | | | | Increase the idle thread stack to 400 bytes. Without this change DUT reboots as stack overflows. BUG=b:219891340 BRANCH=none TEST=Random EC faults are not seen on Nivviks. Change-Id: I5d367cc3626c9852b4e25589810981d969ba8834 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3492302 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr/it8xxx2: set default stack sizes, move to defconfigPeter Marheine2022-02-211-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nereid development has needed to increase some stack sizes to prevent overflows; make these sizes the default for IT8xxx2 since it seems likely that other users will have similar needs. Since default stack sizes were both being set in Kconfig.stacks and the board defconfig file, also move all of them to the board's defconfig: it seems more sensible to put configs for each board in the board directory rather than to interleave every board's configuration in a global file. BUG=b:218598999 TEST=nereid stacks have reasonable utilization with these defaults: uart:~$ kernel stacks PD_INT_C0 (real size 1280): unused 1000 usage 280 / 1280 (21 %) PD_C0 (real size 1536): unused 320 usage 1216 / 1536 (79 %) HOSTCMD (real size 1024): unused 192 usage 832 / 1024 (81 %) MOTIONSENSE (real size 928): unused 536 usage 392 / 928 (42 %) CHARGER (real size 1280): unused 240 usage 1040 / 1280 (81 %) USB_CHG_P0 (real size 1024): unused 176 usage 848 / 1024 (82 %) shell_uart (real size 1568): unused 640 usage 928 / 1568 (59 %) sysworkq (real size 1200): unused 156 usage 1044 / 1200 (87 %) logging (real size 768): unused 236 usage 532 / 768 (69 %) idle 00 (real size 256): unused 108 usage 148 / 256 (57 %) main (real size 1536): unused 172 usage 1364 / 1536 (88 %) IRQ 00 (real size 800): unused 292 usage 508 / 800 (63 %) BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I22f4d19d3830a6b3519dd5e560609f005eea8dcb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3470637 Reviewed-by: Andrew McRae <amcrae@google.com>
* lazor: Adjust Zephyr stack sizes (from taskinfo).Andrew McRae2022-02-121-5/+5
| | | | | | | | | | | | | | | Update the stack sizes according to patch from Nuvoton. Enable the taskinfo cmd to view stack sizes, and define SOC_SERIES_NPCX7 so that new stack sizes are picked up. BUG=b:218820985 TEST=zmake configure -b lazor; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I9305d460fd688ccaa7b6d8124fa18989268b87c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3454926 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* npcx9: Increase host command thread stack sizeBernardo Perez Priego2022-02-111-1/+1
| | | | | | | | | | | | | | | | | | | EC crashes during SOC boot due to host command thread stack overflow. To avoid the stack overflow, increased the host command thread stack size. BRANCH=b:218684234 BUG=None TEST=Boot SOC on brya board. EC crash due to stack overflow is not observed. Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com> Change-Id: I752c51a286d1351a91f166cda4ee23a4cf534723 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3448093 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: RAJESH KUMAR <rajesh3.kumar@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* npcx9: Adjust default stack sizes for npcx9Andrew McRae2022-01-301-2/+5
| | | | | | | | | | | | | | | | | | Observations on Nivviks indicate that the default stack sizes are too small: main stack size 1200, unused 92, usage 1108 / 1200 (92 %) sysworkq stack size 1024, unused 180, usage 844 / 1024 (82 %) CHARGER stack size 1024, unused 212, usage 812 / 1024 (79 %) BUG=b:201000681 TEST=zmake testall; flash and run on nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ic15bd0205ce0e5846d07699362cdf24fc60cce5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426239 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Increase Charger and Chipset Tsk Stack SizeSam Hurst2022-01-261-2/+2
| | | | | | | | | | | | | | | | | Increase Charger and Chipset Task Stack Size to prevent stack overflow when additional features are enabled. BUG=b:210906156 BRANCH=none TEST=booted system with EFS2 Enabled and issued apshutdown ec console command. This command causes a stack overflow with the previous stack sizes. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ib2f61a58c7f4fb0ef8569da561187e1573dc8d83 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3417014 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: it8xxx2: increase shell stack sizeTim Lin2021-11-231-0/+11
| | | | | | | | | | | | | | | | | | | | Enter the kernel threads command from the console to know that the shell stack size is close to the limit. If the memory dump command is executed, a kernel panic will occur. BUG=none BRANCH=none TEST=zmake testall console cmd: kernel threads: shell_uart usage:72% : md .b 0xf0xxxx 256: test OK! Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Iece3a1a109144813febbf7cf19f4155226be79b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3295835 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Increase stack size for x86 chipset taskRajesh Kumar2021-11-111-2/+6
| | | | | | | | | | | | | | | | | | | Default stack size '684' is not enough for x86 specific chipset task, insufficient stack causes task to crash. To fix this, stack size has been increased to 1056 for x86 specific chipset. BRANCH=None BUG=b:205746466 TEST=zmake configure -B ~/tmp/brya brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I9005683ec58070b38ed34060d92e206c576ed17b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3271777 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
* zephyr: remove the HOOKS taskKeith Short2021-11-101-6/+0
| | | | | | | | | | | | | | | | | Move the HOOK_TICK and HOOK_SECOND calls into the system work queue. This matches the cros-ec implementation where HOOK_TICK, HOOK_SECOND, and deferred routines are run from the same task. BUG=none BRANCH=none TEST=zmake testall TEST=Boot zephyr on Herobrine. Verify AP powers up, verify USB-PD charging, and verify LEDs Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ife0fe8e1f6a4f17ad49b0cf386029248ffa69570 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3271788 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: herobrine_npcx9: adjust ~75% stack sizesDenis Brockus2021-09-101-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is still more tuning that needs to happen as development continues but this is an initial stab leaving some values the same as they are for NPCX7 when there was doubt. kernel stacks 21-09-09 12:14:06.481 0x200c0e20 PD_INT_C1 (real size 736): unused 496 usage 240 / 736 (32 %) 21-09-09 12:14:06.487 0x200c0d00 PD_INT_C0 (real size 736): unused 496 usage 240 / 736 (32 %) 21-09-09 12:14:06.493 0x200c0be0 PD_C1 (real size 1184): unused 464 usage 720 / 1184 (60 %) 21-09-09 12:14:06.500 0x200c0ac0 PD_C0 (real size 1184): unused 448 usage 736 / 1184 (62 %) 21-09-09 12:14:06.506 0x200c09a0 KEYSCAN (real size 704): unused 184 usage 520 / 704 (73 %) 21-09-09 12:14:06.513 0x200c0880 HOSTCMD (real size 704): unused 112 usage 592 / 704 (84 %) 21-09-09 12:14:06.519 0x200c0760 MOTIONSENSE (real size 816): unused 244 usage 572 / 816 (70 %) 21-09-09 12:14:06.525 0x200c0640 CHIPSET (real size 688): unused 176 usage 512 / 688 (74 %) 21-09-09 12:14:06.532 0x200c0520 CHARGER (real size 752): unused 192 usage 560 / 752 (74 %) 21-09-09 12:14:06.538 0x200c0400 USB_CHG_P1 (real size 544): unused 144 usage 400 / 544 (73 %) 21-09-09 12:14:06.544 0x200c02e0 USB_CHG_P0 (real size 544): unused 120 usage 424 / 544 (77 %) 21-09-09 12:14:06.551 0x200c01c0 HOOKS (real size 672): unused 448 usage 224 / 672 (33 %) 21-09-09 12:14:06.560 0x200c7a60 sysworkq (real size 800): unused 200 usage 600 / 800 (75 %) 21-09-09 12:14:06.564 0x200c67d0 shell_uart (real size 1536): unused 832 usage 704 / 1536 (45 %) 21-09-09 12:14:06.571 0x200c78f0 idle 00 (real size 192): unused 80 usage 112 / 192 (58 %) 21-09-09 12:14:06.577 0x200c79a8 main (real size 1024): unused 448 usage 576 / 1024 (56 %) 21-09-09 12:14:06.583 0x200cc2c8 IRQ 00 (real size 1024): unused 620 usage 404 / 1024 (39 %) BUG=b:199328071 BRANCH=none TEST=ec console command 'kernel stacks' Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I47a02a3554e066dda87c91a2335f7e89ab0e4100 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3152316 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: npcx: Add power management supportKeith Short2021-04-291-1/+1
| | | | | | | | | | | | | | Add power management support for the NPCX family. BUG=b:184653704 BRANCH=none TEST=zmake testall TEST=Verify deep sleep on Volteer (with next CL) and measure power. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I86eef50c13742e7ca717da38a92636e589af6c58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855527 Reviewed-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
* zephyr: shim: use the standard sysworkq for deferred tasksFabio Baltieri2021-04-281-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zephyr defines a default system wide work queue and allows to add extra queues, the default queue is only compiled in if used by anything. The shim queue was the only one originally used until vboot started to use the sysworkq as well, which added that to the build as well. The API documentation[1] explicitly discourages custom workqueues if not strictly necessary. In this case the system one is only used once and then it's effectively dedicated to the hooks, so there should be effectively no change is using that one as the only queue, and we get rid of a custom queue structure, initialization and thread. Kernel stacks before: 0x200c2928 ec_hooks (real size 704): unused 144 usage 560 / 704 (79 %) 0x200c3488 sysworkq (real size 288): unused 80 usage 208 / 288 (72 %) Kernel stacks after: 0x200c76f8 sysworkq (real size 704): unused 176 usage 528 / 704 (75 %) SRAM should go down by about 520 bytes. [1] https://docs.zephyrproject.org/latest/reference/kernel/threads/workqueue.html#system-workqueue BUG=b:183748844 BRANCH=none TEST=build and run on volteer TEST=kernel stacks on volteer Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ia8ab59bf3e6a5e28fe36ec1e94c65483c4645baa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2854850 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Kconfig.stacks: add missing licence headerFabio Baltieri2021-04-281-0/+4
| | | | | | | | | | | | | | Add the licence header, was left out from the original commit. BUG=none BRANCH=none TEST=none, it's just a comment Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Id6aad5920ad3140cfac7bb2445c8e7ad5a38b93f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2854843 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: override the sysworkq stack size for npcxFabio Baltieri2021-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This lowers the stack size for the sysworkq task to bring it close to the 75% target watermark. This is the Zephyr workqueue thread, it is used by the k_work_submit() API and started showing up after 783543b32: uart:~$ kernel stacks ... 0x200c7ed0 sysworkq (real size 288): unused 80 usage 208 / 288 (72 %) BUG=b:183748844 BRANCH=none TEST=kernel stacks Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I9aa733dc63e08abf689f9e0c265cbe5afe533cc1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2830818 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: use interrupt based RX bufferingYuval Peress2021-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | Poll-based RX was technically incorrect since Zephyr was setting up the UART to FIFO mode (instead of byte mode). This change replaces polling the RX UART with interrupt based callbacks. When calling uart_shell_stop(), the ISR will be replaced and will instead queue items to a ring buffer which can be read from uart_getc() (it can also be cleared via the uart_clear_input() function). BRANCH=none BUG=b:181352041 TEST=Build volteer, run, see expected 0xec07 from the GSC. Cq-Depend: chromium:2730870, chromium:2730869 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I5d2b61e914b56f678a259b373969522da87e8df3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728824 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: config: trim down task stacks for NPCX7Fabio Baltieri2021-04-011-0/+55
Reset the various task stack sizes based on the current build setup. This aims to keep the stack watermarks to ~75% based on the numbers observed after booting and running few EC commands. Current output: PD_INT_C1 (real size 736): unused 192 usage 544 / 736 (73 %) PD_INT_C0 (real size 736): unused 264 usage 472 / 736 (64 %) PD_C1 (real size 1184): unused 272 usage 912 / 1184 (77 %) PD_C0 (real size 1184): unused 520 usage 664 / 1184 (56 %) KEYSCAN (real size 640): unused 176 usage 464 / 640 (72 %) POWERBTN (real size 672): unused 176 usage 496 / 672 (73 %) KEYPROTO (real size 640): unused 208 usage 432 / 640 (67 %) HOSTCMD (real size 672): unused 216 usage 456 / 672 (67 %) MOTIONSENSE (real size 800): unused 216 usage 584 / 800 (73 %) CHIPSET (real size 1056): unused 280 usage 776 / 1056 (73 %) CHARGER (real size 704): unused 184 usage 520 / 704 (73 %) USB_CHG_P1 (real size 544): unused 152 usage 392 / 544 (72 %) USB_CHG_P0 (real size 544): unused 152 usage 392 / 544 (72 %) CHG_RAMP (real size 608): unused 144 usage 464 / 608 (76 %) HOOKS (real size 672): unused 200 usage 472 / 672 (70 %) workqueue (real size 704): unused 200 usage 504 / 704 (71 %) shell_uart (real size 960): unused 256 usage 704 / 960 (73 %) idle 00 (real size 128): unused 56 usage 72 / 128 (56 %) IRQ 00 (real size 1024): unused 384 usage 640 / 1024 (62 %) Total footprint before: SRAM: 58560 B 62 KB 92.24% and after: SRAM: 48640 B 62 KB 76.61% The settings are in a Kconfig block and override the default ones, this allows extending and changing the defaults depending on the architecture, board or any other combination. The same method is already widely used in Zephyr (such as for boards and shields). BUG=b:183748844 BRANCH=none TEST=kernel stacks on the EC shell Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I31d901218993bb0d7a67169fd2f57033f00e5ccc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799680 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>