Kconfig 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 granules. That restriction could be
  80. eliminated with some additional coding effort.
  81. config GRAN_INTR
  82. bool "Interrupt level support"
  83. default n
  84. depends on GRAN
  85. ---help---
  86. Normally mutual exclusive access to granule allocator data is assured
  87. using a semaphore. If this option is set then, instead, mutual
  88. exclusion logic will disable interrupts. While this options is more
  89. invasive to system performance, it will also support use of the granule
  90. allocator from interrupt level logic.
  91. config DEBUG_GRAN
  92. bool "Granule Allocator Debug"
  93. default n
  94. depends on GRAN && DEBUG_FEATURES
  95. ---help---
  96. Just like DEBUG_MM, but only generates output from the gran
  97. allocation logic.
  98. config MM_PGALLOC
  99. bool "Enable Page Allocator"
  100. default n
  101. depends on ARCH_USE_MMU
  102. select GRAN
  103. ---help---
  104. Enable support for a MMU physical page allocator based on the
  105. granule allocator.
  106. if MM_PGALLOC
  107. config MM_PGSIZE
  108. int "Page Size"
  109. default 4096
  110. ---help---
  111. The MMU page size. Must be one of {1024, 2048, 4096, 8192, or
  112. 16384}. This is easily extensible, but only those values are
  113. currently support.
  114. config DEBUG_PGALLOC
  115. bool "Page Allocator Debug"
  116. default n
  117. depends on DEBUG_FEATURES
  118. ---help---
  119. Just like DEBUG_MM, but only generates output from the page
  120. allocation logic.
  121. endif # MM_PGALLOC
  122. config MM_SHM
  123. bool "Shared memory support"
  124. default n
  125. depends on MM_PGALLOC && BUILD_KERNEL && EXPERIMENTAL
  126. ---help---
  127. Build in support for the shared memory interfaces shmget(), shmat(),
  128. shmctl(), and shmdt().
  129. config MM_FILL_ALLOCATIONS
  130. bool "Fill allocations with debug value"
  131. default n
  132. ---help---
  133. Fill all malloc() allocations with 0xAA. This helps
  134. detecting uninitialized variable errors.
  135. source "mm/iob/Kconfig"