Kconfig 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. # SPDX-License-Identifier: GPL-2.0
  2. config ZONE_DMA
  3. def_bool y
  4. config XTENSA
  5. def_bool y
  6. select ARCH_HAS_SG_CHAIN
  7. select ARCH_HAS_SYNC_DMA_FOR_CPU
  8. select ARCH_HAS_SYNC_DMA_FOR_DEVICE
  9. select ARCH_NO_COHERENT_DMA_MMAP if !MMU
  10. select ARCH_WANT_FRAME_POINTERS
  11. select ARCH_WANT_IPC_PARSE_VERSION
  12. select BUILDTIME_EXTABLE_SORT
  13. select CLONE_BACKWARDS
  14. select COMMON_CLK
  15. select DMA_NONCOHERENT_OPS
  16. select GENERIC_ATOMIC64
  17. select GENERIC_CLOCKEVENTS
  18. select GENERIC_IRQ_SHOW
  19. select GENERIC_PCI_IOMAP
  20. select GENERIC_SCHED_CLOCK
  21. select GENERIC_STRNCPY_FROM_USER if KASAN
  22. select HAVE_ARCH_KASAN if MMU
  23. select HAVE_DEBUG_KMEMLEAK
  24. select HAVE_DMA_CONTIGUOUS
  25. select HAVE_EXIT_THREAD
  26. select HAVE_FUNCTION_TRACER
  27. select HAVE_FUTEX_CMPXCHG if !MMU
  28. select HAVE_HW_BREAKPOINT if PERF_EVENTS
  29. select HAVE_IRQ_TIME_ACCOUNTING
  30. select HAVE_MEMBLOCK
  31. select HAVE_OPROFILE
  32. select HAVE_PERF_EVENTS
  33. select HAVE_STACKPROTECTOR
  34. select IRQ_DOMAIN
  35. select MODULES_USE_ELF_RELA
  36. select NO_BOOTMEM
  37. select PERF_USE_VMALLOC
  38. select VIRT_TO_BUS
  39. help
  40. Xtensa processors are 32-bit RISC machines designed by Tensilica
  41. primarily for embedded systems. These processors are both
  42. configurable and extensible. The Linux port to the Xtensa
  43. architecture supports all processor configurations and extensions,
  44. with reasonable minimum requirements. The Xtensa Linux project has
  45. a home page at <http://www.linux-xtensa.org/>.
  46. config RWSEM_XCHGADD_ALGORITHM
  47. def_bool y
  48. config GENERIC_HWEIGHT
  49. def_bool y
  50. config ARCH_HAS_ILOG2_U32
  51. def_bool n
  52. config ARCH_HAS_ILOG2_U64
  53. def_bool n
  54. config NO_IOPORT_MAP
  55. def_bool n
  56. config HZ
  57. int
  58. default 100
  59. config LOCKDEP_SUPPORT
  60. def_bool y
  61. config STACKTRACE_SUPPORT
  62. def_bool y
  63. config TRACE_IRQFLAGS_SUPPORT
  64. def_bool y
  65. config MMU
  66. def_bool n
  67. config HAVE_XTENSA_GPIO32
  68. def_bool n
  69. config KASAN_SHADOW_OFFSET
  70. hex
  71. default 0x6e400000
  72. menu "Processor type and features"
  73. choice
  74. prompt "Xtensa Processor Configuration"
  75. default XTENSA_VARIANT_FSF
  76. config XTENSA_VARIANT_FSF
  77. bool "fsf - default (not generic) configuration"
  78. select MMU
  79. config XTENSA_VARIANT_DC232B
  80. bool "dc232b - Diamond 232L Standard Core Rev.B (LE)"
  81. select MMU
  82. select HAVE_XTENSA_GPIO32
  83. help
  84. This variant refers to Tensilica's Diamond 232L Standard core Rev.B (LE).
  85. config XTENSA_VARIANT_DC233C
  86. bool "dc233c - Diamond 233L Standard Core Rev.C (LE)"
  87. select MMU
  88. select HAVE_XTENSA_GPIO32
  89. help
  90. This variant refers to Tensilica's Diamond 233L Standard core Rev.C (LE).
  91. config XTENSA_VARIANT_CUSTOM
  92. bool "Custom Xtensa processor configuration"
  93. select HAVE_XTENSA_GPIO32
  94. help
  95. Select this variant to use a custom Xtensa processor configuration.
  96. You will be prompted for a processor variant CORENAME.
  97. endchoice
  98. config XTENSA_VARIANT_CUSTOM_NAME
  99. string "Xtensa Processor Custom Core Variant Name"
  100. depends on XTENSA_VARIANT_CUSTOM
  101. help
  102. Provide the name of a custom Xtensa processor variant.
  103. This CORENAME selects arch/xtensa/variant/CORENAME.
  104. Dont forget you have to select MMU if you have one.
  105. config XTENSA_VARIANT_NAME
  106. string
  107. default "dc232b" if XTENSA_VARIANT_DC232B
  108. default "dc233c" if XTENSA_VARIANT_DC233C
  109. default "fsf" if XTENSA_VARIANT_FSF
  110. default XTENSA_VARIANT_CUSTOM_NAME if XTENSA_VARIANT_CUSTOM
  111. config XTENSA_VARIANT_MMU
  112. bool "Core variant has a Full MMU (TLB, Pages, Protection, etc)"
  113. depends on XTENSA_VARIANT_CUSTOM
  114. default y
  115. select MMU
  116. help
  117. Build a Conventional Kernel with full MMU support,
  118. ie: it supports a TLB with auto-loading, page protection.
  119. config XTENSA_VARIANT_HAVE_PERF_EVENTS
  120. bool "Core variant has Performance Monitor Module"
  121. depends on XTENSA_VARIANT_CUSTOM
  122. default n
  123. help
  124. Enable if core variant has Performance Monitor Module with
  125. External Registers Interface.
  126. If unsure, say N.
  127. config XTENSA_FAKE_NMI
  128. bool "Treat PMM IRQ as NMI"
  129. depends on XTENSA_VARIANT_HAVE_PERF_EVENTS
  130. default n
  131. help
  132. If PMM IRQ is the only IRQ at EXCM level it is safe to
  133. treat it as NMI, which improves accuracy of profiling.
  134. If there are other interrupts at or above PMM IRQ priority level
  135. but not above the EXCM level, PMM IRQ still may be treated as NMI,
  136. but only if these IRQs are not used. There will be a build warning
  137. saying that this is not safe, and a bugcheck if one of these IRQs
  138. actually fire.
  139. If unsure, say N.
  140. config XTENSA_UNALIGNED_USER
  141. bool "Unaligned memory access in use space"
  142. help
  143. The Xtensa architecture currently does not handle unaligned
  144. memory accesses in hardware but through an exception handler.
  145. Per default, unaligned memory accesses are disabled in user space.
  146. Say Y here to enable unaligned memory access in user space.
  147. config HAVE_SMP
  148. bool "System Supports SMP (MX)"
  149. depends on XTENSA_VARIANT_CUSTOM
  150. select XTENSA_MX
  151. help
  152. This option is use to indicate that the system-on-a-chip (SOC)
  153. supports Multiprocessing. Multiprocessor support implemented above
  154. the CPU core definition and currently needs to be selected manually.
  155. Multiprocessor support in implemented with external cache and
  156. interrupt controllers.
  157. The MX interrupt distributer adds Interprocessor Interrupts
  158. and causes the IRQ numbers to be increased by 4 for devices
  159. like the open cores ethernet driver and the serial interface.
  160. You still have to select "Enable SMP" to enable SMP on this SOC.
  161. config SMP
  162. bool "Enable Symmetric multi-processing support"
  163. depends on HAVE_SMP
  164. select GENERIC_SMP_IDLE_THREAD
  165. help
  166. Enabled SMP Software; allows more than one CPU/CORE
  167. to be activated during startup.
  168. config NR_CPUS
  169. depends on SMP
  170. int "Maximum number of CPUs (2-32)"
  171. range 2 32
  172. default "4"
  173. config HOTPLUG_CPU
  174. bool "Enable CPU hotplug support"
  175. depends on SMP
  176. help
  177. Say Y here to allow turning CPUs off and on. CPUs can be
  178. controlled through /sys/devices/system/cpu.
  179. Say N if you want to disable CPU hotplug.
  180. config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  181. bool "Initialize Xtensa MMU inside the Linux kernel code"
  182. depends on !XTENSA_VARIANT_FSF && !XTENSA_VARIANT_DC232B
  183. default y if XTENSA_VARIANT_DC233C || XTENSA_VARIANT_CUSTOM
  184. help
  185. Earlier version initialized the MMU in the exception vector
  186. before jumping to _startup in head.S and had an advantage that
  187. it was possible to place a software breakpoint at 'reset' and
  188. then enter your normal kernel breakpoints once the MMU was mapped
  189. to the kernel mappings (0XC0000000).
  190. This unfortunately won't work for U-Boot and likely also wont
  191. work for using KEXEC to have a hot kernel ready for doing a
  192. KDUMP.
  193. So now the MMU is initialized in head.S but it's necessary to
  194. use hardware breakpoints (gdb 'hbreak' cmd) to break at _startup.
  195. xt-gdb can't place a Software Breakpoint in the 0XD region prior
  196. to mapping the MMU and after mapping even if the area of low memory
  197. was mapped gdb wouldn't remove the breakpoint on hitting it as the
  198. PC wouldn't match. Since Hardware Breakpoints are recommended for
  199. Linux configurations it seems reasonable to just assume they exist
  200. and leave this older mechanism for unfortunate souls that choose
  201. not to follow Tensilica's recommendation.
  202. Selecting this will cause U-Boot to set the KERNEL Load and Entry
  203. address at 0x00003000 instead of the mapped std of 0xD0003000.
  204. If in doubt, say Y.
  205. config MEMMAP_CACHEATTR
  206. hex "Cache attributes for the memory address space"
  207. depends on !MMU
  208. default 0x22222222
  209. help
  210. These cache attributes are set up for noMMU systems. Each hex digit
  211. specifies cache attributes for the corresponding 512MB memory
  212. region: bits 0..3 -- for addresses 0x00000000..0x1fffffff,
  213. bits 4..7 -- for addresses 0x20000000..0x3fffffff, and so on.
  214. Cache attribute values are specific for the MMU type, so e.g.
  215. for region protection MMUs: 2 is cache bypass, 4 is WB cached,
  216. 1 is WT cached, f is illegal. For ful MMU: bit 0 makes it executable,
  217. bit 1 makes it writable, bits 2..3 meaning is 0: cache bypass,
  218. 1: WB cache, 2: WT cache, 3: special (c and e are illegal, f is
  219. reserved).
  220. config KSEG_PADDR
  221. hex "Physical address of the KSEG mapping"
  222. depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX && MMU
  223. default 0x00000000
  224. help
  225. This is the physical address where KSEG is mapped. Please refer to
  226. the chosen KSEG layout help for the required address alignment.
  227. Unpacked kernel image (including vectors) must be located completely
  228. within KSEG.
  229. Physical memory below this address is not available to linux.
  230. If unsure, leave the default value here.
  231. config KERNEL_LOAD_ADDRESS
  232. hex "Kernel load address"
  233. default 0x60003000 if !MMU
  234. default 0x00003000 if MMU && INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  235. default 0xd0003000 if MMU && !INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  236. help
  237. This is the address where the kernel is loaded.
  238. It is virtual address for MMUv2 configurations and physical address
  239. for all other configurations.
  240. If unsure, leave the default value here.
  241. config VECTORS_OFFSET
  242. hex "Kernel vectors offset"
  243. default 0x00003000
  244. help
  245. This is the offset of the kernel image from the relocatable vectors
  246. base.
  247. If unsure, leave the default value here.
  248. choice
  249. prompt "KSEG layout"
  250. depends on MMU
  251. default XTENSA_KSEG_MMU_V2
  252. config XTENSA_KSEG_MMU_V2
  253. bool "MMUv2: 128MB cached + 128MB uncached"
  254. help
  255. MMUv2 compatible kernel memory map: TLB way 5 maps 128MB starting
  256. at KSEG_PADDR to 0xd0000000 with cache and to 0xd8000000
  257. without cache.
  258. KSEG_PADDR must be aligned to 128MB.
  259. config XTENSA_KSEG_256M
  260. bool "256MB cached + 256MB uncached"
  261. depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  262. help
  263. TLB way 6 maps 256MB starting at KSEG_PADDR to 0xb0000000
  264. with cache and to 0xc0000000 without cache.
  265. KSEG_PADDR must be aligned to 256MB.
  266. config XTENSA_KSEG_512M
  267. bool "512MB cached + 512MB uncached"
  268. depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
  269. help
  270. TLB way 6 maps 512MB starting at KSEG_PADDR to 0xa0000000
  271. with cache and to 0xc0000000 without cache.
  272. KSEG_PADDR must be aligned to 256MB.
  273. endchoice
  274. config HIGHMEM
  275. bool "High Memory Support"
  276. depends on MMU
  277. help
  278. Linux can use the full amount of RAM in the system by
  279. default. However, the default MMUv2 setup only maps the
  280. lowermost 128 MB of memory linearly to the areas starting
  281. at 0xd0000000 (cached) and 0xd8000000 (uncached).
  282. When there are more than 128 MB memory in the system not
  283. all of it can be "permanently mapped" by the kernel.
  284. The physical memory that's not permanently mapped is called
  285. "high memory".
  286. If you are compiling a kernel which will never run on a
  287. machine with more than 128 MB total physical RAM, answer
  288. N here.
  289. If unsure, say Y.
  290. config FAST_SYSCALL_XTENSA
  291. bool "Enable fast atomic syscalls"
  292. default n
  293. help
  294. fast_syscall_xtensa is a syscall that can make atomic operations
  295. on UP kernel when processor has no s32c1i support.
  296. This syscall is deprecated. It may have issues when called with
  297. invalid arguments. It is provided only for backwards compatibility.
  298. Only enable it if your userspace software requires it.
  299. If unsure, say N.
  300. config FAST_SYSCALL_SPILL_REGISTERS
  301. bool "Enable spill registers syscall"
  302. default n
  303. help
  304. fast_syscall_spill_registers is a syscall that spills all active
  305. register windows of a calling userspace task onto its stack.
  306. This syscall is deprecated. It may have issues when called with
  307. invalid arguments. It is provided only for backwards compatibility.
  308. Only enable it if your userspace software requires it.
  309. If unsure, say N.
  310. endmenu
  311. config XTENSA_CALIBRATE_CCOUNT
  312. def_bool n
  313. help
  314. On some platforms (XT2000, for example), the CPU clock rate can
  315. vary. The frequency can be determined, however, by measuring
  316. against a well known, fixed frequency, such as an UART oscillator.
  317. config SERIAL_CONSOLE
  318. def_bool n
  319. menu "Bus options"
  320. config PCI
  321. bool "PCI support"
  322. default y
  323. help
  324. Find out whether you have a PCI motherboard. PCI is the name of a
  325. bus system, i.e. the way the CPU talks to the other stuff inside
  326. your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
  327. VESA. If you have PCI, say Y, otherwise N.
  328. source "drivers/pci/Kconfig"
  329. endmenu
  330. menu "Platform options"
  331. choice
  332. prompt "Xtensa System Type"
  333. default XTENSA_PLATFORM_ISS
  334. config XTENSA_PLATFORM_ISS
  335. bool "ISS"
  336. select XTENSA_CALIBRATE_CCOUNT
  337. select SERIAL_CONSOLE
  338. help
  339. ISS is an acronym for Tensilica's Instruction Set Simulator.
  340. config XTENSA_PLATFORM_XT2000
  341. bool "XT2000"
  342. select HAVE_IDE
  343. help
  344. XT2000 is the name of Tensilica's feature-rich emulation platform.
  345. This hardware is capable of running a full Linux distribution.
  346. config XTENSA_PLATFORM_XTFPGA
  347. bool "XTFPGA"
  348. select ETHOC if ETHERNET
  349. select PLATFORM_WANT_DEFAULT_MEM if !MMU
  350. select SERIAL_CONSOLE
  351. select XTENSA_CALIBRATE_CCOUNT
  352. help
  353. XTFPGA is the name of Tensilica board family (LX60, LX110, LX200, ML605).
  354. This hardware is capable of running a full Linux distribution.
  355. endchoice
  356. config PLATFORM_NR_IRQS
  357. int
  358. default 3 if XTENSA_PLATFORM_XT2000
  359. default 0
  360. config XTENSA_CPU_CLOCK
  361. int "CPU clock rate [MHz]"
  362. depends on !XTENSA_CALIBRATE_CCOUNT
  363. default 16
  364. config GENERIC_CALIBRATE_DELAY
  365. bool "Auto calibration of the BogoMIPS value"
  366. help
  367. The BogoMIPS value can easily be derived from the CPU frequency.
  368. config CMDLINE_BOOL
  369. bool "Default bootloader kernel arguments"
  370. config CMDLINE
  371. string "Initial kernel command string"
  372. depends on CMDLINE_BOOL
  373. default "console=ttyS0,38400 root=/dev/ram"
  374. help
  375. On some architectures (EBSA110 and CATS), there is currently no way
  376. for the boot loader to pass arguments to the kernel. For these
  377. architectures, you should supply some command-line options at build
  378. time by entering them here. As a minimum, you should specify the
  379. memory size and the root device (e.g., mem=64M root=/dev/nfs).
  380. config USE_OF
  381. bool "Flattened Device Tree support"
  382. select OF
  383. select OF_EARLY_FLATTREE
  384. select OF_RESERVED_MEM
  385. help
  386. Include support for flattened device tree machine descriptions.
  387. config BUILTIN_DTB
  388. string "DTB to build into the kernel image"
  389. depends on OF
  390. config PARSE_BOOTPARAM
  391. bool "Parse bootparam block"
  392. default y
  393. help
  394. Parse parameters passed to the kernel from the bootloader. It may
  395. be disabled if the kernel is known to run without the bootloader.
  396. If unsure, say Y.
  397. config BLK_DEV_SIMDISK
  398. tristate "Host file-based simulated block device support"
  399. default n
  400. depends on XTENSA_PLATFORM_ISS && BLOCK
  401. help
  402. Create block devices that map to files in the host file system.
  403. Device binding to host file may be changed at runtime via proc
  404. interface provided the device is not in use.
  405. config BLK_DEV_SIMDISK_COUNT
  406. int "Number of host file-based simulated block devices"
  407. range 1 10
  408. depends on BLK_DEV_SIMDISK
  409. default 2
  410. help
  411. This is the default minimal number of created block devices.
  412. Kernel/module parameter 'simdisk_count' may be used to change this
  413. value at runtime. More file names (but no more than 10) may be
  414. specified as parameters, simdisk_count grows accordingly.
  415. config SIMDISK0_FILENAME
  416. string "Host filename for the first simulated device"
  417. depends on BLK_DEV_SIMDISK = y
  418. default ""
  419. help
  420. Attach a first simdisk to a host file. Conventionally, this file
  421. contains a root file system.
  422. config SIMDISK1_FILENAME
  423. string "Host filename for the second simulated device"
  424. depends on BLK_DEV_SIMDISK = y && BLK_DEV_SIMDISK_COUNT != 1
  425. default ""
  426. help
  427. Another simulated disk in a host file for a buildroot-independent
  428. storage.
  429. config FORCE_MAX_ZONEORDER
  430. int "Maximum zone order"
  431. default "11"
  432. help
  433. The kernel memory allocator divides physically contiguous memory
  434. blocks into "zones", where each zone is a power of two number of
  435. pages. This option selects the largest power of two that the kernel
  436. keeps in the memory allocator. If you need to allocate very large
  437. blocks of physically contiguous memory, then you may need to
  438. increase this value.
  439. This config option is actually maximum order plus one. For example,
  440. a value of 11 means that the largest free memory block is 2^10 pages.
  441. source "drivers/pcmcia/Kconfig"
  442. config PLATFORM_WANT_DEFAULT_MEM
  443. def_bool n
  444. config DEFAULT_MEM_START
  445. hex
  446. prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM
  447. default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM
  448. default 0x00000000
  449. help
  450. This is the base address used for both PAGE_OFFSET and PHYS_OFFSET
  451. in noMMU configurations.
  452. If unsure, leave the default value here.
  453. config XTFPGA_LCD
  454. bool "Enable XTFPGA LCD driver"
  455. depends on XTENSA_PLATFORM_XTFPGA
  456. default n
  457. help
  458. There's a 2x16 LCD on most of XTFPGA boards, kernel may output
  459. progress messages there during bootup/shutdown. It may be useful
  460. during board bringup.
  461. If unsure, say N.
  462. config XTFPGA_LCD_BASE_ADDR
  463. hex "XTFPGA LCD base address"
  464. depends on XTFPGA_LCD
  465. default "0x0d0c0000"
  466. help
  467. Base address of the LCD controller inside KIO region.
  468. Different boards from XTFPGA family have LCD controller at different
  469. addresses. Please consult prototyping user guide for your board for
  470. the correct address. Wrong address here may lead to hardware lockup.
  471. config XTFPGA_LCD_8BIT_ACCESS
  472. bool "Use 8-bit access to XTFPGA LCD"
  473. depends on XTFPGA_LCD
  474. default n
  475. help
  476. LCD may be connected with 4- or 8-bit interface, 8-bit access may
  477. only be used with 8-bit interface. Please consult prototyping user
  478. guide for your board for the correct interface width.
  479. endmenu
  480. menu "Power management options"
  481. source "kernel/power/Kconfig"
  482. endmenu