Kconfig 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. # Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # RDA assumes no responsibility or liability for the use of the software,
  6. # conveys no license or title under any patent, copyright, or mask work
  7. # right to the product. RDA reserves the right to make changes in the
  8. # software without notification. RDA also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. menu "kernel"
  12. config KERNEL_SYSNV_ENABLED
  13. bool "Enable system NV"
  14. default y
  15. help
  16. System NV is a mechanism to change compiler time options
  17. to changeable options.
  18. When it is enabled, code size may be increased.
  19. config KERNEL_TICK_HZ
  20. int "Tick per second"
  21. default 100 if SOC_8811
  22. default 50
  23. help
  24. Tick frequency. It should be chosen that 1000 (milliseconds per
  25. second) can be divided by this exactly.
  26. # adjust by quectel === default y ===> n
  27. config KERNEL_MUTEX_IN_ISR_PANIC
  28. bool "panic when mutex API is called in ISR"
  29. default n
  30. help
  31. Mutex API shouldn't be called in ISR. When it is called, it will
  32. return directly. And this behavior will break resource protection,
  33. and will cause subtle issues.
  34. It is suggested to enable it, and clean up illegal mutex calls.
  35. config KERNEL_ASSERT_ENABLED
  36. bool "Assert enabled"
  37. default y
  38. help
  39. When enabled, OSI_ASSERT will call osiPanic on fail. Otherwise,
  40. OSI_ASSERT will be expanded into a trace.
  41. At not sure, select "y"
  42. config KERNEL_HIGH_PRECISION_TIMER
  43. bool "Enable high precision timer"
  44. default y
  45. help
  46. When enabled, OSI timer will be implemented on hardware high precision
  47. timer. It doesn't depend on RTOS tick.
  48. When disabled, OSI timer will be implemented based on RTOS timer.
  49. config KERNEL_OSTICK_RELAXED_TIME
  50. int "OS tick relaxed time"
  51. default 0
  52. help
  53. This is the relaxed time for OS tick based timeout, such as
  54. osiThreadSleep, osiMutexTryLock and etc. When this is 0, that means
  55. OS tick based timeout will wakeup system if system will suspend. When
  56. this is set to -1, that means OS tick based timeout will never wakeup
  57. system if system will suspend. When it is a positive value, OS tick
  58. based timeout will wakeup system, with possibly the configured delay.
  59. The default is 0, and user application shall take care of power
  60. consumption optimization. Other values will change the meaning of OS
  61. tick based timeout, and should only be used when there are no
  62. opportunities to optimize application, and it is confirmed that the
  63. API meaning change is acceptable.
  64. config KERNEL_TIMER_WQ_STACKSIZE
  65. int "stack size of timer service work queue"
  66. default 4096
  67. help
  68. Stack size of timer work queue. For thread callback timer, the timer
  69. callback event will be sent inside timer service work queue. Also,
  70. there is API to invoke callback inside timer service work queue.
  71. Usually, the callback should be as simple as possible, and it
  72. shouldn't consume too many stack spaces.
  73. config KERNEL_PERIODIC_TIMER_MIN_PERIOD
  74. int "minimum periodic timer period"
  75. default 10
  76. help
  77. When periodic timer period is too small, it will have impact to the
  78. system. In worst case, a periodic timer with period 0 will occupy all
  79. CPU resources. To avoid this case, when periodic timer period is small
  80. than this configuration, the real period will be changed to it
  81. silently.
  82. It can't be larger than period of KERNEL_TICK_HZ, that is one RTOS tick.
  83. config KERNEL_HIGH_PRIO_WQ_ENABLED
  84. bool "Enable high priority system work queue"
  85. default y
  86. help
  87. When enabled, work queue with priority OSI_PRIORITY_HIGH will be
  88. created.
  89. At not sure, select "y"
  90. config KERNEL_LOW_PRIO_WQ_ENABLED
  91. bool "Enable low priority system work queue"
  92. default y
  93. help
  94. When enabled, work queue with priority OSI_PRIORITY_LOW will be
  95. created.
  96. At not sure, select "y"
  97. config KERNEL_FILE_WRITE_WQ_ENABLED
  98. bool "Enable file write system work queue"
  99. default y
  100. help
  101. When enabled, work queue with priority OSI_PRIORITY_BELOW_NORMAL
  102. will be created, for asynchronuous file write.
  103. At not sure, select "y"
  104. config KERNEL_MIN_UTC_SECOND
  105. int "system minimum utc time in second"
  106. default 946684800
  107. config KERNEL_MAX_UTC_SECOND
  108. int "system maximum utc time in second"
  109. default 4102444800
  110. config KERNEL_IDLE_THREAD_STACK_SIZE
  111. int "idle thread stack size"
  112. default 4096 if SOC_8910
  113. default 2048
  114. help
  115. Stack size of idle thread in bytes.
  116. if KERNEL_HIGH_PRIO_WQ_ENABLED
  117. config KERNEL_HIGH_PRIO_WQ_STACKSIZE
  118. int "High priority system work queue stack size in bytes"
  119. default 4096
  120. help
  121. The stack size in bytes of the high priority work queue thread.
  122. endif
  123. if KERNEL_LOW_PRIO_WQ_ENABLED
  124. config KERNEL_LOW_PRIO_WQ_STACKSIZE
  125. int "Low priority system work queue stack size in bytes"
  126. default 8192
  127. help
  128. The stack size in bytes of the low priority work queue thread.
  129. endif
  130. if KERNEL_FILE_WRITE_WQ_ENABLED
  131. config KERNEL_FILE_WRITE_WQ_STACKSIZE
  132. int "File write system work queue stack size in bytes"
  133. default 2048
  134. help
  135. The stack size in bytes of the asynchronous file write work queue
  136. thread.
  137. endif
  138. if SOC_8910
  139. choice
  140. prompt "Profile clock source"
  141. default KERNEL_PROFILE_CLOCK2M
  142. help
  143. When 2M clock is chosen, it will provide higher precision. However,
  144. the clock will be discontinued at sleep. When 32K clock is chosen,
  145. the precision is lower, and it may be continuous at sleep.
  146. By default, 32K clock will be chosen to make the profile data easier
  147. to be understood. When detailed timing or performance is needed, 2M
  148. clock can be chosen.
  149. config KERNEL_PROFILE_CLOCK32K
  150. bool "32768 Hz clock"
  151. config KERNEL_PROFILE_CLOCK2M
  152. bool "2000000 Hz clock"
  153. endchoice
  154. endif
  155. config KERNEL_PROFILE_BUF_SIZE
  156. hex "Profile buffer size"
  157. default 0x1000 if SOC_8811
  158. default 0xc000
  159. help
  160. Profile buffer size. Each profile record will use 4 bytes. So, the
  161. profile record count is buffer size divided by 4.
  162. When it is 0, profile will be disabled, though the profile related
  163. APIs still exist.
  164. choice
  165. prompt "Trace packet format"
  166. default KERNEL_HOST_TRACE if SOC_8910
  167. default KERNEL_DIAG_TRACE
  168. config KERNEL_HOST_TRACE
  169. bool "Host packet"
  170. config KERNEL_DIAG_TRACE
  171. bool "Diag packet"
  172. endchoice
  173. config KERNEL_TRACE_BUF_SIZE
  174. hex "trace buffer size"
  175. default 0x1000 if SOC_8811
  176. default 0x2000
  177. help
  178. Trace will use multiple buffers. And this is the size of each buffer.
  179. config KERNEL_TRACE_BUF_COUNT
  180. int "trace buffer count"
  181. default 8 if SOC_8811
  182. default 8
  183. help
  184. Trace will use multiple buffers. And this is the buffer count.
  185. config KERNEL_TRACE_EXTERNAL_BUF_COUNT
  186. int "external trace buffer count"
  187. default 8
  188. help
  189. For each external buffer, there is only a small management overhead.
  190. config KERNEL_DISABLE_TRACEID
  191. bool "Disable trace ID"
  192. default n
  193. help
  194. By default, in OSI_LOG macors, when the trace ID is not zero, trace
  195. ID will be used, otherwise the trace string will be used.
  196. When selected, the trace string will be used forcedly.
  197. config KERNEL_MEM_RECORD_COUNT
  198. int "Memory record count"
  199. default 128 if SOC_8811
  200. default 1024
  201. help
  202. A piece of memory will be reserved to record memory allocation and
  203. free. The record memory is recycled, that is only the latest actions
  204. are recorded.
  205. It is helpful for debug memory issues. So, this feature can't be
  206. disabled, just the count can be configured.
  207. config KERNEL_MEM_STATISTICS_SUPPORT
  208. bool "Memory statistics for alloc and free"
  209. default y if SOC_8811
  210. default n
  211. help
  212. After enable the marco, the memory management will provide the API
  213. to get the count of alloc and free.
  214. config KERNEL_BLUE_SCREEN_HANDLER_COUNT
  215. int "blue screen handler maximum count"
  216. default 12
  217. help
  218. Callbacks can be registered to be called when entering and during
  219. blue screen mode. This is the maximum count.
  220. config KERNEL_32K_SLEEP_ENABLE
  221. bool "whether 32k sleep is enabled"
  222. default y if SOC_8910
  223. default n
  224. help
  225. 32K sleep is a special sleep mode. It shall only be enabled in 8910
  226. for USB suspend and resume.
  227. config KERNEL_PSM_ENABLE
  228. bool "whether psm is enabled"
  229. default y if SOC_8811 || SOC_8910
  230. default n
  231. help
  232. Whether PSM is enabled. Even it is enabled, it is controlled by
  233. sysnv.
  234. if KERNEL_PSM_ENABLE
  235. config KERNEL_PSM_DEFAULT_ENABLE
  236. bool "whether psm is enabled by default"
  237. default y if SOC_8811
  238. default n
  239. help
  240. Whether PSM is enabled by default.
  241. config KERNEL_PSM_DATA_BUF_SIZE
  242. hex "psm data buffer size"
  243. default 0x5000 if SOC_8910
  244. default 0x5000 if SOC_8811
  245. help
  246. This is the reserved buffer size for PSM data.
  247. config PSM_PM2BOOT_ENABLE
  248. bool "enable PSM PM2 boot sleep mode"
  249. default y if SOC_8811
  250. default n
  251. help
  252. When enabled, PSM will enter PM2 and most likely with SRAM switched
  253. off. It will increase power consumption of PSM mode, but LPUART can
  254. work normally.
  255. endif
  256. config ANTIREG_LICENSE_ENABLE
  257. bool "UNISOC LICENSE"
  258. default y if SOC_8850
  259. default n
  260. endmenu