Kconfig 17 KB

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