Kconfig 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "Memory management options"
  3. config QUICKLIST
  4. def_bool y
  5. config MMU
  6. bool "Support for memory management hardware"
  7. depends on !CPU_SH2
  8. default y
  9. help
  10. Some SH processors (such as SH-2/SH-2A) lack an MMU. In order to
  11. boot on these systems, this option must not be set.
  12. On other systems (such as the SH-3 and 4) where an MMU exists,
  13. turning this off will boot the kernel on these machines with the
  14. MMU implicitly switched off.
  15. config PAGE_OFFSET
  16. hex
  17. default "0x80000000" if MMU && SUPERH32
  18. default "0x20000000" if MMU && SUPERH64
  19. default "0x00000000"
  20. config FORCE_MAX_ZONEORDER
  21. int "Maximum zone order"
  22. range 9 64 if PAGE_SIZE_16KB
  23. default "9" if PAGE_SIZE_16KB
  24. range 7 64 if PAGE_SIZE_64KB
  25. default "7" if PAGE_SIZE_64KB
  26. range 11 64
  27. default "14" if !MMU
  28. default "11"
  29. help
  30. The kernel memory allocator divides physically contiguous memory
  31. blocks into "zones", where each zone is a power of two number of
  32. pages. This option selects the largest power of two that the kernel
  33. keeps in the memory allocator. If you need to allocate very large
  34. blocks of physically contiguous memory, then you may need to
  35. increase this value.
  36. This config option is actually maximum order plus one. For example,
  37. a value of 11 means that the largest free memory block is 2^10 pages.
  38. The page size is not necessarily 4KB. Keep this in mind when
  39. choosing a value for this option.
  40. config MEMORY_START
  41. hex "Physical memory start address"
  42. default "0x08000000"
  43. ---help---
  44. Computers built with Hitachi SuperH processors always
  45. map the ROM starting at address zero. But the processor
  46. does not specify the range that RAM takes.
  47. The physical memory (RAM) start address will be automatically
  48. set to 08000000. Other platforms, such as the Solution Engine
  49. boards typically map RAM at 0C000000.
  50. Tweak this only when porting to a new machine which does not
  51. already have a defconfig. Changing it from the known correct
  52. value on any of the known systems will only lead to disaster.
  53. config MEMORY_SIZE
  54. hex "Physical memory size"
  55. default "0x04000000"
  56. help
  57. This sets the default memory size assumed by your SH kernel. It can
  58. be overridden as normal by the 'mem=' argument on the kernel command
  59. line. If unsure, consult your board specifications or just leave it
  60. as 0x04000000 which was the default value before this became
  61. configurable.
  62. # Physical addressing modes
  63. config 29BIT
  64. def_bool !32BIT
  65. depends on SUPERH32
  66. select UNCACHED_MAPPING
  67. config 32BIT
  68. bool
  69. default y if CPU_SH5 || !MMU
  70. config PMB
  71. bool "Support 32-bit physical addressing through PMB"
  72. depends on MMU && CPU_SH4A && !CPU_SH4AL_DSP
  73. select 32BIT
  74. select UNCACHED_MAPPING
  75. help
  76. If you say Y here, physical addressing will be extended to
  77. 32-bits through the SH-4A PMB. If this is not set, legacy
  78. 29-bit physical addressing will be used.
  79. config X2TLB
  80. def_bool y
  81. depends on (CPU_SHX2 || CPU_SHX3) && MMU
  82. config VSYSCALL
  83. bool "Support vsyscall page"
  84. depends on MMU && (CPU_SH3 || CPU_SH4)
  85. default y
  86. help
  87. This will enable support for the kernel mapping a vDSO page
  88. in process space, and subsequently handing down the entry point
  89. to the libc through the ELF auxiliary vector.
  90. From the kernel side this is used for the signal trampoline.
  91. For systems with an MMU that can afford to give up a page,
  92. (the default value) say Y.
  93. config NUMA
  94. bool "Non Uniform Memory Access (NUMA) Support"
  95. depends on MMU && SYS_SUPPORTS_NUMA
  96. select ARCH_WANT_NUMA_VARIABLE_LOCALITY
  97. default n
  98. help
  99. Some SH systems have many various memories scattered around
  100. the address space, each with varying latencies. This enables
  101. support for these blocks by binding them to nodes and allowing
  102. memory policies to be used for prioritizing and controlling
  103. allocation behaviour.
  104. config NODES_SHIFT
  105. int
  106. default "3" if CPU_SUBTYPE_SHX3
  107. default "1"
  108. depends on NEED_MULTIPLE_NODES
  109. config ARCH_FLATMEM_ENABLE
  110. def_bool y
  111. depends on !NUMA
  112. config ARCH_SPARSEMEM_ENABLE
  113. def_bool y
  114. select SPARSEMEM_STATIC
  115. config ARCH_SPARSEMEM_DEFAULT
  116. def_bool y
  117. config ARCH_SELECT_MEMORY_MODEL
  118. def_bool y
  119. config ARCH_ENABLE_MEMORY_HOTPLUG
  120. def_bool y
  121. depends on SPARSEMEM && MMU
  122. config ARCH_ENABLE_MEMORY_HOTREMOVE
  123. def_bool y
  124. depends on SPARSEMEM && MMU
  125. config ARCH_MEMORY_PROBE
  126. def_bool y
  127. depends on MEMORY_HOTPLUG
  128. config IOREMAP_FIXED
  129. def_bool y
  130. depends on X2TLB || SUPERH64
  131. config UNCACHED_MAPPING
  132. bool
  133. config HAVE_SRAM_POOL
  134. bool
  135. select GENERIC_ALLOCATOR
  136. choice
  137. prompt "Kernel page size"
  138. default PAGE_SIZE_4KB
  139. config PAGE_SIZE_4KB
  140. bool "4kB"
  141. help
  142. This is the default page size used by all SuperH CPUs.
  143. config PAGE_SIZE_8KB
  144. bool "8kB"
  145. depends on !MMU || X2TLB
  146. help
  147. This enables 8kB pages as supported by SH-X2 and later MMUs.
  148. config PAGE_SIZE_16KB
  149. bool "16kB"
  150. depends on !MMU
  151. help
  152. This enables 16kB pages on MMU-less SH systems.
  153. config PAGE_SIZE_64KB
  154. bool "64kB"
  155. depends on !MMU || CPU_SH4 || CPU_SH5
  156. help
  157. This enables support for 64kB pages, possible on all SH-4
  158. CPUs and later.
  159. endchoice
  160. choice
  161. prompt "HugeTLB page size"
  162. depends on HUGETLB_PAGE
  163. default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB
  164. default HUGETLB_PAGE_SIZE_64K
  165. config HUGETLB_PAGE_SIZE_64K
  166. bool "64kB"
  167. depends on !PAGE_SIZE_64KB
  168. config HUGETLB_PAGE_SIZE_256K
  169. bool "256kB"
  170. depends on X2TLB
  171. config HUGETLB_PAGE_SIZE_1MB
  172. bool "1MB"
  173. config HUGETLB_PAGE_SIZE_4MB
  174. bool "4MB"
  175. depends on X2TLB
  176. config HUGETLB_PAGE_SIZE_64MB
  177. bool "64MB"
  178. depends on X2TLB
  179. config HUGETLB_PAGE_SIZE_512MB
  180. bool "512MB"
  181. depends on CPU_SH5
  182. endchoice
  183. config SCHED_MC
  184. bool "Multi-core scheduler support"
  185. depends on SMP
  186. default y
  187. help
  188. Multi-core scheduler support improves the CPU scheduler's decision
  189. making when dealing with multi-core CPU chips at a cost of slightly
  190. increased overhead in some places. If unsure say N here.
  191. endmenu
  192. menu "Cache configuration"
  193. config SH7705_CACHE_32KB
  194. bool "Enable 32KB cache size for SH7705"
  195. depends on CPU_SUBTYPE_SH7705
  196. default y
  197. choice
  198. prompt "Cache mode"
  199. default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 || CPU_SH5
  200. default CACHE_WRITETHROUGH if (CPU_SH2 && !CPU_SH2A)
  201. config CACHE_WRITEBACK
  202. bool "Write-back"
  203. config CACHE_WRITETHROUGH
  204. bool "Write-through"
  205. help
  206. Selecting this option will configure the caches in write-through
  207. mode, as opposed to the default write-back configuration.
  208. Since there's sill some aliasing issues on SH-4, this option will
  209. unfortunately still require the majority of flushing functions to
  210. be implemented to deal with aliasing.
  211. If unsure, say N.
  212. config CACHE_OFF
  213. bool "Off"
  214. endchoice
  215. endmenu