162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciconfig ARC
762306a36Sopenharmony_ci	def_bool y
862306a36Sopenharmony_ci	select ARC_TIMERS
962306a36Sopenharmony_ci	select ARCH_HAS_CACHE_LINE_SIZE
1062306a36Sopenharmony_ci	select ARCH_HAS_DEBUG_VM_PGTABLE
1162306a36Sopenharmony_ci	select ARCH_HAS_DMA_PREP_COHERENT
1262306a36Sopenharmony_ci	select ARCH_HAS_PTE_SPECIAL
1362306a36Sopenharmony_ci	select ARCH_HAS_SETUP_DMA_OPS
1462306a36Sopenharmony_ci	select ARCH_HAS_SYNC_DMA_FOR_CPU
1562306a36Sopenharmony_ci	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
1662306a36Sopenharmony_ci	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
1762306a36Sopenharmony_ci	select ARCH_32BIT_OFF_T
1862306a36Sopenharmony_ci	select BUILDTIME_TABLE_SORT
1962306a36Sopenharmony_ci	select CLONE_BACKWARDS
2062306a36Sopenharmony_ci	select COMMON_CLK
2162306a36Sopenharmony_ci	select DMA_DIRECT_REMAP
2262306a36Sopenharmony_ci	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
2362306a36Sopenharmony_ci	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
2462306a36Sopenharmony_ci	select GENERIC_IRQ_SHOW
2562306a36Sopenharmony_ci	select GENERIC_PCI_IOMAP
2662306a36Sopenharmony_ci	select GENERIC_PENDING_IRQ if SMP
2762306a36Sopenharmony_ci	select GENERIC_SCHED_CLOCK
2862306a36Sopenharmony_ci	select GENERIC_SMP_IDLE_THREAD
2962306a36Sopenharmony_ci	select GENERIC_IOREMAP
3062306a36Sopenharmony_ci	select GENERIC_STRNCPY_FROM_USER if MMU
3162306a36Sopenharmony_ci	select GENERIC_STRNLEN_USER if MMU
3262306a36Sopenharmony_ci	select HAVE_ARCH_KGDB
3362306a36Sopenharmony_ci	select HAVE_ARCH_TRACEHOOK
3462306a36Sopenharmony_ci	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARC_MMU_V4
3562306a36Sopenharmony_ci	select HAVE_DEBUG_STACKOVERFLOW
3662306a36Sopenharmony_ci	select HAVE_DEBUG_KMEMLEAK
3762306a36Sopenharmony_ci	select HAVE_IOREMAP_PROT
3862306a36Sopenharmony_ci	select HAVE_KERNEL_GZIP
3962306a36Sopenharmony_ci	select HAVE_KERNEL_LZMA
4062306a36Sopenharmony_ci	select HAVE_KPROBES
4162306a36Sopenharmony_ci	select HAVE_KRETPROBES
4262306a36Sopenharmony_ci	select HAVE_REGS_AND_STACK_ACCESS_API
4362306a36Sopenharmony_ci	select HAVE_MOD_ARCH_SPECIFIC
4462306a36Sopenharmony_ci	select HAVE_PERF_EVENTS
4562306a36Sopenharmony_ci	select HAVE_SYSCALL_TRACEPOINTS
4662306a36Sopenharmony_ci	select IRQ_DOMAIN
4762306a36Sopenharmony_ci	select LOCK_MM_AND_FIND_VMA
4862306a36Sopenharmony_ci	select MODULES_USE_ELF_RELA
4962306a36Sopenharmony_ci	select OF
5062306a36Sopenharmony_ci	select OF_EARLY_FLATTREE
5162306a36Sopenharmony_ci	select PCI_SYSCALL if PCI
5262306a36Sopenharmony_ci	select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
5362306a36Sopenharmony_ci	select HAVE_ARCH_JUMP_LABEL if ISA_ARCV2 && !CPU_ENDIAN_BE32
5462306a36Sopenharmony_ci	select TRACE_IRQFLAGS_SUPPORT
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciconfig LOCKDEP_SUPPORT
5762306a36Sopenharmony_ci	def_bool y
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciconfig SCHED_OMIT_FRAME_POINTER
6062306a36Sopenharmony_ci	def_bool y
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciconfig GENERIC_CSUM
6362306a36Sopenharmony_ci	def_bool y
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciconfig ARCH_FLATMEM_ENABLE
6662306a36Sopenharmony_ci	def_bool y
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ciconfig MMU
6962306a36Sopenharmony_ci	def_bool y
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciconfig NO_IOPORT_MAP
7262306a36Sopenharmony_ci	def_bool y
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciconfig GENERIC_CALIBRATE_DELAY
7562306a36Sopenharmony_ci	def_bool y
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciconfig GENERIC_HWEIGHT
7862306a36Sopenharmony_ci	def_bool y
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciconfig STACKTRACE_SUPPORT
8162306a36Sopenharmony_ci	def_bool y
8262306a36Sopenharmony_ci	select STACKTRACE
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_cimenu "ARC Architecture Configuration"
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_cimenu "ARC Platform/SoC/Board"
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_cisource "arch/arc/plat-tb10x/Kconfig"
8962306a36Sopenharmony_cisource "arch/arc/plat-axs10x/Kconfig"
9062306a36Sopenharmony_cisource "arch/arc/plat-hsdk/Kconfig"
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ciendmenu
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_cichoice
9562306a36Sopenharmony_ci	prompt "ARC Instruction Set"
9662306a36Sopenharmony_ci	default ISA_ARCV2
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciconfig ISA_ARCOMPACT
9962306a36Sopenharmony_ci	bool "ARCompact ISA"
10062306a36Sopenharmony_ci	select CPU_NO_EFFICIENT_FFS
10162306a36Sopenharmony_ci	help
10262306a36Sopenharmony_ci	  The original ARC ISA of ARC600/700 cores
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciconfig ISA_ARCV2
10562306a36Sopenharmony_ci	bool "ARC ISA v2"
10662306a36Sopenharmony_ci	select ARC_TIMERS_64BIT
10762306a36Sopenharmony_ci	help
10862306a36Sopenharmony_ci	  ISA for the Next Generation ARC-HS cores
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciendchoice
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_cimenu "ARC CPU Configuration"
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_cichoice
11562306a36Sopenharmony_ci	prompt "ARC Core"
11662306a36Sopenharmony_ci	default ARC_CPU_770 if ISA_ARCOMPACT
11762306a36Sopenharmony_ci	default ARC_CPU_HS if ISA_ARCV2
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciconfig ARC_CPU_770
12062306a36Sopenharmony_ci	bool "ARC770"
12162306a36Sopenharmony_ci	depends on ISA_ARCOMPACT
12262306a36Sopenharmony_ci	select ARC_HAS_SWAPE
12362306a36Sopenharmony_ci	help
12462306a36Sopenharmony_ci	  Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
12562306a36Sopenharmony_ci	  This core has a bunch of cool new features:
12662306a36Sopenharmony_ci	  -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
12762306a36Sopenharmony_ci	           Shared Address Spaces (for sharing TLB entries in MMU)
12862306a36Sopenharmony_ci	  -Caches: New Prog Model, Region Flush
12962306a36Sopenharmony_ci	  -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ciconfig ARC_CPU_HS
13262306a36Sopenharmony_ci	bool "ARC-HS"
13362306a36Sopenharmony_ci	depends on ISA_ARCV2
13462306a36Sopenharmony_ci	help
13562306a36Sopenharmony_ci	  Support for ARC HS38x Cores based on ARCv2 ISA
13662306a36Sopenharmony_ci	  The notable features are:
13762306a36Sopenharmony_ci	    - SMP configurations of up to 4 cores with coherency
13862306a36Sopenharmony_ci	    - Optional L2 Cache and IO-Coherency
13962306a36Sopenharmony_ci	    - Revised Interrupt Architecture (multiple priorites, reg banks,
14062306a36Sopenharmony_ci	        auto stack switch, auto regfile save/restore)
14162306a36Sopenharmony_ci	    - MMUv4 (PIPT dcache, Huge Pages)
14262306a36Sopenharmony_ci	    - Instructions for
14362306a36Sopenharmony_ci		* 64bit load/store: LDD, STD
14462306a36Sopenharmony_ci		* Hardware assisted divide/remainder: DIV, REM
14562306a36Sopenharmony_ci		* Function prologue/epilogue: ENTER_S, LEAVE_S
14662306a36Sopenharmony_ci		* IRQ enable/disable: CLRI, SETI
14762306a36Sopenharmony_ci		* pop count: FFS, FLS
14862306a36Sopenharmony_ci		* SETcc, BMSKN, XBFU...
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ciendchoice
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ciconfig ARC_TUNE_MCPU
15362306a36Sopenharmony_ci	string "Override default -mcpu compiler flag"
15462306a36Sopenharmony_ci	default ""
15562306a36Sopenharmony_ci	help
15662306a36Sopenharmony_ci	  Override default -mcpu=xxx compiler flag (which is set depending on
15762306a36Sopenharmony_ci	  the ISA version) with the specified value.
15862306a36Sopenharmony_ci	  NOTE: If specified flag isn't supported by current compiler the
15962306a36Sopenharmony_ci	  ISA default value will be used as a fallback.
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ciconfig CPU_BIG_ENDIAN
16262306a36Sopenharmony_ci	bool "Enable Big Endian Mode"
16362306a36Sopenharmony_ci	help
16462306a36Sopenharmony_ci	  Build kernel for Big Endian Mode of ARC CPU
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ciconfig SMP
16762306a36Sopenharmony_ci	bool "Symmetric Multi-Processing"
16862306a36Sopenharmony_ci	select ARC_MCIP if ISA_ARCV2
16962306a36Sopenharmony_ci	help
17062306a36Sopenharmony_ci	  This enables support for systems with more than one CPU.
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ciif SMP
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ciconfig NR_CPUS
17562306a36Sopenharmony_ci	int "Maximum number of CPUs (2-4096)"
17662306a36Sopenharmony_ci	range 2 4096
17762306a36Sopenharmony_ci	default "4"
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ciconfig ARC_SMP_HALT_ON_RESET
18062306a36Sopenharmony_ci	bool "Enable Halt-on-reset boot mode"
18162306a36Sopenharmony_ci	help
18262306a36Sopenharmony_ci	  In SMP configuration cores can be configured as Halt-on-reset
18362306a36Sopenharmony_ci	  or they could all start at same time. For Halt-on-reset, non
18462306a36Sopenharmony_ci	  masters are parked until Master kicks them so they can start off
18562306a36Sopenharmony_ci	  at designated entry point. For other case, all jump to common
18662306a36Sopenharmony_ci	  entry point and spin wait for Master's signal.
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ciendif #SMP
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ciconfig ARC_MCIP
19162306a36Sopenharmony_ci	bool "ARConnect Multicore IP (MCIP) Support "
19262306a36Sopenharmony_ci	depends on ISA_ARCV2
19362306a36Sopenharmony_ci	default y if SMP
19462306a36Sopenharmony_ci	help
19562306a36Sopenharmony_ci	  This IP block enables SMP in ARC-HS38 cores.
19662306a36Sopenharmony_ci	  It provides for cross-core interrupts, multi-core debug
19762306a36Sopenharmony_ci	  hardware semaphores, shared memory,....
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_cimenuconfig ARC_CACHE
20062306a36Sopenharmony_ci	bool "Enable Cache Support"
20162306a36Sopenharmony_ci	default y
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ciif ARC_CACHE
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ciconfig ARC_CACHE_LINE_SHIFT
20662306a36Sopenharmony_ci	int "Cache Line Length (as power of 2)"
20762306a36Sopenharmony_ci	range 5 7
20862306a36Sopenharmony_ci	default "6"
20962306a36Sopenharmony_ci	help
21062306a36Sopenharmony_ci	  Starting with ARC700 4.9, Cache line length is configurable,
21162306a36Sopenharmony_ci	  This option specifies "N", with Line-len = 2 power N
21262306a36Sopenharmony_ci	  So line lengths of 32, 64, 128 are specified by 5,6,7, respectively
21362306a36Sopenharmony_ci	  Linux only supports same line lengths for I and D caches.
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ciconfig ARC_HAS_ICACHE
21662306a36Sopenharmony_ci	bool "Use Instruction Cache"
21762306a36Sopenharmony_ci	default y
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ciconfig ARC_HAS_DCACHE
22062306a36Sopenharmony_ci	bool "Use Data Cache"
22162306a36Sopenharmony_ci	default y
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ciconfig ARC_CACHE_PAGES
22462306a36Sopenharmony_ci	bool "Per Page Cache Control"
22562306a36Sopenharmony_ci	default y
22662306a36Sopenharmony_ci	depends on ARC_HAS_ICACHE || ARC_HAS_DCACHE
22762306a36Sopenharmony_ci	help
22862306a36Sopenharmony_ci	  This can be used to over-ride the global I/D Cache Enable on a
22962306a36Sopenharmony_ci	  per-page basis (but only for pages accessed via MMU such as
23062306a36Sopenharmony_ci	  Kernel Virtual address or User Virtual Address)
23162306a36Sopenharmony_ci	  TLB entries have a per-page Cache Enable Bit.
23262306a36Sopenharmony_ci	  Note that Global I/D ENABLE + Per Page DISABLE works but corollary
23362306a36Sopenharmony_ci	  Global DISABLE + Per Page ENABLE won't work
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ciconfig ARC_CACHE_VIPT_ALIASING
23662306a36Sopenharmony_ci	bool "Support VIPT Aliasing D$"
23762306a36Sopenharmony_ci	depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
23862306a36Sopenharmony_ci
23962306a36Sopenharmony_ciendif #ARC_CACHE
24062306a36Sopenharmony_ci
24162306a36Sopenharmony_ciconfig ARC_HAS_ICCM
24262306a36Sopenharmony_ci	bool "Use ICCM"
24362306a36Sopenharmony_ci	help
24462306a36Sopenharmony_ci	  Single Cycle RAMS to store Fast Path Code
24562306a36Sopenharmony_ci
24662306a36Sopenharmony_ciconfig ARC_ICCM_SZ
24762306a36Sopenharmony_ci	int "ICCM Size in KB"
24862306a36Sopenharmony_ci	default "64"
24962306a36Sopenharmony_ci	depends on ARC_HAS_ICCM
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ciconfig ARC_HAS_DCCM
25262306a36Sopenharmony_ci	bool "Use DCCM"
25362306a36Sopenharmony_ci	help
25462306a36Sopenharmony_ci	  Single Cycle RAMS to store Fast Path Data
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ciconfig ARC_DCCM_SZ
25762306a36Sopenharmony_ci	int "DCCM Size in KB"
25862306a36Sopenharmony_ci	default "64"
25962306a36Sopenharmony_ci	depends on ARC_HAS_DCCM
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ciconfig ARC_DCCM_BASE
26262306a36Sopenharmony_ci	hex "DCCM map address"
26362306a36Sopenharmony_ci	default "0xA0000000"
26462306a36Sopenharmony_ci	depends on ARC_HAS_DCCM
26562306a36Sopenharmony_ci
26662306a36Sopenharmony_cichoice
26762306a36Sopenharmony_ci	prompt "MMU Version"
26862306a36Sopenharmony_ci	default ARC_MMU_V3 if ISA_ARCOMPACT
26962306a36Sopenharmony_ci	default ARC_MMU_V4 if ISA_ARCV2
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ciconfig ARC_MMU_V3
27262306a36Sopenharmony_ci	bool "MMU v3"
27362306a36Sopenharmony_ci	depends on ISA_ARCOMPACT
27462306a36Sopenharmony_ci	help
27562306a36Sopenharmony_ci	  Introduced with ARC700 4.10: New Features
27662306a36Sopenharmony_ci	  Variable Page size (1k-16k), var JTLB size 128 x (2 or 4)
27762306a36Sopenharmony_ci	  Shared Address Spaces (SASID)
27862306a36Sopenharmony_ci
27962306a36Sopenharmony_ciconfig ARC_MMU_V4
28062306a36Sopenharmony_ci	bool "MMU v4"
28162306a36Sopenharmony_ci	depends on ISA_ARCV2
28262306a36Sopenharmony_ci
28362306a36Sopenharmony_ciendchoice
28462306a36Sopenharmony_ci
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_cichoice
28762306a36Sopenharmony_ci	prompt "MMU Page Size"
28862306a36Sopenharmony_ci	default ARC_PAGE_SIZE_8K
28962306a36Sopenharmony_ci
29062306a36Sopenharmony_ciconfig ARC_PAGE_SIZE_8K
29162306a36Sopenharmony_ci	bool "8KB"
29262306a36Sopenharmony_ci	help
29362306a36Sopenharmony_ci	  Choose between 8k vs 16k
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ciconfig ARC_PAGE_SIZE_16K
29662306a36Sopenharmony_ci	bool "16KB"
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ciconfig ARC_PAGE_SIZE_4K
29962306a36Sopenharmony_ci	bool "4KB"
30062306a36Sopenharmony_ci	depends on ARC_MMU_V3 || ARC_MMU_V4
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_ciendchoice
30362306a36Sopenharmony_ci
30462306a36Sopenharmony_cichoice
30562306a36Sopenharmony_ci	prompt "MMU Super Page Size"
30662306a36Sopenharmony_ci	depends on ISA_ARCV2 && TRANSPARENT_HUGEPAGE
30762306a36Sopenharmony_ci	default ARC_HUGEPAGE_2M
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ciconfig ARC_HUGEPAGE_2M
31062306a36Sopenharmony_ci	bool "2MB"
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ciconfig ARC_HUGEPAGE_16M
31362306a36Sopenharmony_ci	bool "16MB"
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ciendchoice
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ciconfig PGTABLE_LEVELS
31862306a36Sopenharmony_ci	int "Number of Page table levels"
31962306a36Sopenharmony_ci	default 2
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ciconfig ARC_COMPACT_IRQ_LEVELS
32262306a36Sopenharmony_ci	depends on ISA_ARCOMPACT
32362306a36Sopenharmony_ci	bool "Setup Timer IRQ as high Priority"
32462306a36Sopenharmony_ci	# if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
32562306a36Sopenharmony_ci	depends on !SMP
32662306a36Sopenharmony_ci
32762306a36Sopenharmony_ciconfig ARC_FPU_SAVE_RESTORE
32862306a36Sopenharmony_ci	bool "Enable FPU state persistence across context switch"
32962306a36Sopenharmony_ci	help
33062306a36Sopenharmony_ci	  ARCompact FPU has internal registers to assist with Double precision
33162306a36Sopenharmony_ci	  Floating Point operations. There are control and stauts registers
33262306a36Sopenharmony_ci	  for floating point exceptions and rounding modes. These are
33362306a36Sopenharmony_ci	  preserved across task context switch when enabled.
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ciconfig ARC_CANT_LLSC
33662306a36Sopenharmony_ci	def_bool n
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ciconfig ARC_HAS_LLSC
33962306a36Sopenharmony_ci	bool "Insn: LLOCK/SCOND (efficient atomic ops)"
34062306a36Sopenharmony_ci	default y
34162306a36Sopenharmony_ci	depends on !ARC_CANT_LLSC
34262306a36Sopenharmony_ci
34362306a36Sopenharmony_ciconfig ARC_HAS_SWAPE
34462306a36Sopenharmony_ci	bool "Insn: SWAPE (endian-swap)"
34562306a36Sopenharmony_ci	default y
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ciif ISA_ARCV2
34862306a36Sopenharmony_ci
34962306a36Sopenharmony_ciconfig ARC_USE_UNALIGNED_MEM_ACCESS
35062306a36Sopenharmony_ci	bool "Enable unaligned access in HW"
35162306a36Sopenharmony_ci	default y
35262306a36Sopenharmony_ci	select HAVE_EFFICIENT_UNALIGNED_ACCESS
35362306a36Sopenharmony_ci	help
35462306a36Sopenharmony_ci	  The ARC HS architecture supports unaligned memory access
35562306a36Sopenharmony_ci	  which is disabled by default. Enable unaligned access in
35662306a36Sopenharmony_ci	  hardware and use software to use it
35762306a36Sopenharmony_ci
35862306a36Sopenharmony_ciconfig ARC_HAS_LL64
35962306a36Sopenharmony_ci	bool "Insn: 64bit LDD/STD"
36062306a36Sopenharmony_ci	help
36162306a36Sopenharmony_ci	  Enable gcc to generate 64-bit load/store instructions
36262306a36Sopenharmony_ci	  ISA mandates even/odd registers to allow encoding of two
36362306a36Sopenharmony_ci	  dest operands with 2 possible source operands.
36462306a36Sopenharmony_ci	default y
36562306a36Sopenharmony_ci
36662306a36Sopenharmony_ciconfig ARC_HAS_DIV_REM
36762306a36Sopenharmony_ci	bool "Insn: div, divu, rem, remu"
36862306a36Sopenharmony_ci	default y
36962306a36Sopenharmony_ci
37062306a36Sopenharmony_ciconfig ARC_HAS_ACCL_REGS
37162306a36Sopenharmony_ci	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
37262306a36Sopenharmony_ci	default y
37362306a36Sopenharmony_ci	help
37462306a36Sopenharmony_ci	  Depending on the configuration, CPU can contain accumulator reg-pair
37562306a36Sopenharmony_ci	  (also referred to as r58:r59). These can also be used by gcc as GPR so
37662306a36Sopenharmony_ci	  kernel needs to save/restore per process
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ciconfig ARC_DSP_HANDLED
37962306a36Sopenharmony_ci	def_bool n
38062306a36Sopenharmony_ci
38162306a36Sopenharmony_ciconfig ARC_DSP_SAVE_RESTORE_REGS
38262306a36Sopenharmony_ci	def_bool n
38362306a36Sopenharmony_ci
38462306a36Sopenharmony_cichoice
38562306a36Sopenharmony_ci	prompt "DSP support"
38662306a36Sopenharmony_ci	default ARC_DSP_NONE
38762306a36Sopenharmony_ci	help
38862306a36Sopenharmony_ci	  Depending on the configuration, CPU can contain DSP registers
38962306a36Sopenharmony_ci	  (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL).
39062306a36Sopenharmony_ci	  Below are options describing how to handle these registers in
39162306a36Sopenharmony_ci	  interrupt entry / exit and in context switch.
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_ciconfig ARC_DSP_NONE
39462306a36Sopenharmony_ci	bool "No DSP extension presence in HW"
39562306a36Sopenharmony_ci	help
39662306a36Sopenharmony_ci	  No DSP extension presence in HW
39762306a36Sopenharmony_ci
39862306a36Sopenharmony_ciconfig ARC_DSP_KERNEL
39962306a36Sopenharmony_ci	bool "DSP extension in HW, no support for userspace"
40062306a36Sopenharmony_ci	select ARC_HAS_ACCL_REGS
40162306a36Sopenharmony_ci	select ARC_DSP_HANDLED
40262306a36Sopenharmony_ci	help
40362306a36Sopenharmony_ci	  DSP extension presence in HW, no support for DSP-enabled userspace
40462306a36Sopenharmony_ci	  applications. We don't save / restore DSP registers and only do
40562306a36Sopenharmony_ci	  some minimal preparations so userspace won't be able to break kernel
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ciconfig ARC_DSP_USERSPACE
40862306a36Sopenharmony_ci	bool "Support DSP for userspace apps"
40962306a36Sopenharmony_ci	select ARC_HAS_ACCL_REGS
41062306a36Sopenharmony_ci	select ARC_DSP_HANDLED
41162306a36Sopenharmony_ci	select ARC_DSP_SAVE_RESTORE_REGS
41262306a36Sopenharmony_ci	help
41362306a36Sopenharmony_ci	  DSP extension presence in HW, support save / restore DSP registers to
41462306a36Sopenharmony_ci	  run DSP-enabled userspace applications
41562306a36Sopenharmony_ci
41662306a36Sopenharmony_ciconfig ARC_DSP_AGU_USERSPACE
41762306a36Sopenharmony_ci	bool "Support DSP with AGU for userspace apps"
41862306a36Sopenharmony_ci	select ARC_HAS_ACCL_REGS
41962306a36Sopenharmony_ci	select ARC_DSP_HANDLED
42062306a36Sopenharmony_ci	select ARC_DSP_SAVE_RESTORE_REGS
42162306a36Sopenharmony_ci	help
42262306a36Sopenharmony_ci	  DSP and AGU extensions presence in HW, support save / restore DSP
42362306a36Sopenharmony_ci	  and AGU registers to run DSP-enabled userspace applications
42462306a36Sopenharmony_ciendchoice
42562306a36Sopenharmony_ci
42662306a36Sopenharmony_ciconfig ARC_IRQ_NO_AUTOSAVE
42762306a36Sopenharmony_ci	bool "Disable hardware autosave regfile on interrupts"
42862306a36Sopenharmony_ci	default n
42962306a36Sopenharmony_ci	help
43062306a36Sopenharmony_ci	  On HS cores, taken interrupt auto saves the regfile on stack.
43162306a36Sopenharmony_ci	  This is programmable and can be optionally disabled in which case
43262306a36Sopenharmony_ci	  software INTERRUPT_PROLOGUE/EPILGUE do the needed work
43362306a36Sopenharmony_ci
43462306a36Sopenharmony_ciconfig ARC_LPB_DISABLE
43562306a36Sopenharmony_ci	bool "Disable loop buffer (LPB)"
43662306a36Sopenharmony_ci	help
43762306a36Sopenharmony_ci	  On HS cores, loop buffer (LPB) is programmable in runtime and can
43862306a36Sopenharmony_ci	  be optionally disabled.
43962306a36Sopenharmony_ci
44062306a36Sopenharmony_ciendif # ISA_ARCV2
44162306a36Sopenharmony_ci
44262306a36Sopenharmony_ciendmenu   # "ARC CPU Configuration"
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ciconfig LINUX_LINK_BASE
44562306a36Sopenharmony_ci	hex "Kernel link address"
44662306a36Sopenharmony_ci	default "0x80000000"
44762306a36Sopenharmony_ci	help
44862306a36Sopenharmony_ci	  ARC700 divides the 32 bit phy address space into two equal halves
44962306a36Sopenharmony_ci	  -Lower 2G (0 - 0x7FFF_FFFF ) is user virtual, translated by MMU
45062306a36Sopenharmony_ci	  -Upper 2G (0x8000_0000 onwards) is untranslated, for kernel
45162306a36Sopenharmony_ci	  Typically Linux kernel is linked at the start of untransalted addr,
45262306a36Sopenharmony_ci	  hence the default value of 0x8zs.
45362306a36Sopenharmony_ci	  However some customers have peripherals mapped at this addr, so
45462306a36Sopenharmony_ci	  Linux needs to be scooted a bit.
45562306a36Sopenharmony_ci	  If you don't know what the above means, leave this setting alone.
45662306a36Sopenharmony_ci	  This needs to match memory start address specified in Device Tree
45762306a36Sopenharmony_ci
45862306a36Sopenharmony_ciconfig LINUX_RAM_BASE
45962306a36Sopenharmony_ci	hex "RAM base address"
46062306a36Sopenharmony_ci	default LINUX_LINK_BASE
46162306a36Sopenharmony_ci	help
46262306a36Sopenharmony_ci	  By default Linux is linked at base of RAM. However in some special
46362306a36Sopenharmony_ci	  cases (such as HSDK), Linux can't be linked at start of DDR, hence
46462306a36Sopenharmony_ci	  this option.
46562306a36Sopenharmony_ci
46662306a36Sopenharmony_ciconfig HIGHMEM
46762306a36Sopenharmony_ci	bool "High Memory Support"
46862306a36Sopenharmony_ci	select HAVE_ARCH_PFN_VALID
46962306a36Sopenharmony_ci	select KMAP_LOCAL
47062306a36Sopenharmony_ci	help
47162306a36Sopenharmony_ci	  With ARC 2G:2G address split, only upper 2G is directly addressable by
47262306a36Sopenharmony_ci	  kernel. Enable this to potentially allow access to rest of 2G and PAE
47362306a36Sopenharmony_ci	  in future
47462306a36Sopenharmony_ci
47562306a36Sopenharmony_ciconfig ARC_HAS_PAE40
47662306a36Sopenharmony_ci	bool "Support for the 40-bit Physical Address Extension"
47762306a36Sopenharmony_ci	depends on ISA_ARCV2
47862306a36Sopenharmony_ci	select HIGHMEM
47962306a36Sopenharmony_ci	select PHYS_ADDR_T_64BIT
48062306a36Sopenharmony_ci	help
48162306a36Sopenharmony_ci	  Enable access to physical memory beyond 4G, only supported on
48262306a36Sopenharmony_ci	  ARC cores with 40 bit Physical Addressing support
48362306a36Sopenharmony_ci
48462306a36Sopenharmony_ciconfig ARC_KVADDR_SIZE
48562306a36Sopenharmony_ci	int "Kernel Virtual Address Space size (MB)"
48662306a36Sopenharmony_ci	range 0 512
48762306a36Sopenharmony_ci	default "256"
48862306a36Sopenharmony_ci	help
48962306a36Sopenharmony_ci	  The kernel address space is carved out of 256MB of translated address
49062306a36Sopenharmony_ci	  space for catering to vmalloc, modules, pkmap, fixmap. This however may
49162306a36Sopenharmony_ci	  not suffice vmalloc requirements of a 4K CPU EZChip system. So allow
49262306a36Sopenharmony_ci	  this to be stretched to 512 MB (by extending into the reserved
49362306a36Sopenharmony_ci	  kernel-user gutter)
49462306a36Sopenharmony_ci
49562306a36Sopenharmony_ciconfig ARC_CURR_IN_REG
49662306a36Sopenharmony_ci	bool "cache current task pointer in gp"
49762306a36Sopenharmony_ci	default y
49862306a36Sopenharmony_ci	help
49962306a36Sopenharmony_ci	  This reserves gp register to point to Current Task in
50062306a36Sopenharmony_ci	  kernel mode eliding memory access for each access
50162306a36Sopenharmony_ci
50262306a36Sopenharmony_ci
50362306a36Sopenharmony_ciconfig ARC_EMUL_UNALIGNED
50462306a36Sopenharmony_ci	bool "Emulate unaligned memory access (userspace only)"
50562306a36Sopenharmony_ci	select SYSCTL_ARCH_UNALIGN_NO_WARN
50662306a36Sopenharmony_ci	select SYSCTL_ARCH_UNALIGN_ALLOW
50762306a36Sopenharmony_ci	depends on ISA_ARCOMPACT
50862306a36Sopenharmony_ci	help
50962306a36Sopenharmony_ci	  This enables misaligned 16 & 32 bit memory access from user space.
51062306a36Sopenharmony_ci	  Use ONLY-IF-ABS-NECESSARY as it will be very slow and also can hide
51162306a36Sopenharmony_ci	  potential bugs in code
51262306a36Sopenharmony_ci
51362306a36Sopenharmony_ciconfig HZ
51462306a36Sopenharmony_ci	int "Timer Frequency"
51562306a36Sopenharmony_ci	default 100
51662306a36Sopenharmony_ci
51762306a36Sopenharmony_ciconfig ARC_METAWARE_HLINK
51862306a36Sopenharmony_ci	bool "Support for Metaware debugger assisted Host access"
51962306a36Sopenharmony_ci	help
52062306a36Sopenharmony_ci	  This options allows a Linux userland apps to directly access
52162306a36Sopenharmony_ci	  host file system (open/creat/read/write etc) with help from
52262306a36Sopenharmony_ci	  Metaware Debugger. This can come in handy for Linux-host communication
52362306a36Sopenharmony_ci	  when there is no real usable peripheral such as EMAC.
52462306a36Sopenharmony_ci
52562306a36Sopenharmony_cimenuconfig ARC_DBG
52662306a36Sopenharmony_ci	bool "ARC debugging"
52762306a36Sopenharmony_ci	default y
52862306a36Sopenharmony_ci
52962306a36Sopenharmony_ciif ARC_DBG
53062306a36Sopenharmony_ci
53162306a36Sopenharmony_ciconfig ARC_DW2_UNWIND
53262306a36Sopenharmony_ci	bool "Enable DWARF specific kernel stack unwind"
53362306a36Sopenharmony_ci	default y
53462306a36Sopenharmony_ci	select KALLSYMS
53562306a36Sopenharmony_ci	help
53662306a36Sopenharmony_ci	  Compiles the kernel with DWARF unwind information and can be used
53762306a36Sopenharmony_ci	  to get stack backtraces.
53862306a36Sopenharmony_ci
53962306a36Sopenharmony_ci	  If you say Y here the resulting kernel image will be slightly larger
54062306a36Sopenharmony_ci	  but not slower, and it will give very useful debugging information.
54162306a36Sopenharmony_ci	  If you don't debug the kernel, you can say N, but we may not be able
54262306a36Sopenharmony_ci	  to solve problems without frame unwind information
54362306a36Sopenharmony_ci
54462306a36Sopenharmony_ciconfig ARC_DBG_JUMP_LABEL
54562306a36Sopenharmony_ci	bool "Paranoid checks in Static Keys (jump labels) code"
54662306a36Sopenharmony_ci	depends on JUMP_LABEL
54762306a36Sopenharmony_ci	default y if STATIC_KEYS_SELFTEST
54862306a36Sopenharmony_ci	help
54962306a36Sopenharmony_ci	  Enable paranoid checks and self-test of both ARC-specific and generic
55062306a36Sopenharmony_ci	  part of static keys (jump labels) related code.
55162306a36Sopenharmony_ciendif
55262306a36Sopenharmony_ci
55362306a36Sopenharmony_ciconfig ARC_BUILTIN_DTB_NAME
55462306a36Sopenharmony_ci	string "Built in DTB"
55562306a36Sopenharmony_ci	help
55662306a36Sopenharmony_ci	  Set the name of the DTB to embed in the vmlinux binary
55762306a36Sopenharmony_ci	  Leaving it blank selects the minimal "skeleton" dtb
55862306a36Sopenharmony_ci
55962306a36Sopenharmony_ciendmenu	 # "ARC Architecture Configuration"
56062306a36Sopenharmony_ci
56162306a36Sopenharmony_ciconfig ARCH_FORCE_MAX_ORDER
56262306a36Sopenharmony_ci	int "Maximum zone order"
56362306a36Sopenharmony_ci	default "11" if ARC_HUGEPAGE_16M
56462306a36Sopenharmony_ci	default "10"
56562306a36Sopenharmony_ci
56662306a36Sopenharmony_cisource "kernel/power/Kconfig"
567