/Zephyr-latest/include/zephyr/kernel/ |
D | thread_stack.h | 4 * SPDX-License-Identifier: Apache-2.0 14 * @brief Thread Stack APIs 16 * @defgroup thread_stack_api Thread Stack APIs 36 * declared symbol for a stack (of type k_thread_stack_t) and the underlying 37 * buffer which composes the stack data actually used by the underlying 39 * stack buffer region with guard areas that trigger a MPU or MMU fault 60 * @brief Properly align a CPU stack pointer value 66 * @param ptr Proposed stack pointer address 67 * @return Properly aligned stack pointer address 76 * @brief Helper macro for getting a stack frame struct [all …]
|
/Zephyr-latest/kernel/ |
D | dynamic.c | 4 * SPDX-License-Identifier: Apache-2.0 27 k_thread_stack_t *stack; member 34 static k_thread_stack_t *z_thread_stack_alloc_pool(size_t size) in z_thread_stack_alloc_pool() argument 38 k_thread_stack_t *stack; in z_thread_stack_alloc_pool() local 40 if (size > CONFIG_DYNAMIC_THREAD_STACK_SIZE) { in z_thread_stack_alloc_pool() 41 LOG_DBG("stack size %zu is > pool stack size %d", size, in z_thread_stack_alloc_pool() 48 LOG_DBG("unable to allocate stack from pool"); in z_thread_stack_alloc_pool() 54 stack = (k_thread_stack_t *)&dynamic_stack[offset]; in z_thread_stack_alloc_pool() 56 return stack; in z_thread_stack_alloc_pool() 59 static k_thread_stack_t *z_thread_stack_alloc_dyn(size_t size, int flags) in z_thread_stack_alloc_dyn() argument [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | Kconfig.stack | 1 # Stack usage related options 4 # SPDX-License-Identifier: Apache-2.0 6 menu "Stack usage" 9 int "TX thread stack size" 12 Set the TX thread stack size in bytes. The TX thread is waiting 15 This value is a baseline and the actual TX stack size might 19 int "RX thread stack size" 22 Set the RX thread stack size in bytes. The RX thread is waiting 24 This value is a baseline and the actual RX stack size might
|
D | Kconfig.mgmt | 2 # SPDX-License-Identifier: Apache-2.0 8 of the network stack as well as receiving notification on network 15 This adds support for the stack to notify events towards any 59 int "Stack size for the inner thread handling event callbacks" 67 Set the internal stack size for NM to run registered callbacks 71 int "Size of event queue" 79 notification. Thus the size of this queue has to be tweaked depending 109 int "Size of the stack allocated for the event_mon_stack thread" 113 Sets the size of the stack for event_mon_stack_thread. 124 module-dep = NET_LOG [all …]
|
/Zephyr-latest/arch/arm/core/cortex_a_r/ |
D | Kconfig | 1 # ARM Cortex-A and Cortex-R platform configuration options 7 # SPDX-License-Identifier: Apache-2.0 14 # exposed if one selects a different ARM Cortex Family (Cortex-M). 21 This option signifies the use of a Cortex-A9 CPU. 31 int "Undefined Instruction and Abort stack size (in bytes)" 34 This option specifies the size of the stack used by the undefined 38 int "FIQ stack size (in bytes)" 41 This option specifies the size of the stack used by the FIQ handler. 44 int "SVC stack size (in bytes)" 47 This option specifies the size of the stack used by the SVC handler. [all …]
|
D | thread.c | 2 * Copyright (c) 2013-2014 Wind River Systems, Inc. 5 * SPDX-License-Identifier: Apache-2.0 10 * @brief New thread creation for ARM Cortex-A and Cortex-R 12 * Core thread related primitives for the ARM Cortex-A and 13 * Cortex-R processor architecture. 24 #define FP_GUARD_EXTRA_SIZE (MPU_GUARD_ALIGN_AND_SIZE_FLOAT - \ 31 /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ 41 * end of the stack, and thus reusable by the stack when not needed anymore. 43 * The initial context is an exception stack frame (ESF) since exiting the 52 void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, in arch_new_thread() argument [all …]
|
/Zephyr-latest/tests/kernel/threads/thread_stack/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 15 * Stack testing 28 K_KERNEL_STACK_MEMBER(stack, STEST_STACKSIZE); 34 void z_impl_stack_info_get(char **start_addr, size_t *size) in z_impl_stack_info_get() argument 36 *start_addr = (char *)k_current_get()->stack_info.start; in z_impl_stack_info_get() 37 *size = k_current_get()->stack_info.size; in z_impl_stack_info_get() 42 size_t *size) in z_vrfy_stack_info_get() argument 45 K_OOPS(K_SYSCALL_MEMORY_WRITE(size, sizeof(size_t))); in z_vrfy_stack_info_get() 47 z_impl_stack_info_get(start_addr, size); in z_vrfy_stack_info_get() 51 int z_impl_check_perms(void *addr, size_t size, int write) in z_impl_check_perms() argument [all …]
|
/Zephyr-latest/include/zephyr/arch/arm/ |
D | arch.h | 2 * Copyright (c) 2013-2014 Wind River Systems, Inc. 4 * SPDX-License-Identifier: Apache-2.0 12 * included by the kernel interface architecture-abstraction header 60 /* Cortex-M MEMFAULT exceptions */ 68 /* Cortex-M BUSFAULT exceptions */ 77 /* Cortex-M USAGEFAULT exceptions */ 87 /* Cortex-M SECURE exceptions */ 97 /* Cortex-A/R exceptions*/ 116 * Denotes the required alignment of the stack pointer on public API 127 * @brief Declare the minimum alignment for a thread stack [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/grp/settings_mgmt/ |
D | Kconfig | 2 # SPDX-License-Identifier: Apache-2.0 20 Selects if the stack or heap will be used for variables that are 24 bool "Stack (fixed size)" 26 Use a fixed size stack buffer, any user-supplied values longer than 29 Note that stack usage for parameter storage alone will be 31 therefore the MCUmgr stack should be appropriately sized. 34 bool "Heap (dynamic size)" 47 Maximum length of a key to lookup, this will be the size of the 48 variable if placed on the stack or the maximum allocated size of the 55 Maximum length of a value to read, this will be the size of the [all …]
|
/Zephyr-latest/include/zephyr/arch/arc/ |
D | arch.h | 4 * SPDX-License-Identifier: Apache-2.0 12 * included by the kernel interface architecture-abstraction header 24 #include "sys-io-common.h" 65 * - otherwise all interrupts will use same register bank. Such configuration isn't supported in 86 #error "Non-multithreading mode isn't supported on SMP targets" 110 * For regions that are NOT the minimum size, this define has no semantics 111 * on ARC MPUv2 as its regions must be power of two size and aligned to their 112 * own size. On ARC MPUv4, region sizes are arbitrary and this just indicates 113 * the required size granularity. 132 /* Kernel-only stacks have the following layout if a stack guard is enabled: [all …]
|
/Zephyr-latest/modules/canopennode/ |
D | Kconfig | 1 # CANopenNode CANopen protocol stack configuration options 4 # SPDX-License-Identifier: Apache-2.0 19 int "CANopen SDO buffer size" 23 Size of the internal CANopen SDO buffer in bytes. Size must 24 be at least equal to the size of the largest variable in the 26 not limited to the SDO buffer size. If block transfer is 30 int "CANopen trace buffer size" 33 Size of the CANopen trace buffer in bytes. 36 int "Stack size for the CANopen transmit workqueue" 39 Size of the stack used for the internal CANopen transmit [all …]
|
/Zephyr-latest/subsys/shell/modules/kernel_service/thread/ |
D | stacks.c | 5 * SPDX-License-Identifier: Apache-2.0 27 size_t size = thread->stack_info.size; in shell_stack_dump() local 34 "Unable to determine unused stack size (%d)\n", in shell_stack_dump() 41 /* Calculate the real size reserved for the stack */ in shell_stack_dump() 42 pcnt = ((size - unused) * 100U) / size; in shell_stack_dump() 45 "%p %-" STRINGIFY(THREAD_MAX_NAM_LEN) "s " in shell_stack_dump() 46 "(real size %4zu):\tunused %4zu\tusage %4zu / %4zu (%2u %%)", in shell_stack_dump() 47 thread, tname ? tname : "NA", size, unused, size - unused, size, pcnt); in shell_stack_dump() 59 memset(pad, ' ', MAX((THREAD_MAX_NAM_LEN - strlen("IRQ 00")), 1)); in cmd_kernel_thread_stacks() 67 /* Placeholder logic for interrupt stack until we have better in cmd_kernel_thread_stacks() [all …]
|
/Zephyr-latest/subsys/usb/host/ |
D | Kconfig | 3 # SPDX-License-Identifier: Apache-2.0 6 bool "USB host stack [EXPERIMENTAL]" 10 New experimental USB host stack. 15 module-str = usbh 31 int "USB host stack thread stack size" 34 USB host stack thread stack size in bytes.
|
/Zephyr-latest/include/zephyr/debug/ |
D | thread_analyzer.h | 2 * Copyright (c) 2019 - 2020 Nordic Semiconductor ASA 4 * SPDX-License-Identifier: Apache-2.0 31 /** The total size of the stack*/ 33 /** Stack size in used */ 44 /** Total size of privileged stack */ 47 /** Privileged stack size in used */ 52 /** @brief Thread analyzer stack size callback function 72 /** @brief Run the thread analyzer and print stack size statistics.
|
/Zephyr-latest/include/zephyr/arch/arm64/ |
D | thread_stack.h | 4 * SPDX-License-Identifier: Apache-2.0 35 * +-------------------+ <- thread.stack_info.start + thread.stack_info.size 37 * +-------------------+ <- initial sp (computable with thread.stack_info.delta) 39 * | Used stack | 41 * +...................+ <- thread's current stack pointer 43 * | Unused stack | 45 * +-------------------+ <- thread.stack_info.start 46 * | Privileged stack | } K_(THREAD|KERNEL)_STACK_RESERVED 47 * +-------------------+ <- thread stack limit (update on every context switch) 48 * | Stack guard | } Z_ARM64_STACK_GUARD_SIZE (protected by MMU/MPU) [all …]
|
/Zephyr-latest/arch/arm/core/mpu/ |
D | arm_core_mpu.c | 4 * SPDX-License-Identifier: Apache-2.0 13 #include <zephyr/linker/linker-defs.h> 24 * driver for programming during run-time. Note that the actual number of the 26 * static MPU regions currently being programmed, and the total number of HW- 33 CONFIG_MAX_DOMAIN_PARTITIONS + /* User thread stack */ 1 + \ 40 /* Convenience macros to denote the start address and the size of the system 41 * memory area, where dynamic memory regions may be programmed at run-time. 48 #define _MPU_DYNAMIC_REGIONS_AREA_SIZE ((uint32_t)&__kernel_ram_end - \ 72 .size = (uint32_t)&__gcov_bss_size, 78 /* Special non-cacheable RAM area */ [all …]
|
D | Kconfig | 4 # SPDX-License-Identifier: Apache-2.0 23 The ARMv6-M and ARMv7-M MPU architecture requires a power-of-two 24 alignment of MPU region base address and size. 26 The NXP MPU as well as the ARMv8-M MPU do not require MPU regions 27 to have power-of-two alignment for base address and region size. 29 The ARMv8-M MPU requires the active MPU regions be non-overlapping. 30 As a result of this, the ARMv8-M MPU needs to fully partition the 31 memory map when programming dynamic memory regions (e.g. PRIV stack 32 guard, user thread stack, and application memory domains), if the 34 of the ARMv8-M background memory map. The application developer may [all …]
|
/Zephyr-latest/subsys/usb/device_next/ |
D | Kconfig | 3 # SPDX-License-Identifier: Apache-2.0 6 bool "New USB device stack [EXPERIMENTAL]" 11 New experimental USB device stack. 16 module-str = usbd 32 int "USB device stack thread stack size" 35 USB device stack thread stack size in bytes. 55 Message work may need to be delayed because the device stack is not
|
/Zephyr-latest/drivers/usb/device/ |
D | Kconfig | 4 # SPDX-License-Identifier: Apache-2.0 45 DT_STM32_USBHS_SPEED := $(dt_node_str_prop_equals,$(DT_STM32_USBHS),maximum-speed,high-speed) 98 DT_SAM_USBHS_SPEED := $(dt_node_str_prop_equals,$(DT_SAM_USBHS),maximum-speed,high-speed) 119 int "USBD event queue size" 124 Size of the driver's internal event queue. 125 Required size will depend on number of endpoints (class instances) in use. 128 int "USBD work queue stack size" 132 Size of the stack for the work queue thread that is used in the driver 134 callbacks and providing proper notifications to the USB device stack. 188 int "Stack size for the USB driver" [all …]
|
/Zephyr-latest/include/zephyr/arch/x86/ |
D | thread_stack.h | 4 * SPDX-License-Identifier: Apache-2.0 25 /* If user mode enabled, expand any stack size to fill a page since that is 38 /* With both hardware stack protection and userspace enabled, stacks are 41 * --- Without stack being memory mapped: 43 * +-----------------------------------------+ 44 * | Thread stack (varies) | 45 * +-----------------------------------------+ 46 * | Privilege elevation stack | 48 * +-----------------------------------------+ 50 * | - 'guard_page' in struct | [all …]
|
/Zephyr-latest/include/zephyr/arch/riscv/ |
D | arch.h | 2 * Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com> 5 * SPDX-License-Identifier: Apache-2.0 33 /* stacks, for RISCV architecture stack should be 16byte-aligned */ 41 * The StackGuard is an area at the bottom of the kernel-mode stack made to 43 * on that area to save the exception stack frame and to process said fault. 45 * configurable stack wiggle room to execute the fault handling code off of, 46 * as well as some guard size to cover possible sudden stack pointer 61 /* Kernel-only stacks have the following layout if a stack guard is enabled: 63 * +------------+ <- thread.stack_obj 65 * +------------+ <- thread.stack_info.start [all …]
|
/Zephyr-latest/subsys/profiling/perf/backends/ |
D | perf_x86.c | 5 * SPDX-License-Identifier: Apache-2.0 12 return current->stack_info.start <= addr && in valid_stack() 13 addr < current->stack_info.start + current->stack_info.size; in valid_stack() 23 /* interruption stack frame */ 33 * This function use frame pointers to unwind stack and get trace of return addresses. 37 size_t arch_perf_current_stack_trace(uintptr_t *buf, size_t size) in arch_perf_current_stack_trace() argument 39 if (size < 1U) { in arch_perf_current_stack_trace() 46 *((struct isf **)(((void **)_current_cpu->irq_stack)-1)); in arch_perf_current_stack_trace() 51 * _current_cpu->irq_stack and push %esp on irq stack in arch_perf_current_stack_trace() 54 * from thread stack in arch_perf_current_stack_trace() [all …]
|
/Zephyr-latest/drivers/modem/ |
D | Kconfig.wncm14a2a | 4 # SPDX-License-Identifier: Apache-2.0 7 bool "Wistron LTE-M modem driver" 12 Choose this setting to enable Wistron WNC-M14A2A LTE-M modem driver. 18 int "Size of the stack for the WNC-M14A2A modem driver RX thread" 21 This stack is used by the WNCM14A2A RX thread. 24 int "Size of the stack for the WNC-M14A2A modem driver work queue" 27 This stack is used by the work queue to pass off net_pkt data 28 to the rest of the network stack, letting the rx thread continue 40 int "WNC-M14A2A driver init priority" 43 WNC-M14A2A device driver initialization priority. [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/grp/enum_mgmt/ |
D | Kconfig | 2 # SPDX-License-Identifier: Apache-2.0 9 # MCUMGR_GRP_ENUM_ -- general group options; 51 Selects if the stack or heap will be used for variables that are needed when processing 55 bool "Stack (fixed size)" 57 Use a fixed size stack buffer, any user-supplied values longer than this will be 60 Note that stack usage for parameter storage alone will be 61 MCUMGR_GRP_ENUM_DETAILS_BUFFER_TYPE_STACK * 2, therefore the MCUmgr stack should 72 occupies 2 bytes on the stack. 77 bool "Heap (dynamic size)" 100 predicted size. This value should be increased from the default value by the number of [all …]
|
/Zephyr-latest/drivers/ieee802154/ |
D | Kconfig.rf2xx | 4 # SPDX-License-Identifier: Apache-2.0 16 int "Driver's internal RX thread stack size" 19 This option sets the driver's stack size for its internal RX thread. 21 a too little one, this option makes it easy to play with the size. 30 might need it too). And of course it has to start before the net stack.
|