Kconfig 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config MM_KERNEL_HEAP
  6. bool "Support a protected, kernel heap"
  7. default y
  8. depends on BUILD_PROTECTED || BUILD_KERNEL
  9. ---help---
  10. Partition heap memory into two parts: (1) a protected, kernel-mode
  11. heap accessible only by the NuttX kernel, and (2) an unprotected
  12. user-mode heap for use by applications. If you are only interested
  13. in protected the kernel from read access, then this option is not
  14. necessary. If you wish to secure the kernel data as well, then
  15. this option should be selected.
  16. The kernel heap size that is used is provided a a platform-specific
  17. up_allocate_kheap() interface. This configuration setting is made
  18. available to that platform specific code. However, the
  19. up_allocate_kheap() interface may chose to ignore this setting if it
  20. has a more appropriate heap allocation strategy.
  21. config MM_KERNEL_HEAPSIZE
  22. int "Kernal heap size"
  23. default 8192
  24. depends on MM_KERNEL_HEAP
  25. ---help---
  26. This is the size of the a protected, kernel-mode heap (in bytes).
  27. The remaining of available memory is given to the unprotected
  28. user-mode heap. This value may need to be aligned to units of the
  29. size of the smallest memory protection region.
  30. config MM_SMALL
  31. bool "Small memory model"
  32. default n
  33. ---help---
  34. Each memory allocation has a small allocation overhead. The size
  35. of that overhead is normally determined by the "width" of the
  36. address support by the MCU. MCUs that support 16-bit addressability
  37. have smaller overhead than devices that support 32-bit addressability.
  38. However, there are many MCUs that support 32-bit addressability *but*
  39. have internal SRAM of size less than or equal to 64Kb. In this case,
  40. MM_SMALL can be defined so that those MCUs will also benefit
  41. from the smaller, 16-bit-based allocation overhead.
  42. WARNING: This selection will also change the alignment of allocated
  43. memory. For example, on ARM memory will have 8-byte alignment by
  44. default. If MM_SMALL is selected, then allocated memory will have
  45. only 4-byte alignment. This may be important on some platforms where
  46. 64-bit data is in allocated structures and 8-byte alignment is required.
  47. config MM_REGIONS
  48. int "Number of memory regions"
  49. default 1
  50. ---help---
  51. If the architecture includes multiple, non-contiguous regions of
  52. memory to allocate from, this specifies the number of memory regions
  53. that the memory manager must handle and enables the API
  54. mm_addregion(heap, start, end);
  55. config ARCH_HAVE_HEAP2
  56. bool
  57. default n
  58. if ARCH_HAVE_HEAP2
  59. config HEAP2_BASE
  60. hex "Start address of second user heap region"
  61. default 0x00000000
  62. ---help---
  63. The base address of the second heap region.
  64. config HEAP2_SIZE
  65. int "Size of the second user heap region"
  66. default 0
  67. ---help---
  68. The size of the second heap region.
  69. endif # ARCH_HAVE_HEAP2
  70. config GRAN
  71. bool "Enable Granule Allocator"
  72. default n
  73. ---help---
  74. Enable granule allocator support. Allocations will be aligned to the
  75. granule size; allocations will be in units of the granule size.
  76. Larger granules will give better performance and less overhead but
  77. more losses of memory due to alignment and quantization waste.
  78. NOTE: The current implementation also restricts the maximum
  79. allocation size to 32 granaules. That restriction could be
  80. eliminated with some additional coding effort.
  81. config GRAN_SINGLE
  82. bool "Single Granule Allocator"
  83. default n
  84. depends on GRAN
  85. ---help---
  86. Select if there is only one instance of the granule allocator (i.e.,
  87. gran_initialize will be called only once. In this case, (1) there
  88. are a few optimizations that can can be done and (2) the GRAN_HANDLE
  89. is not needed.
  90. config GRAN_INTR
  91. bool "Interrupt level support"
  92. default n
  93. depends on GRAN
  94. ---help---
  95. Normally mutual exclusive access to granule allocator data is assured
  96. using a semaphore. If this option is set then, instead, mutual
  97. exclusion logic will disable interrupts. While this options is more
  98. invasive to system performance, it will also support use of the granule
  99. allocator from interrupt level logic.
  100. config DEBUG_GRAN
  101. bool "Granule Allocator Debug"
  102. default n
  103. depends on GRAN && DEBUG_FEATURES
  104. ---help---
  105. Just like DEBUG_MM, but only generates output from the gran
  106. allocation logic.
  107. config MM_PGALLOC
  108. bool "Enable Page Allocator"
  109. default n
  110. depends on ARCH_USE_MMU
  111. select GRAN
  112. ---help---
  113. Enable support for a MMU physical page allocator based on the
  114. granule allocator.
  115. if MM_PGALLOC
  116. config MM_PGSIZE
  117. int "Page Size"
  118. default 4096
  119. ---help---
  120. The MMU page size. Must be one of {1024, 2048, 4096, 8192, or
  121. 16384}. This is easily extensible, but only those values are
  122. currently support.
  123. config DEBUG_PGALLOC
  124. bool "Page Allocator Debug"
  125. default n
  126. depends on DEBUG_FEATURES
  127. ---help---
  128. Just like DEBUG_MM, but only generates output from the page
  129. allocation logic.
  130. endif # MM_PGALLOC
  131. config MM_SHM
  132. bool "Shared memory support"
  133. default n
  134. depends on MM_PGALLOC && BUILD_KERNEL && EXPERIMENTAL
  135. ---help---
  136. Build in support for the shared memory interfaces shmget(), shmat(),
  137. shmctl(), and shmdt().
  138. source "mm/iob/Kconfig"