Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. #
  5. config ARC
  6. def_bool y
  7. select ARC_TIMERS
  8. select ARCH_HAS_CACHE_LINE_SIZE
  9. select ARCH_HAS_DEBUG_VM_PGTABLE
  10. select ARCH_HAS_DMA_PREP_COHERENT
  11. select ARCH_HAS_PTE_SPECIAL
  12. select ARCH_HAS_SETUP_DMA_OPS
  13. select ARCH_HAS_SYNC_DMA_FOR_CPU
  14. select ARCH_HAS_SYNC_DMA_FOR_DEVICE
  15. select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
  16. select ARCH_32BIT_OFF_T
  17. select BUILDTIME_TABLE_SORT
  18. select CLONE_BACKWARDS
  19. select COMMON_CLK
  20. select DMA_DIRECT_REMAP
  21. select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
  22. # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
  23. select GENERIC_IRQ_SHOW
  24. select GENERIC_PCI_IOMAP
  25. select GENERIC_PENDING_IRQ if SMP
  26. select GENERIC_SCHED_CLOCK
  27. select GENERIC_SMP_IDLE_THREAD
  28. select HAVE_ARCH_KGDB
  29. select HAVE_ARCH_TRACEHOOK
  30. select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
  31. select HAVE_DEBUG_STACKOVERFLOW
  32. select HAVE_DEBUG_KMEMLEAK
  33. select HAVE_IOREMAP_PROT
  34. select HAVE_KERNEL_GZIP
  35. select HAVE_KERNEL_LZMA
  36. select HAVE_KPROBES
  37. select HAVE_KRETPROBES
  38. select HAVE_REGS_AND_STACK_ACCESS_API
  39. select HAVE_MOD_ARCH_SPECIFIC
  40. select HAVE_PERF_EVENTS
  41. select HAVE_SYSCALL_TRACEPOINTS
  42. select IRQ_DOMAIN
  43. select LOCK_MM_AND_FIND_VMA
  44. select MODULES_USE_ELF_RELA
  45. select OF
  46. select OF_EARLY_FLATTREE
  47. select PCI_SYSCALL if PCI
  48. select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
  49. select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
  50. select TRACE_IRQFLAGS_SUPPORT
  51. config LOCKDEP_SUPPORT
  52. def_bool y
  53. config SCHED_OMIT_FRAME_POINTER
  54. def_bool y
  55. config GENERIC_CSUM
  56. def_bool y
  57. config ARCH_FLATMEM_ENABLE
  58. def_bool y
  59. config MMU
  60. def_bool y
  61. config NO_IOPORT_MAP
  62. def_bool y
  63. config GENERIC_CALIBRATE_DELAY
  64. def_bool y
  65. config GENERIC_HWEIGHT
  66. def_bool y
  67. config STACKTRACE_SUPPORT
  68. def_bool y
  69. select STACKTRACE
  70. menu "ARC Architecture Configuration"
  71. menu "ARC Platform/SoC/Board"
  72. source "arch/arc/plat-tb10x/Kconfig"
  73. source "arch/arc/plat-axs10x/Kconfig"
  74. source "arch/arc/plat-hsdk/Kconfig"
  75. endmenu
  76. choice
  77. prompt "ARC Instruction Set"
  78. default ISA_ARCV2
  79. config ISA_ARCOMPACT
  80. bool "ARCompact ISA"
  81. select CPU_NO_EFFICIENT_FFS
  82. help
  83. The original ARC ISA of ARC600/700 cores
  84. config ISA_ARCV2
  85. bool "ARC ISA v2"
  86. select ARC_TIMERS_64BIT
  87. help
  88. ISA for the Next Generation ARC-HS cores
  89. endchoice
  90. menu "ARC CPU Configuration"
  91. choice
  92. prompt "ARC Core"
  93. default ARC_CPU_770 if ISA_ARCOMPACT
  94. default ARC_CPU_HS if ISA_ARCV2
  95. config ARC_CPU_770
  96. bool "ARC770"
  97. depends on ISA_ARCOMPACT
  98. select ARC_HAS_SWAPE
  99. help
  100. Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
  101. This core has a bunch of cool new features:
  102. -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
  103. Shared Address Spaces (for sharing TLB entries in MMU)
  104. -Caches: New Prog Model, Region Flush
  105. -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
  106. config ARC_CPU_HS
  107. bool "ARC-HS"
  108. depends on ISA_ARCV2
  109. help
  110. Support for ARC HS38x Cores based on ARCv2 ISA
  111. The notable features are:
  112. - SMP configurations of up to 4 cores with coherency
  113. - Optional L2 Cache and IO-Coherency
  114. - Revised Interrupt Architecture (multiple priorites, reg banks,
  115. auto stack switch, auto regfile save/restore)
  116. - MMUv4 (PIPT dcache, Huge Pages)
  117. - Instructions for
  118. * 64bit load/store: LDD, STD
  119. * Hardware assisted divide/remainder: DIV, REM
  120. * Function prologue/epilogue: ENTER_S, LEAVE_S
  121. * IRQ enable/disable: CLRI, SETI
  122. * pop count: FFS, FLS
  123. * SETcc, BMSKN, XBFU...
  124. endchoice
  125. config ARC_TUNE_MCPU
  126. string "Override default -mcpu compiler flag"
  127. default ""
  128. help
  129. Override default -mcpu=xxx compiler flag (which is set depending on
  130. the ISA version) with the specified value.
  131. NOTE: If specified flag isn't supported by current compiler the
  132. ISA default value will be used as a fallback.
  133. config CPU_BIG_ENDIAN
  134. bool "Enable Big Endian Mode"
  135. help
  136. Build kernel for Big Endian Mode of ARC CPU
  137. config SMP
  138. bool "Symmetric Multi-Processing"
  139. select ARC_MCIP if ISA_ARCV2
  140. help
  141. This enables support for systems with more than one CPU.
  142. if SMP
  143. config NR_CPUS
  144. int "Maximum number of CPUs (2-4096)"
  145. range 2 4096
  146. default "4"
  147. config ARC_SMP_HALT_ON_RESET
  148. bool "Enable Halt-on-reset boot mode"
  149. help
  150. In SMP configuration cores can be configured as Halt-on-reset
  151. or they could all start at same time. For Halt-on-reset, non
  152. masters are parked until Master kicks them so they can start off
  153. at designated entry point. For other case, all jump to common
  154. entry point and spin wait for Master's signal.
  155. endif #SMP
  156. config ARC_MCIP
  157. bool "ARConnect Multicore IP (MCIP) Support "
  158. depends on ISA_ARCV2
  159. default y if SMP
  160. help
  161. This IP block enables SMP in ARC-HS38 cores.
  162. It provides for cross-core interrupts, multi-core debug
  163. hardware semaphores, shared memory,....
  164. menuconfig ARC_CACHE
  165. bool "Enable Cache Support"
  166. default y
  167. if ARC_CACHE
  168. config ARC_CACHE_LINE_SHIFT
  169. int "Cache Line Length (as power of 2)"
  170. range 5 7
  171. default "6"
  172. help
  173. Starting with ARC700 4.9, Cache line length is configurable,
  174. This option specifies "N", with Line-len = 2 power N
  175. So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
  176. Linux only supports same line lengths for I and D caches.
  177. config ARC_HAS_ICACHE
  178. bool "Use Instruction Cache"
  179. default y
  180. config ARC_HAS_DCACHE
  181. bool "Use Data Cache"
  182. default y
  183. config ARC_CACHE_PAGES
  184. bool "Per Page Cache Control"
  185. default y
  186. depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
  187. help
  188. This can be used to over-ride the global I/D Cache Enable on a
  189. per-page basis (but only for pages accessed via MMU such as
  190. Kernel Virtual address or User Virtual Address)
  191. TLB entries have a per-page Cache Enable Bit.
  192. Note that Global I/D ENABLE + Per Page DISABLE works but corollary
  193. Global DISABLE + Per Page ENABLE won't work
  194. config ARC_CACHE_VIPT_ALIASING
  195. bool "Support VIPT Aliasing D$"
  196. depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
  197. endif #ARC_CACHE
  198. config ARC_HAS_ICCM
  199. bool "Use ICCM"
  200. help
  201. Single Cycle RAMS to store Fast Path Code
  202. config ARC_ICCM_SZ
  203. int "ICCM Size in KB"
  204. default "64"
  205. depends on ARC_HAS_ICCM
  206. config ARC_HAS_DCCM
  207. bool "Use DCCM"
  208. help
  209. Single Cycle RAMS to store Fast Path Data
  210. config ARC_DCCM_SZ
  211. int "DCCM Size in KB"
  212. default "64"
  213. depends on ARC_HAS_DCCM
  214. config ARC_DCCM_BASE
  215. hex "DCCM map address"
  216. default "0xA0000000"
  217. depends on ARC_HAS_DCCM
  218. choice
  219. prompt "MMU Version"
  220. default ARC_MMU_V3 if ISA_ARCOMPACT
  221. default ARC_MMU_V4 if ISA_ARCV2
  222. config ARC_MMU_V3
  223. bool "MMU v3"
  224. depends on ISA_ARCOMPACT
  225. help
  226. Introduced with ARC700 4.10: New Features
  227. Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
  228. Shared Address Spaces (SASID)
  229. config ARC_MMU_V4
  230. bool "MMU v4"
  231. depends on ISA_ARCV2
  232. endchoice
  233. choice
  234. prompt "MMU Page Size"
  235. default ARC_PAGE_SIZE_8K
  236. config ARC_PAGE_SIZE_8K
  237. bool "8KB"
  238. help
  239. Choose between 8k vs 16k
  240. config ARC_PAGE_SIZE_16K
  241. bool "16KB"
  242. config ARC_PAGE_SIZE_4K
  243. bool "4KB"
  244. depends on ARC_MMU_V3 || ARC_MMU_V4
  245. endchoice
  246. choice
  247. prompt "MMU Super Page Size"
  248. depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
  249. default ARC_HUGEPAGE_2M
  250. config ARC_HUGEPAGE_2M
  251. bool "2MB"
  252. config ARC_HUGEPAGE_16M
  253. bool "16MB"
  254. endchoice
  255. config PGTABLE_LEVELS
  256. int "Number of Page table levels"
  257. default 2
  258. config ARC_COMPACT_IRQ_LEVELS
  259. depends on ISA_ARCOMPACT
  260. bool "Setup Timer IRQ as high Priority"
  261. # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
  262. depends on !SMP
  263. config ARC_FPU_SAVE_RESTORE
  264. bool "Enable FPU state persistence across context switch"
  265. help
  266. ARCompact FPU has internal registers to assist with Double precision
  267. Floating Point operations. There are control and stauts registers
  268. for floating point exceptions and rounding modes. These are
  269. preserved across task context switch when enabled.
  270. config ARC_CANT_LLSC
  271. def_bool n
  272. config ARC_HAS_LLSC
  273. bool "Insn: LLOCK/SCOND (efficient atomic ops)"
  274. default y
  275. depends on !ARC_CANT_LLSC
  276. config ARC_HAS_SWAPE
  277. bool "Insn: SWAPE (endian-swap)"
  278. default y
  279. if ISA_ARCV2
  280. config ARC_USE_UNALIGNED_MEM_ACCESS
  281. bool "Enable unaligned access in HW"
  282. default y
  283. select HAVE_EFFICIENT_UNALIGNED_ACCESS
  284. help
  285. The ARC HS architecture supports unaligned memory access
  286. which is disabled by default. Enable unaligned access in
  287. hardware and use software to use it
  288. config ARC_HAS_LL64
  289. bool "Insn: 64bit LDD/STD"
  290. help
  291. Enable gcc to generate 64-bit load/store instructions
  292. ISA mandates even/odd registers to allow encoding of two
  293. dest operands with 2 possible source operands.
  294. default y
  295. config ARC_HAS_DIV_REM
  296. bool "Insn: div, divu, rem, remu"
  297. default y
  298. config ARC_HAS_ACCL_REGS
  299. bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
  300. default y
  301. help
  302. Depending on the configuration, CPU can contain accumulator reg-pair
  303. (also referred to as r58:r59). These can also be used by gcc as GPR so
  304. kernel needs to save/restore per process
  305. config ARC_DSP_HANDLED
  306. def_bool n
  307. config ARC_DSP_SAVE_RESTORE_REGS
  308. def_bool n
  309. choice
  310. prompt "DSP support"
  311. default ARC_DSP_NONE
  312. help
  313. Depending on the configuration, CPU can contain DSP registers
  314. (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
  315. Below are options describing how to handle these registers in
  316. interrupt entry / exit and in context switch.
  317. config ARC_DSP_NONE
  318. bool "No DSP extension presence in HW"
  319. help
  320. No DSP extension presence in HW
  321. config ARC_DSP_KERNEL
  322. bool "DSP extension in HW, no support for userspace"
  323. select ARC_HAS_ACCL_REGS
  324. select ARC_DSP_HANDLED
  325. help
  326. DSP extension presence in HW, no support for DSP-enabled userspace
  327. applications. We don't save / restore DSP registers and only do
  328. some minimal preparations so userspace won't be able to break kernel
  329. config ARC_DSP_USERSPACE
  330. bool "Support DSP for userspace apps"
  331. select ARC_HAS_ACCL_REGS
  332. select ARC_DSP_HANDLED
  333. select ARC_DSP_SAVE_RESTORE_REGS
  334. help
  335. DSP extension presence in HW, support save / restore DSP registers to
  336. run DSP-enabled userspace applications
  337. config ARC_DSP_AGU_USERSPACE
  338. bool "Support DSP with AGU for userspace apps"
  339. select ARC_HAS_ACCL_REGS
  340. select ARC_DSP_HANDLED
  341. select ARC_DSP_SAVE_RESTORE_REGS
  342. help
  343. DSP and AGU extensions presence in HW, support save / restore DSP
  344. and AGU registers to run DSP-enabled userspace applications
  345. endchoice
  346. config ARC_IRQ_NO_AUTOSAVE
  347. bool "Disable hardware autosave regfile on interrupts"
  348. default n
  349. help
  350. On HS cores, taken interrupt auto saves the regfile on stack.
  351. This is programmable and can be optionally disabled in which case
  352. software INTERRUPT_PROLOGUE/EPILGUE do the needed work
  353. config ARC_LPB_DISABLE
  354. bool "Disable loop buffer (LPB)"
  355. help
  356. On HS cores, loop buffer (LPB) is programmable in runtime and can
  357. be optionally disabled.
  358. endif # ISA_ARCV2
  359. endmenu # "ARC CPU Configuration"
  360. config LINUX_LINK_BASE
  361. hex "Kernel link address"
  362. default "0x80000000"
  363. help
  364. ARC700 divides the 32 bit phy address space into two equal halves
  365. -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
  366. -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
  367. Typically Linux kernel is linked at the start of untransalted addr,
  368. hence the default value of 0x8zs.
  369. However some customers have peripherals mapped at this addr, so
  370. Linux needs to be scooted a bit.
  371. If you don't know what the above means, leave this setting alone.
  372. This needs to match memory start address specified in Device Tree
  373. config LINUX_RAM_BASE
  374. hex "RAM base address"
  375. default LINUX_LINK_BASE
  376. help
  377. By default Linux is linked at base of RAM. However in some special
  378. cases (such as HSDK), Linux can't be linked at start of DDR, hence
  379. this option.
  380. config HIGHMEM
  381. bool "High Memory Support"
  382. select HAVE_ARCH_PFN_VALID
  383. select KMAP_LOCAL
  384. help
  385. With ARC 2G:2G address split, only upper 2G is directly addressable by
  386. kernel. Enable this to potentially allow access to rest of 2G and PAE
  387. in future
  388. config ARC_HAS_PAE40
  389. bool "Support for the 40-bit Physical Address Extension"
  390. depends on ISA_ARCV2
  391. select HIGHMEM
  392. select PHYS_ADDR_T_64BIT
  393. help
  394. Enable access to physical memory beyond 4G, only supported on
  395. ARC cores with 40 bit Physical Addressing support
  396. config ARC_KVADDR_SIZE
  397. int "Kernel Virtual Address Space size (MB)"
  398. range 0 512
  399. default "256"
  400. help
  401. The kernel address space is carved out of 256MB of translated address
  402. space for catering to vmalloc, modules, pkmap, fixmap. This however may
  403. not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
  404. this to be stretched to 512 MB (by extending into the reserved
  405. kernel-user gutter)
  406. config ARC_CURR_IN_REG
  407. bool "Dedicate Register r25 for current_task pointer"
  408. default y
  409. help
  410. This reserved Register R25 to point to Current Task in
  411. kernel mode. This saves memory access for each such access
  412. config ARC_EMUL_UNALIGNED
  413. bool "Emulate unaligned memory access (userspace only)"
  414. select SYSCTL_ARCH_UNALIGN_NO_WARN
  415. select SYSCTL_ARCH_UNALIGN_ALLOW
  416. depends on ISA_ARCOMPACT
  417. help
  418. This enables misaligned 16 & 32 bit memory access from user space.
  419. Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
  420. potential bugs in code
  421. config HZ
  422. int "Timer Frequency"
  423. default 100
  424. config ARC_METAWARE_HLINK
  425. bool "Support for Metaware debugger assisted Host access"
  426. help
  427. This options allows a Linux userland apps to directly access
  428. host file system (open/creat/read/write etc) with help from
  429. Metaware Debugger. This can come in handy for Linux-host communication
  430. when there is no real usable peripheral such as EMAC.
  431. menuconfig ARC_DBG
  432. bool "ARC debugging"
  433. default y
  434. if ARC_DBG
  435. config ARC_DW2_UNWIND
  436. bool "Enable DWARF specific kernel stack unwind"
  437. default y
  438. select KALLSYMS
  439. help
  440. Compiles the kernel with DWARF unwind information and can be used
  441. to get stack backtraces.
  442. If you say Y here the resulting kernel image will be slightly larger
  443. but not slower, and it will give very useful debugging information.
  444. If you don't debug the kernel, you can say N, but we may not be able
  445. to solve problems without frame unwind information
  446. config ARC_DBG_JUMP_LABEL
  447. bool "Paranoid checks in Static Keys (jump labels) code"
  448. depends on JUMP_LABEL
  449. default y if STATIC_KEYS_SELFTEST
  450. help
  451. Enable paranoid checks and self-test of both ARC-specific and generic
  452. part of static keys (jump labels) related code.
  453. endif
  454. config ARC_BUILTIN_DTB_NAME
  455. string "Built in DTB"
  456. help
  457. Set the name of the DTB to embed in the vmlinux binary
  458. Leaving it blank selects the minimal "skeleton" dtb
  459. endmenu # "ARC Architecture Configuration"
  460. config ARCH_FORCE_MAX_ORDER
  461. int "Maximum zone order"
  462. default "12" if ARC_HUGEPAGE_16M
  463. default "11"
  464. source "kernel/power/Kconfig"