Kconfig 15 KB

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