xref: /OK3568_Linux_fs/kernel/arch/xtensa/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyunconfig XTENSA
3*4882a593Smuzhiyun	def_bool y
4*4882a593Smuzhiyun	select ARCH_32BIT_OFF_T
5*4882a593Smuzhiyun	select ARCH_HAS_BINFMT_FLAT if !MMU
6*4882a593Smuzhiyun	select ARCH_HAS_DMA_PREP_COHERENT if MMU
7*4882a593Smuzhiyun	select ARCH_HAS_SYNC_DMA_FOR_CPU if MMU
8*4882a593Smuzhiyun	select ARCH_HAS_SYNC_DMA_FOR_DEVICE if MMU
9*4882a593Smuzhiyun	select ARCH_HAS_DMA_SET_UNCACHED if MMU
10*4882a593Smuzhiyun	select ARCH_USE_QUEUED_RWLOCKS
11*4882a593Smuzhiyun	select ARCH_USE_QUEUED_SPINLOCKS
12*4882a593Smuzhiyun	select ARCH_WANT_FRAME_POINTERS
13*4882a593Smuzhiyun	select ARCH_WANT_IPC_PARSE_VERSION
14*4882a593Smuzhiyun	select BUILDTIME_TABLE_SORT
15*4882a593Smuzhiyun	select CLONE_BACKWARDS
16*4882a593Smuzhiyun	select COMMON_CLK
17*4882a593Smuzhiyun	select DMA_REMAP if MMU
18*4882a593Smuzhiyun	select GENERIC_ATOMIC64
19*4882a593Smuzhiyun	select GENERIC_CLOCKEVENTS
20*4882a593Smuzhiyun	select GENERIC_IRQ_SHOW
21*4882a593Smuzhiyun	select GENERIC_PCI_IOMAP
22*4882a593Smuzhiyun	select GENERIC_SCHED_CLOCK
23*4882a593Smuzhiyun	select GENERIC_STRNCPY_FROM_USER if KASAN
24*4882a593Smuzhiyun	select HAVE_ARCH_AUDITSYSCALL
25*4882a593Smuzhiyun	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
26*4882a593Smuzhiyun	select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
27*4882a593Smuzhiyun	select HAVE_ARCH_SECCOMP_FILTER
28*4882a593Smuzhiyun	select HAVE_ARCH_TRACEHOOK
29*4882a593Smuzhiyun	select HAVE_DEBUG_KMEMLEAK
30*4882a593Smuzhiyun	select HAVE_DMA_CONTIGUOUS
31*4882a593Smuzhiyun	select HAVE_EXIT_THREAD
32*4882a593Smuzhiyun	select HAVE_FUNCTION_TRACER
33*4882a593Smuzhiyun	select HAVE_FUTEX_CMPXCHG if !MMU && FUTEX
34*4882a593Smuzhiyun	select HAVE_HW_BREAKPOINT if PERF_EVENTS
35*4882a593Smuzhiyun	select HAVE_IRQ_TIME_ACCOUNTING
36*4882a593Smuzhiyun	select HAVE_OPROFILE
37*4882a593Smuzhiyun	select HAVE_PCI
38*4882a593Smuzhiyun	select HAVE_PERF_EVENTS
39*4882a593Smuzhiyun	select HAVE_STACKPROTECTOR
40*4882a593Smuzhiyun	select HAVE_SYSCALL_TRACEPOINTS
41*4882a593Smuzhiyun	select IRQ_DOMAIN
42*4882a593Smuzhiyun	select MODULES_USE_ELF_RELA
43*4882a593Smuzhiyun	select PERF_USE_VMALLOC
44*4882a593Smuzhiyun	select SET_FS
45*4882a593Smuzhiyun	select VIRT_TO_BUS
46*4882a593Smuzhiyun	help
47*4882a593Smuzhiyun	  Xtensa processors are 32-bit RISC machines designed by Tensilica
48*4882a593Smuzhiyun	  primarily for embedded systems.  These processors are both
49*4882a593Smuzhiyun	  configurable and extensible.  The Linux port to the Xtensa
50*4882a593Smuzhiyun	  architecture supports all processor configurations and extensions,
51*4882a593Smuzhiyun	  with reasonable minimum requirements.  The Xtensa Linux project has
52*4882a593Smuzhiyun	  a home page at <http://www.linux-xtensa.org/>.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunconfig GENERIC_HWEIGHT
55*4882a593Smuzhiyun	def_bool y
56*4882a593Smuzhiyun
57*4882a593Smuzhiyunconfig ARCH_HAS_ILOG2_U32
58*4882a593Smuzhiyun	def_bool n
59*4882a593Smuzhiyun
60*4882a593Smuzhiyunconfig ARCH_HAS_ILOG2_U64
61*4882a593Smuzhiyun	def_bool n
62*4882a593Smuzhiyun
63*4882a593Smuzhiyunconfig NO_IOPORT_MAP
64*4882a593Smuzhiyun	def_bool n
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunconfig HZ
67*4882a593Smuzhiyun	int
68*4882a593Smuzhiyun	default 100
69*4882a593Smuzhiyun
70*4882a593Smuzhiyunconfig LOCKDEP_SUPPORT
71*4882a593Smuzhiyun	def_bool y
72*4882a593Smuzhiyun
73*4882a593Smuzhiyunconfig STACKTRACE_SUPPORT
74*4882a593Smuzhiyun	def_bool y
75*4882a593Smuzhiyun
76*4882a593Smuzhiyunconfig TRACE_IRQFLAGS_SUPPORT
77*4882a593Smuzhiyun	def_bool y
78*4882a593Smuzhiyun
79*4882a593Smuzhiyunconfig MMU
80*4882a593Smuzhiyun	def_bool n
81*4882a593Smuzhiyun
82*4882a593Smuzhiyunconfig HAVE_XTENSA_GPIO32
83*4882a593Smuzhiyun	def_bool n
84*4882a593Smuzhiyun
85*4882a593Smuzhiyunconfig KASAN_SHADOW_OFFSET
86*4882a593Smuzhiyun	hex
87*4882a593Smuzhiyun	default 0x6e400000
88*4882a593Smuzhiyun
89*4882a593Smuzhiyunmenu "Processor type and features"
90*4882a593Smuzhiyun
91*4882a593Smuzhiyunchoice
92*4882a593Smuzhiyun	prompt "Xtensa Processor Configuration"
93*4882a593Smuzhiyun	default XTENSA_VARIANT_FSF
94*4882a593Smuzhiyun
95*4882a593Smuzhiyunconfig XTENSA_VARIANT_FSF
96*4882a593Smuzhiyun	bool "fsf - default (not generic) configuration"
97*4882a593Smuzhiyun	select MMU
98*4882a593Smuzhiyun
99*4882a593Smuzhiyunconfig XTENSA_VARIANT_DC232B
100*4882a593Smuzhiyun	bool "dc232b - Diamond 232L Standard Core Rev.B (LE)"
101*4882a593Smuzhiyun	select MMU
102*4882a593Smuzhiyun	select HAVE_XTENSA_GPIO32
103*4882a593Smuzhiyun	help
104*4882a593Smuzhiyun	  This variant refers to Tensilica's Diamond 232L Standard core Rev.B (LE).
105*4882a593Smuzhiyun
106*4882a593Smuzhiyunconfig XTENSA_VARIANT_DC233C
107*4882a593Smuzhiyun	bool "dc233c - Diamond 233L Standard Core Rev.C (LE)"
108*4882a593Smuzhiyun	select MMU
109*4882a593Smuzhiyun	select HAVE_XTENSA_GPIO32
110*4882a593Smuzhiyun	help
111*4882a593Smuzhiyun	  This variant refers to Tensilica's Diamond 233L Standard core Rev.C (LE).
112*4882a593Smuzhiyun
113*4882a593Smuzhiyunconfig XTENSA_VARIANT_CUSTOM
114*4882a593Smuzhiyun	bool "Custom Xtensa processor configuration"
115*4882a593Smuzhiyun	select HAVE_XTENSA_GPIO32
116*4882a593Smuzhiyun	help
117*4882a593Smuzhiyun	  Select this variant to use a custom Xtensa processor configuration.
118*4882a593Smuzhiyun	  You will be prompted for a processor variant CORENAME.
119*4882a593Smuzhiyunendchoice
120*4882a593Smuzhiyun
121*4882a593Smuzhiyunconfig XTENSA_VARIANT_CUSTOM_NAME
122*4882a593Smuzhiyun	string "Xtensa Processor Custom Core Variant Name"
123*4882a593Smuzhiyun	depends on XTENSA_VARIANT_CUSTOM
124*4882a593Smuzhiyun	help
125*4882a593Smuzhiyun	  Provide the name of a custom Xtensa processor variant.
126*4882a593Smuzhiyun	  This CORENAME selects arch/xtensa/variant/CORENAME.
127*4882a593Smuzhiyun	  Don't forget you have to select MMU if you have one.
128*4882a593Smuzhiyun
129*4882a593Smuzhiyunconfig XTENSA_VARIANT_NAME
130*4882a593Smuzhiyun	string
131*4882a593Smuzhiyun	default "dc232b"			if XTENSA_VARIANT_DC232B
132*4882a593Smuzhiyun	default "dc233c"			if XTENSA_VARIANT_DC233C
133*4882a593Smuzhiyun	default "fsf"				if XTENSA_VARIANT_FSF
134*4882a593Smuzhiyun	default XTENSA_VARIANT_CUSTOM_NAME	if XTENSA_VARIANT_CUSTOM
135*4882a593Smuzhiyun
136*4882a593Smuzhiyunconfig XTENSA_VARIANT_MMU
137*4882a593Smuzhiyun	bool "Core variant has a Full MMU (TLB, Pages, Protection, etc)"
138*4882a593Smuzhiyun	depends on XTENSA_VARIANT_CUSTOM
139*4882a593Smuzhiyun	default y
140*4882a593Smuzhiyun	select MMU
141*4882a593Smuzhiyun	help
142*4882a593Smuzhiyun	  Build a Conventional Kernel with full MMU support,
143*4882a593Smuzhiyun	  ie: it supports a TLB with auto-loading, page protection.
144*4882a593Smuzhiyun
145*4882a593Smuzhiyunconfig XTENSA_VARIANT_HAVE_PERF_EVENTS
146*4882a593Smuzhiyun	bool "Core variant has Performance Monitor Module"
147*4882a593Smuzhiyun	depends on XTENSA_VARIANT_CUSTOM
148*4882a593Smuzhiyun	default n
149*4882a593Smuzhiyun	help
150*4882a593Smuzhiyun	  Enable if core variant has Performance Monitor Module with
151*4882a593Smuzhiyun	  External Registers Interface.
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun	  If unsure, say N.
154*4882a593Smuzhiyun
155*4882a593Smuzhiyunconfig XTENSA_FAKE_NMI
156*4882a593Smuzhiyun	bool "Treat PMM IRQ as NMI"
157*4882a593Smuzhiyun	depends on XTENSA_VARIANT_HAVE_PERF_EVENTS
158*4882a593Smuzhiyun	default n
159*4882a593Smuzhiyun	help
160*4882a593Smuzhiyun	  If PMM IRQ is the only IRQ at EXCM level it is safe to
161*4882a593Smuzhiyun	  treat it as NMI, which improves accuracy of profiling.
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun	  If there are other interrupts at or above PMM IRQ priority level
164*4882a593Smuzhiyun	  but not above the EXCM level, PMM IRQ still may be treated as NMI,
165*4882a593Smuzhiyun	  but only if these IRQs are not used. There will be a build warning
166*4882a593Smuzhiyun	  saying that this is not safe, and a bugcheck if one of these IRQs
167*4882a593Smuzhiyun	  actually fire.
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun	  If unsure, say N.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyunconfig XTENSA_UNALIGNED_USER
172*4882a593Smuzhiyun	bool "Unaligned memory access in user space"
173*4882a593Smuzhiyun	help
174*4882a593Smuzhiyun	  The Xtensa architecture currently does not handle unaligned
175*4882a593Smuzhiyun	  memory accesses in hardware but through an exception handler.
176*4882a593Smuzhiyun	  Per default, unaligned memory accesses are disabled in user space.
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun	  Say Y here to enable unaligned memory access in user space.
179*4882a593Smuzhiyun
180*4882a593Smuzhiyunconfig HAVE_SMP
181*4882a593Smuzhiyun	bool "System Supports SMP (MX)"
182*4882a593Smuzhiyun	depends on XTENSA_VARIANT_CUSTOM
183*4882a593Smuzhiyun	select XTENSA_MX
184*4882a593Smuzhiyun	help
185*4882a593Smuzhiyun	  This option is used to indicate that the system-on-a-chip (SOC)
186*4882a593Smuzhiyun	  supports Multiprocessing. Multiprocessor support implemented above
187*4882a593Smuzhiyun	  the CPU core definition and currently needs to be selected manually.
188*4882a593Smuzhiyun
189*4882a593Smuzhiyun	  Multiprocessor support is implemented with external cache and
190*4882a593Smuzhiyun	  interrupt controllers.
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun	  The MX interrupt distributer adds Interprocessor Interrupts
193*4882a593Smuzhiyun	  and causes the IRQ numbers to be increased by 4 for devices
194*4882a593Smuzhiyun	  like the open cores ethernet driver and the serial interface.
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun	  You still have to select "Enable SMP" to enable SMP on this SOC.
197*4882a593Smuzhiyun
198*4882a593Smuzhiyunconfig SMP
199*4882a593Smuzhiyun	bool "Enable Symmetric multi-processing support"
200*4882a593Smuzhiyun	depends on HAVE_SMP
201*4882a593Smuzhiyun	select GENERIC_SMP_IDLE_THREAD
202*4882a593Smuzhiyun	help
203*4882a593Smuzhiyun	  Enabled SMP Software; allows more than one CPU/CORE
204*4882a593Smuzhiyun	  to be activated during startup.
205*4882a593Smuzhiyun
206*4882a593Smuzhiyunconfig NR_CPUS
207*4882a593Smuzhiyun	depends on SMP
208*4882a593Smuzhiyun	int "Maximum number of CPUs (2-32)"
209*4882a593Smuzhiyun	range 2 32
210*4882a593Smuzhiyun	default "4"
211*4882a593Smuzhiyun
212*4882a593Smuzhiyunconfig HOTPLUG_CPU
213*4882a593Smuzhiyun	bool "Enable CPU hotplug support"
214*4882a593Smuzhiyun	depends on SMP
215*4882a593Smuzhiyun	help
216*4882a593Smuzhiyun	  Say Y here to allow turning CPUs off and on. CPUs can be
217*4882a593Smuzhiyun	  controlled through /sys/devices/system/cpu.
218*4882a593Smuzhiyun
219*4882a593Smuzhiyun	  Say N if you want to disable CPU hotplug.
220*4882a593Smuzhiyun
221*4882a593Smuzhiyunconfig FAST_SYSCALL_XTENSA
222*4882a593Smuzhiyun	bool "Enable fast atomic syscalls"
223*4882a593Smuzhiyun	default n
224*4882a593Smuzhiyun	help
225*4882a593Smuzhiyun	  fast_syscall_xtensa is a syscall that can make atomic operations
226*4882a593Smuzhiyun	  on UP kernel when processor has no s32c1i support.
227*4882a593Smuzhiyun
228*4882a593Smuzhiyun	  This syscall is deprecated. It may have issues when called with
229*4882a593Smuzhiyun	  invalid arguments. It is provided only for backwards compatibility.
230*4882a593Smuzhiyun	  Only enable it if your userspace software requires it.
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun	  If unsure, say N.
233*4882a593Smuzhiyun
234*4882a593Smuzhiyunconfig FAST_SYSCALL_SPILL_REGISTERS
235*4882a593Smuzhiyun	bool "Enable spill registers syscall"
236*4882a593Smuzhiyun	default n
237*4882a593Smuzhiyun	help
238*4882a593Smuzhiyun	  fast_syscall_spill_registers is a syscall that spills all active
239*4882a593Smuzhiyun	  register windows of a calling userspace task onto its stack.
240*4882a593Smuzhiyun
241*4882a593Smuzhiyun	  This syscall is deprecated. It may have issues when called with
242*4882a593Smuzhiyun	  invalid arguments. It is provided only for backwards compatibility.
243*4882a593Smuzhiyun	  Only enable it if your userspace software requires it.
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun	  If unsure, say N.
246*4882a593Smuzhiyun
247*4882a593Smuzhiyunconfig USER_ABI_CALL0
248*4882a593Smuzhiyun	bool
249*4882a593Smuzhiyun
250*4882a593Smuzhiyunchoice
251*4882a593Smuzhiyun	prompt "Userspace ABI"
252*4882a593Smuzhiyun	default USER_ABI_DEFAULT
253*4882a593Smuzhiyun	help
254*4882a593Smuzhiyun	  Select supported userspace ABI.
255*4882a593Smuzhiyun
256*4882a593Smuzhiyun	  If unsure, choose the default ABI.
257*4882a593Smuzhiyun
258*4882a593Smuzhiyunconfig USER_ABI_DEFAULT
259*4882a593Smuzhiyun	bool "Default ABI only"
260*4882a593Smuzhiyun	help
261*4882a593Smuzhiyun	  Assume default userspace ABI. For XEA2 cores it is windowed ABI.
262*4882a593Smuzhiyun	  call0 ABI binaries may be run on such kernel, but signal delivery
263*4882a593Smuzhiyun	  will not work correctly for them.
264*4882a593Smuzhiyun
265*4882a593Smuzhiyunconfig USER_ABI_CALL0_ONLY
266*4882a593Smuzhiyun	bool "Call0 ABI only"
267*4882a593Smuzhiyun	select USER_ABI_CALL0
268*4882a593Smuzhiyun	help
269*4882a593Smuzhiyun	  Select this option to support only call0 ABI in userspace.
270*4882a593Smuzhiyun	  Windowed ABI binaries will crash with a segfault caused by
271*4882a593Smuzhiyun	  an illegal instruction exception on the first 'entry' opcode.
272*4882a593Smuzhiyun
273*4882a593Smuzhiyun	  Choose this option if you're planning to run only user code
274*4882a593Smuzhiyun	  built with call0 ABI.
275*4882a593Smuzhiyun
276*4882a593Smuzhiyunconfig USER_ABI_CALL0_PROBE
277*4882a593Smuzhiyun	bool "Support both windowed and call0 ABI by probing"
278*4882a593Smuzhiyun	select USER_ABI_CALL0
279*4882a593Smuzhiyun	help
280*4882a593Smuzhiyun	  Select this option to support both windowed and call0 userspace
281*4882a593Smuzhiyun	  ABIs. When enabled all processes are started with PS.WOE disabled
282*4882a593Smuzhiyun	  and a fast user exception handler for an illegal instruction is
283*4882a593Smuzhiyun	  used to turn on PS.WOE bit on the first 'entry' opcode executed by
284*4882a593Smuzhiyun	  the userspace.
285*4882a593Smuzhiyun
286*4882a593Smuzhiyun	  This option should be enabled for the kernel that must support
287*4882a593Smuzhiyun	  both call0 and windowed ABIs in userspace at the same time.
288*4882a593Smuzhiyun
289*4882a593Smuzhiyun	  Note that Xtensa ISA does not guarantee that entry opcode will
290*4882a593Smuzhiyun	  raise an illegal instruction exception on cores with XEA2 when
291*4882a593Smuzhiyun	  PS.WOE is disabled, check whether the target core supports it.
292*4882a593Smuzhiyun
293*4882a593Smuzhiyunendchoice
294*4882a593Smuzhiyun
295*4882a593Smuzhiyunendmenu
296*4882a593Smuzhiyun
297*4882a593Smuzhiyunconfig XTENSA_CALIBRATE_CCOUNT
298*4882a593Smuzhiyun	def_bool n
299*4882a593Smuzhiyun	help
300*4882a593Smuzhiyun	  On some platforms (XT2000, for example), the CPU clock rate can
301*4882a593Smuzhiyun	  vary.  The frequency can be determined, however, by measuring
302*4882a593Smuzhiyun	  against a well known, fixed frequency, such as an UART oscillator.
303*4882a593Smuzhiyun
304*4882a593Smuzhiyunconfig SERIAL_CONSOLE
305*4882a593Smuzhiyun	def_bool n
306*4882a593Smuzhiyun
307*4882a593Smuzhiyunconfig PLATFORM_HAVE_XIP
308*4882a593Smuzhiyun	def_bool n
309*4882a593Smuzhiyun
310*4882a593Smuzhiyunmenu "Platform options"
311*4882a593Smuzhiyun
312*4882a593Smuzhiyunchoice
313*4882a593Smuzhiyun	prompt "Xtensa System Type"
314*4882a593Smuzhiyun	default XTENSA_PLATFORM_ISS
315*4882a593Smuzhiyun
316*4882a593Smuzhiyunconfig XTENSA_PLATFORM_ISS
317*4882a593Smuzhiyun	bool "ISS"
318*4882a593Smuzhiyun	select XTENSA_CALIBRATE_CCOUNT
319*4882a593Smuzhiyun	select SERIAL_CONSOLE
320*4882a593Smuzhiyun	help
321*4882a593Smuzhiyun	  ISS is an acronym for Tensilica's Instruction Set Simulator.
322*4882a593Smuzhiyun
323*4882a593Smuzhiyunconfig XTENSA_PLATFORM_XT2000
324*4882a593Smuzhiyun	bool "XT2000"
325*4882a593Smuzhiyun	select HAVE_IDE
326*4882a593Smuzhiyun	help
327*4882a593Smuzhiyun	  XT2000 is the name of Tensilica's feature-rich emulation platform.
328*4882a593Smuzhiyun	  This hardware is capable of running a full Linux distribution.
329*4882a593Smuzhiyun
330*4882a593Smuzhiyunconfig XTENSA_PLATFORM_XTFPGA
331*4882a593Smuzhiyun	bool "XTFPGA"
332*4882a593Smuzhiyun	select ETHOC if ETHERNET
333*4882a593Smuzhiyun	select PLATFORM_WANT_DEFAULT_MEM if !MMU
334*4882a593Smuzhiyun	select SERIAL_CONSOLE
335*4882a593Smuzhiyun	select XTENSA_CALIBRATE_CCOUNT
336*4882a593Smuzhiyun	select PLATFORM_HAVE_XIP
337*4882a593Smuzhiyun	help
338*4882a593Smuzhiyun	  XTFPGA is the name of Tensilica board family (LX60, LX110, LX200, ML605).
339*4882a593Smuzhiyun	  This hardware is capable of running a full Linux distribution.
340*4882a593Smuzhiyun
341*4882a593Smuzhiyunendchoice
342*4882a593Smuzhiyun
343*4882a593Smuzhiyunconfig PLATFORM_NR_IRQS
344*4882a593Smuzhiyun	int
345*4882a593Smuzhiyun	default 3 if XTENSA_PLATFORM_XT2000
346*4882a593Smuzhiyun	default 0
347*4882a593Smuzhiyun
348*4882a593Smuzhiyunconfig XTENSA_CPU_CLOCK
349*4882a593Smuzhiyun	int "CPU clock rate [MHz]"
350*4882a593Smuzhiyun	depends on !XTENSA_CALIBRATE_CCOUNT
351*4882a593Smuzhiyun	default 16
352*4882a593Smuzhiyun
353*4882a593Smuzhiyunconfig GENERIC_CALIBRATE_DELAY
354*4882a593Smuzhiyun	bool "Auto calibration of the BogoMIPS value"
355*4882a593Smuzhiyun	help
356*4882a593Smuzhiyun	  The BogoMIPS value can easily be derived from the CPU frequency.
357*4882a593Smuzhiyun
358*4882a593Smuzhiyunconfig CMDLINE_BOOL
359*4882a593Smuzhiyun	bool "Default bootloader kernel arguments"
360*4882a593Smuzhiyun
361*4882a593Smuzhiyunconfig CMDLINE
362*4882a593Smuzhiyun	string "Initial kernel command string"
363*4882a593Smuzhiyun	depends on CMDLINE_BOOL
364*4882a593Smuzhiyun	default "console=ttyS0,38400 root=/dev/ram"
365*4882a593Smuzhiyun	help
366*4882a593Smuzhiyun	  On some architectures (EBSA110 and CATS), there is currently no way
367*4882a593Smuzhiyun	  for the boot loader to pass arguments to the kernel. For these
368*4882a593Smuzhiyun	  architectures, you should supply some command-line options at build
369*4882a593Smuzhiyun	  time by entering them here. As a minimum, you should specify the
370*4882a593Smuzhiyun	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
371*4882a593Smuzhiyun
372*4882a593Smuzhiyunconfig USE_OF
373*4882a593Smuzhiyun	bool "Flattened Device Tree support"
374*4882a593Smuzhiyun	select OF
375*4882a593Smuzhiyun	select OF_EARLY_FLATTREE
376*4882a593Smuzhiyun	help
377*4882a593Smuzhiyun	  Include support for flattened device tree machine descriptions.
378*4882a593Smuzhiyun
379*4882a593Smuzhiyunconfig BUILTIN_DTB_SOURCE
380*4882a593Smuzhiyun	string "DTB to build into the kernel image"
381*4882a593Smuzhiyun	depends on OF
382*4882a593Smuzhiyun
383*4882a593Smuzhiyunconfig PARSE_BOOTPARAM
384*4882a593Smuzhiyun	bool "Parse bootparam block"
385*4882a593Smuzhiyun	default y
386*4882a593Smuzhiyun	help
387*4882a593Smuzhiyun	  Parse parameters passed to the kernel from the bootloader. It may
388*4882a593Smuzhiyun	  be disabled if the kernel is known to run without the bootloader.
389*4882a593Smuzhiyun
390*4882a593Smuzhiyun	  If unsure, say Y.
391*4882a593Smuzhiyun
392*4882a593Smuzhiyunconfig BLK_DEV_SIMDISK
393*4882a593Smuzhiyun	tristate "Host file-based simulated block device support"
394*4882a593Smuzhiyun	default n
395*4882a593Smuzhiyun	depends on XTENSA_PLATFORM_ISS && BLOCK
396*4882a593Smuzhiyun	help
397*4882a593Smuzhiyun	  Create block devices that map to files in the host file system.
398*4882a593Smuzhiyun	  Device binding to host file may be changed at runtime via proc
399*4882a593Smuzhiyun	  interface provided the device is not in use.
400*4882a593Smuzhiyun
401*4882a593Smuzhiyunconfig BLK_DEV_SIMDISK_COUNT
402*4882a593Smuzhiyun	int "Number of host file-based simulated block devices"
403*4882a593Smuzhiyun	range 1 10
404*4882a593Smuzhiyun	depends on BLK_DEV_SIMDISK
405*4882a593Smuzhiyun	default 2
406*4882a593Smuzhiyun	help
407*4882a593Smuzhiyun	  This is the default minimal number of created block devices.
408*4882a593Smuzhiyun	  Kernel/module parameter 'simdisk_count' may be used to change this
409*4882a593Smuzhiyun	  value at runtime. More file names (but no more than 10) may be
410*4882a593Smuzhiyun	  specified as parameters, simdisk_count grows accordingly.
411*4882a593Smuzhiyun
412*4882a593Smuzhiyunconfig SIMDISK0_FILENAME
413*4882a593Smuzhiyun	string "Host filename for the first simulated device"
414*4882a593Smuzhiyun	depends on BLK_DEV_SIMDISK = y
415*4882a593Smuzhiyun	default ""
416*4882a593Smuzhiyun	help
417*4882a593Smuzhiyun	  Attach a first simdisk to a host file. Conventionally, this file
418*4882a593Smuzhiyun	  contains a root file system.
419*4882a593Smuzhiyun
420*4882a593Smuzhiyunconfig SIMDISK1_FILENAME
421*4882a593Smuzhiyun	string "Host filename for the second simulated device"
422*4882a593Smuzhiyun	depends on BLK_DEV_SIMDISK = y && BLK_DEV_SIMDISK_COUNT != 1
423*4882a593Smuzhiyun	default ""
424*4882a593Smuzhiyun	help
425*4882a593Smuzhiyun	  Another simulated disk in a host file for a buildroot-independent
426*4882a593Smuzhiyun	  storage.
427*4882a593Smuzhiyun
428*4882a593Smuzhiyunconfig XTFPGA_LCD
429*4882a593Smuzhiyun	bool "Enable XTFPGA LCD driver"
430*4882a593Smuzhiyun	depends on XTENSA_PLATFORM_XTFPGA
431*4882a593Smuzhiyun	default n
432*4882a593Smuzhiyun	help
433*4882a593Smuzhiyun	  There's a 2x16 LCD on most of XTFPGA boards, kernel may output
434*4882a593Smuzhiyun	  progress messages there during bootup/shutdown. It may be useful
435*4882a593Smuzhiyun	  during board bringup.
436*4882a593Smuzhiyun
437*4882a593Smuzhiyun	  If unsure, say N.
438*4882a593Smuzhiyun
439*4882a593Smuzhiyunconfig XTFPGA_LCD_BASE_ADDR
440*4882a593Smuzhiyun	hex "XTFPGA LCD base address"
441*4882a593Smuzhiyun	depends on XTFPGA_LCD
442*4882a593Smuzhiyun	default "0x0d0c0000"
443*4882a593Smuzhiyun	help
444*4882a593Smuzhiyun	  Base address of the LCD controller inside KIO region.
445*4882a593Smuzhiyun	  Different boards from XTFPGA family have LCD controller at different
446*4882a593Smuzhiyun	  addresses. Please consult prototyping user guide for your board for
447*4882a593Smuzhiyun	  the correct address. Wrong address here may lead to hardware lockup.
448*4882a593Smuzhiyun
449*4882a593Smuzhiyunconfig XTFPGA_LCD_8BIT_ACCESS
450*4882a593Smuzhiyun	bool "Use 8-bit access to XTFPGA LCD"
451*4882a593Smuzhiyun	depends on XTFPGA_LCD
452*4882a593Smuzhiyun	default n
453*4882a593Smuzhiyun	help
454*4882a593Smuzhiyun	  LCD may be connected with 4- or 8-bit interface, 8-bit access may
455*4882a593Smuzhiyun	  only be used with 8-bit interface. Please consult prototyping user
456*4882a593Smuzhiyun	  guide for your board for the correct interface width.
457*4882a593Smuzhiyun
458*4882a593Smuzhiyuncomment "Kernel memory layout"
459*4882a593Smuzhiyun
460*4882a593Smuzhiyunconfig INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
461*4882a593Smuzhiyun	bool "Initialize Xtensa MMU inside the Linux kernel code"
462*4882a593Smuzhiyun	depends on !XTENSA_VARIANT_FSF && !XTENSA_VARIANT_DC232B
463*4882a593Smuzhiyun	default y if XTENSA_VARIANT_DC233C || XTENSA_VARIANT_CUSTOM
464*4882a593Smuzhiyun	help
465*4882a593Smuzhiyun	  Earlier version initialized the MMU in the exception vector
466*4882a593Smuzhiyun	  before jumping to _startup in head.S and had an advantage that
467*4882a593Smuzhiyun	  it was possible to place a software breakpoint at 'reset' and
468*4882a593Smuzhiyun	  then enter your normal kernel breakpoints once the MMU was mapped
469*4882a593Smuzhiyun	  to the kernel mappings (0XC0000000).
470*4882a593Smuzhiyun
471*4882a593Smuzhiyun	  This unfortunately won't work for U-Boot and likely also wont
472*4882a593Smuzhiyun	  work for using KEXEC to have a hot kernel ready for doing a
473*4882a593Smuzhiyun	  KDUMP.
474*4882a593Smuzhiyun
475*4882a593Smuzhiyun	  So now the MMU is initialized in head.S but it's necessary to
476*4882a593Smuzhiyun	  use hardware breakpoints (gdb 'hbreak' cmd) to break at _startup.
477*4882a593Smuzhiyun	  xt-gdb can't place a Software Breakpoint in the  0XD region prior
478*4882a593Smuzhiyun	  to mapping the MMU and after mapping even if the area of low memory
479*4882a593Smuzhiyun	  was mapped gdb wouldn't remove the breakpoint on hitting it as the
480*4882a593Smuzhiyun	  PC wouldn't match. Since Hardware Breakpoints are recommended for
481*4882a593Smuzhiyun	  Linux configurations it seems reasonable to just assume they exist
482*4882a593Smuzhiyun	  and leave this older mechanism for unfortunate souls that choose
483*4882a593Smuzhiyun	  not to follow Tensilica's recommendation.
484*4882a593Smuzhiyun
485*4882a593Smuzhiyun	  Selecting this will cause U-Boot to set the KERNEL Load and Entry
486*4882a593Smuzhiyun	  address at 0x00003000 instead of the mapped std of 0xD0003000.
487*4882a593Smuzhiyun
488*4882a593Smuzhiyun	  If in doubt, say Y.
489*4882a593Smuzhiyun
490*4882a593Smuzhiyunconfig XIP_KERNEL
491*4882a593Smuzhiyun	bool "Kernel Execute-In-Place from ROM"
492*4882a593Smuzhiyun	depends on PLATFORM_HAVE_XIP
493*4882a593Smuzhiyun	help
494*4882a593Smuzhiyun	  Execute-In-Place allows the kernel to run from non-volatile storage
495*4882a593Smuzhiyun	  directly addressable by the CPU, such as NOR flash. This saves RAM
496*4882a593Smuzhiyun	  space since the text section of the kernel is not loaded from flash
497*4882a593Smuzhiyun	  to RAM. Read-write sections, such as the data section and stack,
498*4882a593Smuzhiyun	  are still copied to RAM. The XIP kernel is not compressed since
499*4882a593Smuzhiyun	  it has to run directly from flash, so it will take more space to
500*4882a593Smuzhiyun	  store it. The flash address used to link the kernel object files,
501*4882a593Smuzhiyun	  and for storing it, is configuration dependent. Therefore, if you
502*4882a593Smuzhiyun	  say Y here, you must know the proper physical address where to
503*4882a593Smuzhiyun	  store the kernel image depending on your own flash memory usage.
504*4882a593Smuzhiyun
505*4882a593Smuzhiyun	  Also note that the make target becomes "make xipImage" rather than
506*4882a593Smuzhiyun	  "make Image" or "make uImage". The final kernel binary to put in
507*4882a593Smuzhiyun	  ROM memory will be arch/xtensa/boot/xipImage.
508*4882a593Smuzhiyun
509*4882a593Smuzhiyun	  If unsure, say N.
510*4882a593Smuzhiyun
511*4882a593Smuzhiyunconfig MEMMAP_CACHEATTR
512*4882a593Smuzhiyun	hex "Cache attributes for the memory address space"
513*4882a593Smuzhiyun	depends on !MMU
514*4882a593Smuzhiyun	default 0x22222222
515*4882a593Smuzhiyun	help
516*4882a593Smuzhiyun	  These cache attributes are set up for noMMU systems. Each hex digit
517*4882a593Smuzhiyun	  specifies cache attributes for the corresponding 512MB memory
518*4882a593Smuzhiyun	  region: bits 0..3 -- for addresses 0x00000000..0x1fffffff,
519*4882a593Smuzhiyun	  bits 4..7 -- for addresses 0x20000000..0x3fffffff, and so on.
520*4882a593Smuzhiyun
521*4882a593Smuzhiyun	  Cache attribute values are specific for the MMU type.
522*4882a593Smuzhiyun	  For region protection MMUs:
523*4882a593Smuzhiyun	    1: WT cached,
524*4882a593Smuzhiyun	    2: cache bypass,
525*4882a593Smuzhiyun	    4: WB cached,
526*4882a593Smuzhiyun	    f: illegal.
527*4882a593Smuzhiyun	  For full MMU:
528*4882a593Smuzhiyun	    bit 0: executable,
529*4882a593Smuzhiyun	    bit 1: writable,
530*4882a593Smuzhiyun	    bits 2..3:
531*4882a593Smuzhiyun	      0: cache bypass,
532*4882a593Smuzhiyun	      1: WB cache,
533*4882a593Smuzhiyun	      2: WT cache,
534*4882a593Smuzhiyun	      3: special (c and e are illegal, f is reserved).
535*4882a593Smuzhiyun	  For MPU:
536*4882a593Smuzhiyun	    0: illegal,
537*4882a593Smuzhiyun	    1: WB cache,
538*4882a593Smuzhiyun	    2: WB, no-write-allocate cache,
539*4882a593Smuzhiyun	    3: WT cache,
540*4882a593Smuzhiyun	    4: cache bypass.
541*4882a593Smuzhiyun
542*4882a593Smuzhiyunconfig KSEG_PADDR
543*4882a593Smuzhiyun	hex "Physical address of the KSEG mapping"
544*4882a593Smuzhiyun	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX && MMU
545*4882a593Smuzhiyun	default 0x00000000
546*4882a593Smuzhiyun	help
547*4882a593Smuzhiyun	  This is the physical address where KSEG is mapped. Please refer to
548*4882a593Smuzhiyun	  the chosen KSEG layout help for the required address alignment.
549*4882a593Smuzhiyun	  Unpacked kernel image (including vectors) must be located completely
550*4882a593Smuzhiyun	  within KSEG.
551*4882a593Smuzhiyun	  Physical memory below this address is not available to linux.
552*4882a593Smuzhiyun
553*4882a593Smuzhiyun	  If unsure, leave the default value here.
554*4882a593Smuzhiyun
555*4882a593Smuzhiyunconfig KERNEL_VIRTUAL_ADDRESS
556*4882a593Smuzhiyun	hex "Kernel virtual address"
557*4882a593Smuzhiyun	depends on MMU && XIP_KERNEL
558*4882a593Smuzhiyun	default 0xd0003000
559*4882a593Smuzhiyun	help
560*4882a593Smuzhiyun	  This is the virtual address where the XIP kernel is mapped.
561*4882a593Smuzhiyun	  XIP kernel may be mapped into KSEG or KIO region, virtual address
562*4882a593Smuzhiyun	  provided here must match kernel load address provided in
563*4882a593Smuzhiyun	  KERNEL_LOAD_ADDRESS.
564*4882a593Smuzhiyun
565*4882a593Smuzhiyunconfig KERNEL_LOAD_ADDRESS
566*4882a593Smuzhiyun	hex "Kernel load address"
567*4882a593Smuzhiyun	default 0x60003000 if !MMU
568*4882a593Smuzhiyun	default 0x00003000 if MMU && INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
569*4882a593Smuzhiyun	default 0xd0003000 if MMU && !INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
570*4882a593Smuzhiyun	help
571*4882a593Smuzhiyun	  This is the address where the kernel is loaded.
572*4882a593Smuzhiyun	  It is virtual address for MMUv2 configurations and physical address
573*4882a593Smuzhiyun	  for all other configurations.
574*4882a593Smuzhiyun
575*4882a593Smuzhiyun	  If unsure, leave the default value here.
576*4882a593Smuzhiyun
577*4882a593Smuzhiyunchoice
578*4882a593Smuzhiyun	prompt "Relocatable vectors location"
579*4882a593Smuzhiyun	default XTENSA_VECTORS_IN_TEXT
580*4882a593Smuzhiyun	help
581*4882a593Smuzhiyun	  Choose whether relocatable vectors are merged into the kernel .text
582*4882a593Smuzhiyun	  or placed separately at runtime. This option does not affect
583*4882a593Smuzhiyun	  configurations without VECBASE register where vectors are always
584*4882a593Smuzhiyun	  placed at their hardware-defined locations.
585*4882a593Smuzhiyun
586*4882a593Smuzhiyunconfig XTENSA_VECTORS_IN_TEXT
587*4882a593Smuzhiyun	bool "Merge relocatable vectors into kernel text"
588*4882a593Smuzhiyun	depends on !MTD_XIP
589*4882a593Smuzhiyun	help
590*4882a593Smuzhiyun	  This option puts relocatable vectors into the kernel .text section
591*4882a593Smuzhiyun	  with proper alignment.
592*4882a593Smuzhiyun	  This is a safe choice for most configurations.
593*4882a593Smuzhiyun
594*4882a593Smuzhiyunconfig XTENSA_VECTORS_SEPARATE
595*4882a593Smuzhiyun	bool "Put relocatable vectors at fixed address"
596*4882a593Smuzhiyun	help
597*4882a593Smuzhiyun	  This option puts relocatable vectors at specific virtual address.
598*4882a593Smuzhiyun	  Vectors are merged with the .init data in the kernel image and
599*4882a593Smuzhiyun	  are copied into their designated location during kernel startup.
600*4882a593Smuzhiyun	  Use it to put vectors into IRAM or out of FLASH on kernels with
601*4882a593Smuzhiyun	  XIP-aware MTD support.
602*4882a593Smuzhiyun
603*4882a593Smuzhiyunendchoice
604*4882a593Smuzhiyun
605*4882a593Smuzhiyunconfig VECTORS_ADDR
606*4882a593Smuzhiyun	hex "Kernel vectors virtual address"
607*4882a593Smuzhiyun	default 0x00000000
608*4882a593Smuzhiyun	depends on XTENSA_VECTORS_SEPARATE
609*4882a593Smuzhiyun	help
610*4882a593Smuzhiyun	  This is the virtual address of the (relocatable) vectors base.
611*4882a593Smuzhiyun	  It must be within KSEG if MMU is used.
612*4882a593Smuzhiyun
613*4882a593Smuzhiyunconfig XIP_DATA_ADDR
614*4882a593Smuzhiyun	hex "XIP kernel data virtual address"
615*4882a593Smuzhiyun	depends on XIP_KERNEL
616*4882a593Smuzhiyun	default 0x00000000
617*4882a593Smuzhiyun	help
618*4882a593Smuzhiyun	  This is the virtual address where XIP kernel data is copied.
619*4882a593Smuzhiyun	  It must be within KSEG if MMU is used.
620*4882a593Smuzhiyun
621*4882a593Smuzhiyunconfig PLATFORM_WANT_DEFAULT_MEM
622*4882a593Smuzhiyun	def_bool n
623*4882a593Smuzhiyun
624*4882a593Smuzhiyunconfig DEFAULT_MEM_START
625*4882a593Smuzhiyun	hex
626*4882a593Smuzhiyun	prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM
627*4882a593Smuzhiyun	default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM
628*4882a593Smuzhiyun	default 0x00000000
629*4882a593Smuzhiyun	help
630*4882a593Smuzhiyun	  This is the base address used for both PAGE_OFFSET and PHYS_OFFSET
631*4882a593Smuzhiyun	  in noMMU configurations.
632*4882a593Smuzhiyun
633*4882a593Smuzhiyun	  If unsure, leave the default value here.
634*4882a593Smuzhiyun
635*4882a593Smuzhiyunchoice
636*4882a593Smuzhiyun	prompt "KSEG layout"
637*4882a593Smuzhiyun	depends on MMU
638*4882a593Smuzhiyun	default XTENSA_KSEG_MMU_V2
639*4882a593Smuzhiyun
640*4882a593Smuzhiyunconfig XTENSA_KSEG_MMU_V2
641*4882a593Smuzhiyun	bool "MMUv2: 128MB cached + 128MB uncached"
642*4882a593Smuzhiyun	help
643*4882a593Smuzhiyun	  MMUv2 compatible kernel memory map: TLB way 5 maps 128MB starting
644*4882a593Smuzhiyun	  at KSEG_PADDR to 0xd0000000 with cache and to 0xd8000000
645*4882a593Smuzhiyun	  without cache.
646*4882a593Smuzhiyun	  KSEG_PADDR must be aligned to 128MB.
647*4882a593Smuzhiyun
648*4882a593Smuzhiyunconfig XTENSA_KSEG_256M
649*4882a593Smuzhiyun	bool "256MB cached + 256MB uncached"
650*4882a593Smuzhiyun	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
651*4882a593Smuzhiyun	help
652*4882a593Smuzhiyun	  TLB way 6 maps 256MB starting at KSEG_PADDR to 0xb0000000
653*4882a593Smuzhiyun	  with cache and to 0xc0000000 without cache.
654*4882a593Smuzhiyun	  KSEG_PADDR must be aligned to 256MB.
655*4882a593Smuzhiyun
656*4882a593Smuzhiyunconfig XTENSA_KSEG_512M
657*4882a593Smuzhiyun	bool "512MB cached + 512MB uncached"
658*4882a593Smuzhiyun	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
659*4882a593Smuzhiyun	help
660*4882a593Smuzhiyun	  TLB way 6 maps 512MB starting at KSEG_PADDR to 0xa0000000
661*4882a593Smuzhiyun	  with cache and to 0xc0000000 without cache.
662*4882a593Smuzhiyun	  KSEG_PADDR must be aligned to 256MB.
663*4882a593Smuzhiyun
664*4882a593Smuzhiyunendchoice
665*4882a593Smuzhiyun
666*4882a593Smuzhiyunconfig HIGHMEM
667*4882a593Smuzhiyun	bool "High Memory Support"
668*4882a593Smuzhiyun	depends on MMU
669*4882a593Smuzhiyun	help
670*4882a593Smuzhiyun	  Linux can use the full amount of RAM in the system by
671*4882a593Smuzhiyun	  default. However, the default MMUv2 setup only maps the
672*4882a593Smuzhiyun	  lowermost 128 MB of memory linearly to the areas starting
673*4882a593Smuzhiyun	  at 0xd0000000 (cached) and 0xd8000000 (uncached).
674*4882a593Smuzhiyun	  When there are more than 128 MB memory in the system not
675*4882a593Smuzhiyun	  all of it can be "permanently mapped" by the kernel.
676*4882a593Smuzhiyun	  The physical memory that's not permanently mapped is called
677*4882a593Smuzhiyun	  "high memory".
678*4882a593Smuzhiyun
679*4882a593Smuzhiyun	  If you are compiling a kernel which will never run on a
680*4882a593Smuzhiyun	  machine with more than 128 MB total physical RAM, answer
681*4882a593Smuzhiyun	  N here.
682*4882a593Smuzhiyun
683*4882a593Smuzhiyun	  If unsure, say Y.
684*4882a593Smuzhiyun
685*4882a593Smuzhiyunconfig FORCE_MAX_ZONEORDER
686*4882a593Smuzhiyun	int "Maximum zone order"
687*4882a593Smuzhiyun	default "11"
688*4882a593Smuzhiyun	help
689*4882a593Smuzhiyun	  The kernel memory allocator divides physically contiguous memory
690*4882a593Smuzhiyun	  blocks into "zones", where each zone is a power of two number of
691*4882a593Smuzhiyun	  pages.  This option selects the largest power of two that the kernel
692*4882a593Smuzhiyun	  keeps in the memory allocator.  If you need to allocate very large
693*4882a593Smuzhiyun	  blocks of physically contiguous memory, then you may need to
694*4882a593Smuzhiyun	  increase this value.
695*4882a593Smuzhiyun
696*4882a593Smuzhiyun	  This config option is actually maximum order plus one. For example,
697*4882a593Smuzhiyun	  a value of 11 means that the largest free memory block is 2^10 pages.
698*4882a593Smuzhiyun
699*4882a593Smuzhiyunendmenu
700*4882a593Smuzhiyun
701*4882a593Smuzhiyunmenu "Power management options"
702*4882a593Smuzhiyun
703*4882a593Smuzhiyunsource "kernel/power/Kconfig"
704*4882a593Smuzhiyun
705*4882a593Smuzhiyunendmenu
706