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