|
| 1 | +# Copyright (c) 2022 Nordic Semiconductor (ASA) |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +config IPC_SERVICE_ICMSG_SHMEM_ACCESS_SYNC_V1 |
| 5 | + bool "Synchronize access to shared memory" |
| 6 | + depends on MULTITHREADING |
| 7 | + default y |
| 8 | + help |
| 9 | + Provide synchronization access to shared memory at a library level. |
| 10 | + This option is enabled by default to allow to use sending API from |
| 11 | + multiple contexts. Mutex is used to guard access to the memory. |
| 12 | + This option can be safely disabled if an application ensures data |
| 13 | + are sent from single context. |
| 14 | + |
| 15 | +config IPC_SERVICE_ICMSG_SHMEM_ACCESS_TO_MS_V1 |
| 16 | + int "Mutex lock timeout in milliseconds" |
| 17 | + depends on IPC_SERVICE_ICMSG_SHMEM_ACCESS_SYNC_V1 |
| 18 | + range 1 5 |
| 19 | + default 1 |
| 20 | + help |
| 21 | + Maximum time to wait, in milliseconds, for access to send data with |
| 22 | + backends basing on icmsg library. This time should be relatively low. |
| 23 | + |
| 24 | +config IPC_SERVICE_ICMSG_BOND_NOTIFY_REPEAT_TO_MS_V1 |
| 25 | + int "Bond notification timeout in miliseconds" |
| 26 | + range 1 100 |
| 27 | + default 1 |
| 28 | + help |
| 29 | + Time to wait for remote bonding notification before the |
| 30 | + notification is repeated. |
| 31 | + |
| 32 | +config IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE_V1 |
| 33 | + bool "Use dedicated workqueue" |
| 34 | + depends on MULTITHREADING |
| 35 | + default y |
| 36 | + help |
| 37 | + Enable dedicated workqueue thread for the ICMsg backend. |
| 38 | + Disabling this configuration will cause the ICMsg backend to |
| 39 | + process incoming data through the system workqueue context, and |
| 40 | + therefore reduces the RAM footprint of the backend. |
| 41 | + Disabling this config may result in deadlocks in certain usage |
| 42 | + scenarios, such as when synchronous IPC is executed from the system |
| 43 | + workqueue context. |
| 44 | + The callbacks coming from the backend are executed from the workqueue |
| 45 | + context. |
| 46 | + When the option is disabled, the user must obey the restrictions |
| 47 | + imposed by the system workqueue, such as never performing blocking |
| 48 | + operations from within the callback. |
| 49 | + |
| 50 | +if IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE_V1 |
| 51 | + |
| 52 | +config IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE_V1 |
| 53 | + int "Size of RX work queue stack" |
| 54 | + default 1280 |
| 55 | + help |
| 56 | + Size of stack used by work queue RX thread. This work queue is |
| 57 | + created to prevent notifying service users about received data |
| 58 | + from the system work queue. The queue is shared among instances. |
| 59 | + |
| 60 | +config IPC_SERVICE_BACKEND_ICMSG_WQ_PRIORITY_V1 |
| 61 | + int "Priority of RX work queue thread" |
| 62 | + default -1 |
| 63 | + range -256 -1 |
| 64 | + help |
| 65 | + Priority of the ICMSG RX work queue thread. |
| 66 | + The ICMSG library in its simplicity requires the workqueue to execute |
| 67 | + at a cooperative priority. |
| 68 | + |
| 69 | +endif |
| 70 | + |
| 71 | +# The Icmsg library in its simplicity requires the system workqueue to execute |
| 72 | +# at a cooperative priority. |
| 73 | +config SYSTEM_WORKQUEUE_PRIORITY |
| 74 | + range -256 -1 if !IPC_SERVICE_BACKEND_ICMSG_WQ_ENABLE_V1 |
| 75 | + |
| 76 | +config PBUF_V1 |
| 77 | + bool "Packed buffer support library (old implementation)" |
| 78 | + help |
| 79 | + The packet buffer implements lightweight unidirectional packet buffer |
| 80 | + with read/write semantics on top of a memory region shared by the |
| 81 | + reader and writer. It optionally embeds cache and memory barrier |
| 82 | + management to ensure correct data access. |
| 83 | + |
| 84 | +if PBUF_V1 |
| 85 | + |
| 86 | +config PBUF_RX_READ_BUF_SIZE_V1 |
| 87 | + int "Size of PBUF read buffer in bytes" |
| 88 | + default 128 |
| 89 | + |
| 90 | +endif # PBUF |
0 commit comments