Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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_CPU_CACHE_ALIASING
  9. select ARCH_HAS_CACHE_LINE_SIZE
  10. select ARCH_HAS_DEBUG_VM_PGTABLE
  11. select ARCH_HAS_DMA_PREP_COHERENT
  12. select ARCH_HAS_PTE_SPECIAL
  13. select ARCH_HAS_SETUP_DMA_OPS
  14. select ARCH_HAS_SYNC_DMA_FOR_CPU
  15. select ARCH_HAS_SYNC_DMA_FOR_DEVICE
  16. select ARCH_NEED_CMPXCHG_1_EMU
  17. select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
  18. select ARCH_32BIT_OFF_T
  19. select BUILDTIME_TABLE_SORT
  20. select GENERIC_BUILTIN_DTB
  21. select CLONE_BACKWARDS
  22. select COMMON_CLK
  23. select DMA_DIRECT_REMAP
  24. select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
  25. # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
  26. select GENERIC_IRQ_SHOW
  27. select GENERIC_PCI_IOMAP
  28. select GENERIC_SCHED_CLOCK
  29. select GENERIC_SMP_IDLE_THREAD
  30. select GENERIC_IOREMAP
  31. select GENERIC_STRNCPY_FROM_USER if MMU
  32. select GENERIC_STRNLEN_USER if MMU
  33. select HAVE_ARCH_KGDB
  34. select HAVE_ARCH_TRACEHOOK
  35. select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
  36. select HAVE_DEBUG_STACKOVERFLOW
  37. select HAVE_DEBUG_KMEMLEAK
  38. select HAVE_IOREMAP_PROT
  39. select HAVE_KERNEL_GZIP
  40. select HAVE_KERNEL_LZMA
  41. select HAVE_KPROBES
  42. select HAVE_KRETPROBES
  43. select HAVE_REGS_AND_STACK_ACCESS_API
  44. select HAVE_MOD_ARCH_SPECIFIC
  45. select HAVE_PERF_EVENTS
  46. select HAVE_SYSCALL_TRACEPOINTS
  47. select IRQ_DOMAIN
  48. select LOCK_MM_AND_FIND_VMA
  49. select MODULES_USE_ELF_RELA
  50. select OF
  51. select OF_EARLY_FLATTREE
  52. select PCI_SYSCALL if PCI
  53. select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
  54. select TRACE_IRQFLAGS_SUPPORT
  55. select HAVE_EBPF_JIT if ISA_ARCV2
  56. config LOCKDEP_SUPPORT
  57. def_bool y
  58. config SCHED_OMIT_FRAME_POINTER
  59. def_bool y
  60. config GENERIC_CSUM
  61. def_bool y
  62. config ARCH_FLATMEM_ENABLE
  63. def_bool y
  64. config MMU
  65. def_bool y
  66. config NO_IOPORT_MAP
  67. def_bool y
  68. config GENERIC_CALIBRATE_DELAY
  69. def_bool y
  70. config GENERIC_HWEIGHT
  71. def_bool y
  72. config STACKTRACE_SUPPORT
  73. def_bool y
  74. select STACKTRACE
  75. menu "ARC Architecture Configuration"
  76. menu "ARC Platform/SoC/Board"
  77. source "arch/arc/plat-tb10x/Kconfig"
  78. source "arch/arc/plat-axs10x/Kconfig"
  79. source "arch/arc/plat-hsdk/Kconfig"
  80. endmenu
  81. choice
  82. prompt "ARC Instruction Set"
  83. default ISA_ARCV2
  84. config ISA_ARCOMPACT
  85. bool "ARCompact ISA"
  86. select CPU_NO_EFFICIENT_FFS
  87. help
  88. The original ARC ISA of ARC600/700 cores
  89. config ISA_ARCV2
  90. bool "ARC ISA v2"
  91. select ARC_TIMERS_64BIT
  92. help
  93. ISA for the Next Generation ARC-HS cores
  94. endchoice
  95. menu "ARC CPU Configuration"
  96. choice
  97. prompt "ARC Core"
  98. default ARC_CPU_770 if ISA_ARCOMPACT
  99. default ARC_CPU_HS if ISA_ARCV2
  100. config ARC_CPU_770
  101. bool "ARC770"
  102. depends on ISA_ARCOMPACT
  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. 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 ARC_MMU_V4
  391. depends on !ARC_PAGE_SIZE_4K
  392. select HIGHMEM
  393. select PHYS_ADDR_T_64BIT
  394. help
  395. Enable access to physical memory beyond 4G, only supported on
  396. ARC cores with 40 bit Physical Addressing support
  397. config ARC_KVADDR_SIZE
  398. int "Kernel Virtual Address Space size (MB)"
  399. range 0 512
  400. default "256"
  401. help
  402. The kernel address space is carved out of 256MB of translated address
  403. space for catering to vmalloc, modules, pkmap, fixmap. This however may
  404. not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
  405. this to be stretched to 512 MB (by extending into the reserved
  406. kernel-user gutter)
  407. config ARC_CURR_IN_REG
  408. bool "cache current task pointer in gp"
  409. default y
  410. help
  411. This reserves gp register to point to Current Task in
  412. kernel mode eliding memory access for each access
  413. config ARC_EMUL_UNALIGNED
  414. bool "Emulate unaligned memory access (userspace only)"
  415. select SYSCTL_ARCH_UNALIGN_NO_WARN
  416. select SYSCTL_ARCH_UNALIGN_ALLOW
  417. depends on ISA_ARCOMPACT
  418. help
  419. This enables misaligned 16 & 32 bit memory access from user space.
  420. Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
  421. potential bugs in code
  422. config HZ
  423. int "Timer Frequency"
  424. default 100
  425. config ARC_METAWARE_HLINK
  426. bool "Support for Metaware debugger assisted Host access"
  427. help
  428. This options allows a Linux userland apps to directly access
  429. host file system (open/creat/read/write etc) with help from
  430. Metaware Debugger. This can come in handy for Linux-host communication
  431. when there is no real usable peripheral such as EMAC.
  432. menuconfig ARC_DBG
  433. bool "ARC debugging"
  434. default y
  435. if ARC_DBG
  436. config ARC_DW2_UNWIND
  437. bool "Enable DWARF specific kernel stack unwind"
  438. default y
  439. select KALLSYMS
  440. help
  441. Compiles the kernel with DWARF unwind information and can be used
  442. to get stack backtraces.
  443. If you say Y here the resulting kernel image will be slightly larger
  444. but not slower, and it will give very useful debugging information.
  445. If you don't debug the kernel, you can say N, but we may not be able
  446. to solve problems without frame unwind information
  447. config ARC_DBG_JUMP_LABEL
  448. bool "Paranoid checks in Static Keys (jump labels) code"
  449. depends on JUMP_LABEL
  450. default y if STATIC_KEYS_SELFTEST
  451. help
  452. Enable paranoid checks and self-test of both ARC-specific and generic
  453. part of static keys (jump labels) related code.
  454. endif
  455. config BUILTIN_DTB_NAME
  456. string "Built in DTB"
  457. default "nsim_700"
  458. help
  459. Set the name of the DTB to embed in the vmlinux binary.
  460. endmenu # "ARC Architecture Configuration"
  461. config ARCH_FORCE_MAX_ORDER
  462. int "Maximum zone order"
  463. default "11" if ARC_HUGEPAGE_16M
  464. default "10"
  465. source "kernel/power/Kconfig"