Kconfig 6.2 KB

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