xref: /linux-6.15/arch/xtensa/Kconfig (revision e799bef0)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
28e1a6dd2SChris Zankelconfig XTENSA
335f9cd08SJohannes Weiner	def_bool y
4942fa985SYury Norov	select ARCH_32BIT_OFF_T
58690bbcfSMathieu Desnoyers	select ARCH_HAS_CPU_CACHE_ALIASING
6aef0f78eSChristoph Hellwig	select ARCH_HAS_BINFMT_FLAT if !MMU
792652cf9SKees Cook	select ARCH_HAS_CURRENT_STACK_POINTER
8af7a16e5SMax Filippov	select ARCH_HAS_DEBUG_VM_PGTABLE
90f665b9eSChristoph Hellwig	select ARCH_HAS_DMA_PREP_COHERENT if MMU
100847d167SMax Filippov	select ARCH_HAS_GCOV_PROFILE_ALL
11c49731a0SMax Filippov	select ARCH_HAS_KCOV
120f665b9eSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_CPU if MMU
130f665b9eSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_DEVICE if MMU
14fa7e2247SChristoph Hellwig	select ARCH_HAS_DMA_SET_UNCACHED if MMU
15e6226997SArnd Bergmann	select ARCH_HAS_STRNCPY_FROM_USER if !KASAN
16e6226997SArnd Bergmann	select ARCH_HAS_STRNLEN_USER
17*e799bef0SPaul E. McKenney	select ARCH_NEED_CMPXCHG_1_EMU
18dce44566SAnshuman Khandual	select ARCH_USE_MEMTEST
19579afe86SMax Filippov	select ARCH_USE_QUEUED_RWLOCKS
20579afe86SMax Filippov	select ARCH_USE_QUEUED_SPINLOCKS
21e969161bSMax Filippov	select ARCH_WANT_IPC_PARSE_VERSION
2210916706SShile Zhang	select BUILDTIME_TABLE_SORT
233e41f9baSAl Viro	select CLONE_BACKWARDS
24bda8932dSMax Filippov	select COMMON_CLK
25f5ff79fdSChristoph Hellwig	select DMA_NONCOHERENT_MMAP if MMU
26920f8a39SMax Filippov	select GENERIC_ATOMIC64
27920f8a39SMax Filippov	select GENERIC_IRQ_SHOW
2819c5699fSMax Filippov	select GENERIC_LIB_CMPDI2
2919c5699fSMax Filippov	select GENERIC_LIB_MULDI3
3019c5699fSMax Filippov	select GENERIC_LIB_UCMPDI2
31920f8a39SMax Filippov	select GENERIC_PCI_IOMAP
32920f8a39SMax Filippov	select GENERIC_SCHED_CLOCK
33ca6c1af3SBaoquan He	select GENERIC_IOREMAP if MMU
34ef1a935cSMax Filippov	select HAVE_ARCH_AUDITSYSCALL
357af710d9SMax Filippov	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
367af710d9SMax Filippov	select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
37725aea87SMax Filippov	select HAVE_ARCH_KCSAN
38da94a40fSMax Filippov	select HAVE_ARCH_SECCOMP_FILTER
399f24f3c1SMax Filippov	select HAVE_ARCH_TRACEHOOK
40338d9150SMax Filippov	select HAVE_ASM_MODVERSIONS
4124a9c541SFrederic Weisbecker	select HAVE_CONTEXT_TRACKING_USER
420e46c111SMax Filippov	select HAVE_DEBUG_KMEMLEAK
439d2ffe5cSMax Filippov	select HAVE_DMA_CONTIGUOUS
445f56a5dfSJiri Slaby	select HAVE_EXIT_THREAD
45920f8a39SMax Filippov	select HAVE_FUNCTION_TRACER
467dc0eb0bSMax Filippov	select HAVE_GCC_PLUGINS if GCC_VERSION >= 120000
47c91e02bdSMax Filippov	select HAVE_HW_BREAKPOINT if PERF_EVENTS
48920f8a39SMax Filippov	select HAVE_IRQ_TIME_ACCOUNTING
495394f1e9SArnd Bergmann	select HAVE_PAGE_SIZE_4KB
50eb01d42aSChristoph Hellwig	select HAVE_PCI
51920f8a39SMax Filippov	select HAVE_PERF_EVENTS
52d148eac0SMasahiro Yamada	select HAVE_STACKPROTECTOR
53af5395c2SMax Filippov	select HAVE_SYSCALL_TRACEPOINTS
5450718569SMax Filippov	select HAVE_VIRT_CPU_ACCOUNTING_GEN
55920f8a39SMax Filippov	select IRQ_DOMAIN
56a050ba1eSLinus Torvalds	select LOCK_MM_AND_FIND_VMA
57920f8a39SMax Filippov	select MODULES_USE_ELF_RELA
58db8165f5SMax Filippov	select PERF_USE_VMALLOC
594aae683fSMasahiro Yamada	select TRACE_IRQFLAGS_SUPPORT
608e1a6dd2SChris Zankel	help
618e1a6dd2SChris Zankel	  Xtensa processors are 32-bit RISC machines designed by Tensilica
628e1a6dd2SChris Zankel	  primarily for embedded systems.  These processors are both
638e1a6dd2SChris Zankel	  configurable and extensible.  The Linux port to the Xtensa
648e1a6dd2SChris Zankel	  architecture supports all processor configurations and extensions,
658e1a6dd2SChris Zankel	  with reasonable minimum requirements.  The Xtensa Linux project has
660ada4490SMasanari Iida	  a home page at <http://www.linux-xtensa.org/>.
678e1a6dd2SChris Zankel
68d4337aa5SAkinobu Mitaconfig GENERIC_HWEIGHT
6935f9cd08SJohannes Weiner	def_bool y
70d4337aa5SAkinobu Mita
71f0d1b0b3SDavid Howellsconfig ARCH_HAS_ILOG2_U32
7235f9cd08SJohannes Weiner	def_bool n
73f0d1b0b3SDavid Howells
74f0d1b0b3SDavid Howellsconfig ARCH_HAS_ILOG2_U64
7535f9cd08SJohannes Weiner	def_bool n
76f0d1b0b3SDavid Howells
7703ce34cfSMax Filippovconfig ARCH_MTD_XIP
7803ce34cfSMax Filippov	def_bool y
7903ce34cfSMax Filippov
80ce816fa8SUwe Kleine-Königconfig NO_IOPORT_MAP
81d046f77eSMax Filippov	def_bool n
825ea81769SAl Viro
83bdc80787SH. Peter Anvinconfig HZ
84bdc80787SH. Peter Anvin	int
85bdc80787SH. Peter Anvin	default 100
86bdc80787SH. Peter Anvin
878f371c75SMax Filippovconfig LOCKDEP_SUPPORT
888f371c75SMax Filippov	def_bool y
898f371c75SMax Filippov
903e4196a5SMax Filippovconfig STACKTRACE_SUPPORT
913e4196a5SMax Filippov	def_bool y
923e4196a5SMax Filippov
9335f9cd08SJohannes Weinerconfig MMU
94de7c1c78SMax Filippov	def_bool n
95a8f0c31fSMax Filippov	select PFAULT
9635f9cd08SJohannes Weiner
97a1a2bdecSBaruch Siachconfig HAVE_XTENSA_GPIO32
98a1a2bdecSBaruch Siach	def_bool n
99a1a2bdecSBaruch Siach
100c633544aSMax Filippovconfig KASAN_SHADOW_OFFSET
101c633544aSMax Filippov	hex
102c633544aSMax Filippov	default 0x6e400000
103c633544aSMax Filippov
104c425c546SMasahiro Yamadaconfig CPU_BIG_ENDIAN
105c425c546SMasahiro Yamada	def_bool $(success,test "$(shell,echo __XTENSA_EB__ | $(CC) -E -P -)" = 1)
106c425c546SMasahiro Yamada
107c425c546SMasahiro Yamadaconfig CPU_LITTLE_ENDIAN
108c425c546SMasahiro Yamada	def_bool !CPU_BIG_ENDIAN
109c425c546SMasahiro Yamada
110c20e1117SMax Filippovconfig CC_HAVE_CALL0_ABI
111c20e1117SMax Filippov	def_bool $(success,test "$(shell,echo __XTENSA_CALL0_ABI__ | $(CC) -mabi=call0 -E -P - 2>/dev/null)" = 1)
112c20e1117SMax Filippov
1138e1a6dd2SChris Zankelmenu "Processor type and features"
1148e1a6dd2SChris Zankel
1158e1a6dd2SChris Zankelchoice
1168e1a6dd2SChris Zankel	prompt "Xtensa Processor Configuration"
117173d6681SChris Zankel	default XTENSA_VARIANT_FSF
1188e1a6dd2SChris Zankel
119173d6681SChris Zankelconfig XTENSA_VARIANT_FSF
1200025427eSChris Zankel	bool "fsf - default (not generic) configuration"
12135f9cd08SJohannes Weiner	select MMU
1220025427eSChris Zankel
1230025427eSChris Zankelconfig XTENSA_VARIANT_DC232B
1240025427eSChris Zankel	bool "dc232b - Diamond 232L Standard Core Rev.B (LE)"
12535f9cd08SJohannes Weiner	select MMU
126a1a2bdecSBaruch Siach	select HAVE_XTENSA_GPIO32
1270025427eSChris Zankel	help
1280025427eSChris Zankel	  This variant refers to Tensilica's Diamond 232L Standard core Rev.B (LE).
129000af2c5SJohannes Weiner
130d0b73b48SPete Delaneyconfig XTENSA_VARIANT_DC233C
131d0b73b48SPete Delaney	bool "dc233c - Diamond 233L Standard Core Rev.C (LE)"
132d0b73b48SPete Delaney	select MMU
133a1a2bdecSBaruch Siach	select HAVE_XTENSA_GPIO32
134d0b73b48SPete Delaney	help
135d0b73b48SPete Delaney	  This variant refers to Tensilica's Diamond 233L Standard core Rev.C (LE).
136d0b73b48SPete Delaney
137420ae951SMax Filippovconfig XTENSA_VARIANT_CUSTOM
138420ae951SMax Filippov	bool "Custom Xtensa processor configuration"
139420ae951SMax Filippov	select HAVE_XTENSA_GPIO32
140420ae951SMax Filippov	help
141420ae951SMax Filippov	  Select this variant to use a custom Xtensa processor configuration.
142420ae951SMax Filippov	  You will be prompted for a processor variant CORENAME.
1438e1a6dd2SChris Zankelendchoice
1448e1a6dd2SChris Zankel
145420ae951SMax Filippovconfig XTENSA_VARIANT_CUSTOM_NAME
146420ae951SMax Filippov	string "Xtensa Processor Custom Core Variant Name"
147420ae951SMax Filippov	depends on XTENSA_VARIANT_CUSTOM
148420ae951SMax Filippov	help
149420ae951SMax Filippov	  Provide the name of a custom Xtensa processor variant.
1504ea6babbSYujie Liu	  This CORENAME selects arch/xtensa/variants/CORENAME.
15170cbddb9SHu Haowen	  Don't forget you have to select MMU if you have one.
152420ae951SMax Filippov
153420ae951SMax Filippovconfig XTENSA_VARIANT_NAME
154420ae951SMax Filippov	string
155420ae951SMax Filippov	default "dc232b"			if XTENSA_VARIANT_DC232B
156420ae951SMax Filippov	default "dc233c"			if XTENSA_VARIANT_DC233C
157420ae951SMax Filippov	default "fsf"				if XTENSA_VARIANT_FSF
158420ae951SMax Filippov	default XTENSA_VARIANT_CUSTOM_NAME	if XTENSA_VARIANT_CUSTOM
159420ae951SMax Filippov
160420ae951SMax Filippovconfig XTENSA_VARIANT_MMU
161420ae951SMax Filippov	bool "Core variant has a Full MMU (TLB, Pages, Protection, etc)"
162420ae951SMax Filippov	depends on XTENSA_VARIANT_CUSTOM
163420ae951SMax Filippov	default y
164de7c1c78SMax Filippov	select MMU
165420ae951SMax Filippov	help
166420ae951SMax Filippov	  Build a Conventional Kernel with full MMU support,
167420ae951SMax Filippov	  ie: it supports a TLB with auto-loading, page protection.
168420ae951SMax Filippov
1699bd46da4SMax Filippovconfig XTENSA_VARIANT_HAVE_PERF_EVENTS
1709bd46da4SMax Filippov	bool "Core variant has Performance Monitor Module"
1719bd46da4SMax Filippov	depends on XTENSA_VARIANT_CUSTOM
1729bd46da4SMax Filippov	default n
1739bd46da4SMax Filippov	help
1749bd46da4SMax Filippov	  Enable if core variant has Performance Monitor Module with
1759bd46da4SMax Filippov	  External Registers Interface.
1769bd46da4SMax Filippov
1779bd46da4SMax Filippov	  If unsure, say N.
1789bd46da4SMax Filippov
179e4629194SMax Filippovconfig XTENSA_FAKE_NMI
180e4629194SMax Filippov	bool "Treat PMM IRQ as NMI"
181e4629194SMax Filippov	depends on XTENSA_VARIANT_HAVE_PERF_EVENTS
182e4629194SMax Filippov	default n
183e4629194SMax Filippov	help
184e4629194SMax Filippov	  If PMM IRQ is the only IRQ at EXCM level it is safe to
185e4629194SMax Filippov	  treat it as NMI, which improves accuracy of profiling.
186e4629194SMax Filippov
187e4629194SMax Filippov	  If there are other interrupts at or above PMM IRQ priority level
188e4629194SMax Filippov	  but not above the EXCM level, PMM IRQ still may be treated as NMI,
189e4629194SMax Filippov	  but only if these IRQs are not used. There will be a build warning
190e4629194SMax Filippov	  saying that this is not safe, and a bugcheck if one of these IRQs
191e4629194SMax Filippov	  actually fire.
192e4629194SMax Filippov
193e4629194SMax Filippov	  If unsure, say N.
194e4629194SMax Filippov
195a8f0c31fSMax Filippovconfig PFAULT
196a8f0c31fSMax Filippov	bool "Handle protection faults" if EXPERT && !MMU
197a8f0c31fSMax Filippov	default y
198a8f0c31fSMax Filippov	help
199a8f0c31fSMax Filippov	  Handle protection faults. MMU configurations must enable it.
200a8f0c31fSMax Filippov	  noMMU configurations may disable it if used memory map never
201a8f0c31fSMax Filippov	  generates protection faults or faults are always fatal.
202a8f0c31fSMax Filippov
203a8f0c31fSMax Filippov	  If unsure, say Y.
204a8f0c31fSMax Filippov
2058e1a6dd2SChris Zankelconfig XTENSA_UNALIGNED_USER
206ad33cc80SCorentin Labbe	bool "Unaligned memory access in user space"
20735f9cd08SJohannes Weiner	help
2088e1a6dd2SChris Zankel	  The Xtensa architecture currently does not handle unaligned
2098e1a6dd2SChris Zankel	  memory accesses in hardware but through an exception handler.
2108e1a6dd2SChris Zankel	  Per default, unaligned memory accesses are disabled in user space.
2118e1a6dd2SChris Zankel
2128e1a6dd2SChris Zankel	  Say Y here to enable unaligned memory access in user space.
2138e1a6dd2SChris Zankel
214f29cf776SMax Filippovconfig XTENSA_LOAD_STORE
215f29cf776SMax Filippov	bool "Load/store exception handler for memory only readable with l32"
216f29cf776SMax Filippov	help
217f29cf776SMax Filippov	  The Xtensa architecture only allows reading memory attached to its
218f29cf776SMax Filippov	  instruction bus with l32r and l32i instructions, all other
219f29cf776SMax Filippov	  instructions raise an exception with the LoadStoreErrorCause code.
220f29cf776SMax Filippov	  This makes it hard to use some configurations, e.g. store string
221f29cf776SMax Filippov	  literals in FLASH memory attached to the instruction bus.
222f29cf776SMax Filippov
223f29cf776SMax Filippov	  Say Y here to enable exception handler that allows transparent
224f29cf776SMax Filippov	  byte and 2-byte access to memory attached to instruction bus.
225f29cf776SMax Filippov
226f615136cSMax Filippovconfig HAVE_SMP
227f615136cSMax Filippov	bool "System Supports SMP (MX)"
228de7c1c78SMax Filippov	depends on XTENSA_VARIANT_CUSTOM
229f615136cSMax Filippov	select XTENSA_MX
230f615136cSMax Filippov	help
23158bc6c69SRandy Dunlap	  This option is used to indicate that the system-on-a-chip (SOC)
232f615136cSMax Filippov	  supports Multiprocessing. Multiprocessor support implemented above
233f615136cSMax Filippov	  the CPU core definition and currently needs to be selected manually.
234f615136cSMax Filippov
23558bc6c69SRandy Dunlap	  Multiprocessor support is implemented with external cache and
236769a12a9SMasanari Iida	  interrupt controllers.
237f615136cSMax Filippov
238f615136cSMax Filippov	  The MX interrupt distributer adds Interprocessor Interrupts
239f615136cSMax Filippov	  and causes the IRQ numbers to be increased by 4 for devices
240f615136cSMax Filippov	  like the open cores ethernet driver and the serial interface.
241f615136cSMax Filippov
242f615136cSMax Filippov	  You still have to select "Enable SMP" to enable SMP on this SOC.
243f615136cSMax Filippov
244f615136cSMax Filippovconfig SMP
245f615136cSMax Filippov	bool "Enable Symmetric multi-processing support"
246f615136cSMax Filippov	depends on HAVE_SMP
247f615136cSMax Filippov	select GENERIC_SMP_IDLE_THREAD
248f615136cSMax Filippov	help
249f615136cSMax Filippov	  Enabled SMP Software; allows more than one CPU/CORE
250f615136cSMax Filippov	  to be activated during startup.
251f615136cSMax Filippov
252f615136cSMax Filippovconfig NR_CPUS
253f615136cSMax Filippov	depends on SMP
254f615136cSMax Filippov	int "Maximum number of CPUs (2-32)"
255f615136cSMax Filippov	range 2 32
256f615136cSMax Filippov	default "4"
257f615136cSMax Filippov
25849b424feSMax Filippovconfig HOTPLUG_CPU
25949b424feSMax Filippov	bool "Enable CPU hotplug support"
26049b424feSMax Filippov	depends on SMP
26149b424feSMax Filippov	help
26249b424feSMax Filippov	  Say Y here to allow turning CPUs off and on. CPUs can be
26349b424feSMax Filippov	  controlled through /sys/devices/system/cpu.
26449b424feSMax Filippov
26549b424feSMax Filippov	  Say N if you want to disable CPU hotplug.
26649b424feSMax Filippov
26789b184f9SMax Filippovconfig SECONDARY_RESET_VECTOR
26889b184f9SMax Filippov	bool "Secondary cores use alternative reset vector"
26989b184f9SMax Filippov	default y
27089b184f9SMax Filippov	depends on HAVE_SMP
27189b184f9SMax Filippov	help
27289b184f9SMax Filippov	  Secondary cores may be configured to use alternative reset vector,
27389b184f9SMax Filippov	  or all cores may use primary reset vector.
27489b184f9SMax Filippov	  Say Y here to supply handler for the alternative reset location.
27589b184f9SMax Filippov
2769184289cSMax Filippovconfig FAST_SYSCALL_XTENSA
2779184289cSMax Filippov	bool "Enable fast atomic syscalls"
2789184289cSMax Filippov	default n
2799184289cSMax Filippov	help
2809184289cSMax Filippov	  fast_syscall_xtensa is a syscall that can make atomic operations
2819184289cSMax Filippov	  on UP kernel when processor has no s32c1i support.
2829184289cSMax Filippov
2839184289cSMax Filippov	  This syscall is deprecated. It may have issues when called with
2849184289cSMax Filippov	  invalid arguments. It is provided only for backwards compatibility.
2859184289cSMax Filippov	  Only enable it if your userspace software requires it.
2869184289cSMax Filippov
2879184289cSMax Filippov	  If unsure, say N.
2889184289cSMax Filippov
2899184289cSMax Filippovconfig FAST_SYSCALL_SPILL_REGISTERS
2909184289cSMax Filippov	bool "Enable spill registers syscall"
2919184289cSMax Filippov	default n
2929184289cSMax Filippov	help
2939184289cSMax Filippov	  fast_syscall_spill_registers is a syscall that spills all active
2949184289cSMax Filippov	  register windows of a calling userspace task onto its stack.
2959184289cSMax Filippov
2969184289cSMax Filippov	  This syscall is deprecated. It may have issues when called with
2979184289cSMax Filippov	  invalid arguments. It is provided only for backwards compatibility.
2989184289cSMax Filippov	  Only enable it if your userspace software requires it.
2999184289cSMax Filippov
3009184289cSMax Filippov	  If unsure, say N.
3019184289cSMax Filippov
302c20e1117SMax Filippovchoice
303c20e1117SMax Filippov	prompt "Kernel ABI"
304c20e1117SMax Filippov	default KERNEL_ABI_DEFAULT
305c20e1117SMax Filippov	help
306c20e1117SMax Filippov	  Select ABI for the kernel code. This ABI is independent of the
307c20e1117SMax Filippov	  supported userspace ABI and any combination of the
308c20e1117SMax Filippov	  kernel/userspace ABI is possible and should work.
309c20e1117SMax Filippov
310c20e1117SMax Filippov	  In case both kernel and userspace support only call0 ABI
311c20e1117SMax Filippov	  all register windows support code will be omitted from the
312c20e1117SMax Filippov	  build.
313c20e1117SMax Filippov
314c20e1117SMax Filippov	  If unsure, choose the default ABI.
315c20e1117SMax Filippov
316c20e1117SMax Filippovconfig KERNEL_ABI_DEFAULT
317c20e1117SMax Filippov	bool "Default ABI"
318c20e1117SMax Filippov	help
319c20e1117SMax Filippov	  Select this option to compile kernel code with the default ABI
320c20e1117SMax Filippov	  selected for the toolchain.
321c20e1117SMax Filippov	  Normally cores with windowed registers option use windowed ABI and
322c20e1117SMax Filippov	  cores without it use call0 ABI.
323c20e1117SMax Filippov
324c20e1117SMax Filippovconfig KERNEL_ABI_CALL0
325c20e1117SMax Filippov	bool "Call0 ABI" if CC_HAVE_CALL0_ABI
326c20e1117SMax Filippov	help
327c20e1117SMax Filippov	  Select this option to compile kernel code with call0 ABI even with
328c20e1117SMax Filippov	  toolchain that defaults to windowed ABI.
329c20e1117SMax Filippov	  When this option is not selected the default toolchain ABI will
330c20e1117SMax Filippov	  be used for the kernel code.
331c20e1117SMax Filippov
332c20e1117SMax Filippovendchoice
333c20e1117SMax Filippov
33409f8a6dbSMax Filippovconfig USER_ABI_CALL0
33509f8a6dbSMax Filippov	bool
33609f8a6dbSMax Filippov
33709f8a6dbSMax Filippovchoice
33809f8a6dbSMax Filippov	prompt "Userspace ABI"
33909f8a6dbSMax Filippov	default USER_ABI_DEFAULT
34009f8a6dbSMax Filippov	help
34109f8a6dbSMax Filippov	  Select supported userspace ABI.
34209f8a6dbSMax Filippov
34309f8a6dbSMax Filippov	  If unsure, choose the default ABI.
34409f8a6dbSMax Filippov
34509f8a6dbSMax Filippovconfig USER_ABI_DEFAULT
34609f8a6dbSMax Filippov	bool "Default ABI only"
34709f8a6dbSMax Filippov	help
34809f8a6dbSMax Filippov	  Assume default userspace ABI. For XEA2 cores it is windowed ABI.
34909f8a6dbSMax Filippov	  call0 ABI binaries may be run on such kernel, but signal delivery
35009f8a6dbSMax Filippov	  will not work correctly for them.
35109f8a6dbSMax Filippov
35209f8a6dbSMax Filippovconfig USER_ABI_CALL0_ONLY
35309f8a6dbSMax Filippov	bool "Call0 ABI only"
35409f8a6dbSMax Filippov	select USER_ABI_CALL0
35509f8a6dbSMax Filippov	help
35609f8a6dbSMax Filippov	  Select this option to support only call0 ABI in userspace.
35709f8a6dbSMax Filippov	  Windowed ABI binaries will crash with a segfault caused by
35809f8a6dbSMax Filippov	  an illegal instruction exception on the first 'entry' opcode.
35909f8a6dbSMax Filippov
36009f8a6dbSMax Filippov	  Choose this option if you're planning to run only user code
36109f8a6dbSMax Filippov	  built with call0 ABI.
36209f8a6dbSMax Filippov
36309f8a6dbSMax Filippovconfig USER_ABI_CALL0_PROBE
36409f8a6dbSMax Filippov	bool "Support both windowed and call0 ABI by probing"
36509f8a6dbSMax Filippov	select USER_ABI_CALL0
36609f8a6dbSMax Filippov	help
36709f8a6dbSMax Filippov	  Select this option to support both windowed and call0 userspace
36809f8a6dbSMax Filippov	  ABIs. When enabled all processes are started with PS.WOE disabled
36909f8a6dbSMax Filippov	  and a fast user exception handler for an illegal instruction is
37009f8a6dbSMax Filippov	  used to turn on PS.WOE bit on the first 'entry' opcode executed by
37109f8a6dbSMax Filippov	  the userspace.
37209f8a6dbSMax Filippov
37309f8a6dbSMax Filippov	  This option should be enabled for the kernel that must support
37409f8a6dbSMax Filippov	  both call0 and windowed ABIs in userspace at the same time.
37509f8a6dbSMax Filippov
37609f8a6dbSMax Filippov	  Note that Xtensa ISA does not guarantee that entry opcode will
37709f8a6dbSMax Filippov	  raise an illegal instruction exception on cores with XEA2 when
37809f8a6dbSMax Filippov	  PS.WOE is disabled, check whether the target core supports it.
37909f8a6dbSMax Filippov
38009f8a6dbSMax Filippovendchoice
38109f8a6dbSMax Filippov
3828e1a6dd2SChris Zankelendmenu
3838e1a6dd2SChris Zankel
38435f9cd08SJohannes Weinerconfig XTENSA_CALIBRATE_CCOUNT
38535f9cd08SJohannes Weiner	def_bool n
38635f9cd08SJohannes Weiner	help
38735f9cd08SJohannes Weiner	  On some platforms (XT2000, for example), the CPU clock rate can
38835f9cd08SJohannes Weiner	  vary.  The frequency can be determined, however, by measuring
38935f9cd08SJohannes Weiner	  against a well known, fixed frequency, such as an UART oscillator.
39035f9cd08SJohannes Weiner
39135f9cd08SJohannes Weinerconfig SERIAL_CONSOLE
39235f9cd08SJohannes Weiner	def_bool n
39335f9cd08SJohannes Weiner
3947af710d9SMax Filippovconfig PLATFORM_HAVE_XIP
3957af710d9SMax Filippov	def_bool n
3967af710d9SMax Filippov
3978e1a6dd2SChris Zankelmenu "Platform options"
3988e1a6dd2SChris Zankel
3998e1a6dd2SChris Zankelchoice
4008e1a6dd2SChris Zankel	prompt "Xtensa System Type"
4018e1a6dd2SChris Zankel	default XTENSA_PLATFORM_ISS
4028e1a6dd2SChris Zankel
4038e1a6dd2SChris Zankelconfig XTENSA_PLATFORM_ISS
4048e1a6dd2SChris Zankel	bool "ISS"
40535f9cd08SJohannes Weiner	select XTENSA_CALIBRATE_CCOUNT
40635f9cd08SJohannes Weiner	select SERIAL_CONSOLE
4078e1a6dd2SChris Zankel	help
4088e1a6dd2SChris Zankel	  ISS is an acronym for Tensilica's Instruction Set Simulator.
4098e1a6dd2SChris Zankel
4108e1a6dd2SChris Zankelconfig XTENSA_PLATFORM_XT2000
4118e1a6dd2SChris Zankel	bool "XT2000"
4128e1a6dd2SChris Zankel	help
4138e1a6dd2SChris Zankel	  XT2000 is the name of Tensilica's feature-rich emulation platform.
4148e1a6dd2SChris Zankel	  This hardware is capable of running a full Linux distribution.
4158e1a6dd2SChris Zankel
4160d456badSMax Filippovconfig XTENSA_PLATFORM_XTFPGA
4170d456badSMax Filippov	bool "XTFPGA"
41861e47e9bSMax Filippov	select ETHOC if ETHERNET
4193de00482SMax Filippov	select PLATFORM_WANT_DEFAULT_MEM if !MMU
4200d456badSMax Filippov	select SERIAL_CONSOLE
4210d456badSMax Filippov	select XTENSA_CALIBRATE_CCOUNT
4227af710d9SMax Filippov	select PLATFORM_HAVE_XIP
4230d456badSMax Filippov	help
4240d456badSMax Filippov	  XTFPGA is the name of Tensilica board family (LX60, LX110, LX200, ML605).
4250d456badSMax Filippov	  This hardware is capable of running a full Linux distribution.
4260d456badSMax Filippov
4278e1a6dd2SChris Zankelendchoice
4288e1a6dd2SChris Zankel
429994fa1c8SMax Filippovconfig PLATFORM_NR_IRQS
430994fa1c8SMax Filippov	int
431994fa1c8SMax Filippov	default 3 if XTENSA_PLATFORM_XT2000
432994fa1c8SMax Filippov	default 0
4338e1a6dd2SChris Zankel
4348e1a6dd2SChris Zankelconfig XTENSA_CPU_CLOCK
4358e1a6dd2SChris Zankel	int "CPU clock rate [MHz]"
4368e1a6dd2SChris Zankel	depends on !XTENSA_CALIBRATE_CCOUNT
43735f9cd08SJohannes Weiner	default 16
4388e1a6dd2SChris Zankel
4398e1a6dd2SChris Zankelconfig GENERIC_CALIBRATE_DELAY
4408e1a6dd2SChris Zankel	bool "Auto calibration of the BogoMIPS value"
44135f9cd08SJohannes Weiner	help
44282300bf4SChris Zankel	  The BogoMIPS value can easily be derived from the CPU frequency.
4438e1a6dd2SChris Zankel
4448e1a6dd2SChris Zankelconfig CMDLINE_BOOL
4458e1a6dd2SChris Zankel	bool "Default bootloader kernel arguments"
4468e1a6dd2SChris Zankel
4478e1a6dd2SChris Zankelconfig CMDLINE
4488e1a6dd2SChris Zankel	string "Initial kernel command string"
4498e1a6dd2SChris Zankel	depends on CMDLINE_BOOL
4508e1a6dd2SChris Zankel	default "console=ttyS0,38400 root=/dev/ram"
4518e1a6dd2SChris Zankel	help
4528e1a6dd2SChris Zankel	  On some architectures (EBSA110 and CATS), there is currently no way
4538e1a6dd2SChris Zankel	  for the boot loader to pass arguments to the kernel. For these
4548e1a6dd2SChris Zankel	  architectures, you should supply some command-line options at build
4558e1a6dd2SChris Zankel	  time by entering them here. As a minimum, you should specify the
4568e1a6dd2SChris Zankel	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
4578e1a6dd2SChris Zankel
458da844a81SMax Filippovconfig USE_OF
459da844a81SMax Filippov	bool "Flattened Device Tree support"
460da844a81SMax Filippov	select OF
461da844a81SMax Filippov	select OF_EARLY_FLATTREE
462da844a81SMax Filippov	help
463da844a81SMax Filippov	  Include support for flattened device tree machine descriptions.
464da844a81SMax Filippov
465687cffd3SCorentin Labbeconfig BUILTIN_DTB_SOURCE
466da844a81SMax Filippov	string "DTB to build into the kernel image"
467da844a81SMax Filippov	depends on OF
468da844a81SMax Filippov
469baac1d36SMax Filippovconfig PARSE_BOOTPARAM
470baac1d36SMax Filippov	bool "Parse bootparam block"
471baac1d36SMax Filippov	default y
472baac1d36SMax Filippov	help
473baac1d36SMax Filippov	  Parse parameters passed to the kernel from the bootloader. It may
474baac1d36SMax Filippov	  be disabled if the kernel is known to run without the bootloader.
475baac1d36SMax Filippov
476baac1d36SMax Filippov	  If unsure, say Y.
477baac1d36SMax Filippov
4786a8eb99eSMax Filippovchoice
4796a8eb99eSMax Filippov	prompt "Semihosting interface"
4806a8eb99eSMax Filippov	default XTENSA_SIMCALL_ISS
4816a8eb99eSMax Filippov	depends on XTENSA_PLATFORM_ISS
4826a8eb99eSMax Filippov	help
4836a8eb99eSMax Filippov	  Choose semihosting interface that will be used for serial port,
4846a8eb99eSMax Filippov	  block device and networking.
4856a8eb99eSMax Filippov
4866a8eb99eSMax Filippovconfig XTENSA_SIMCALL_ISS
4876a8eb99eSMax Filippov	bool "simcall"
4886a8eb99eSMax Filippov	help
4896a8eb99eSMax Filippov	  Use simcall instruction. simcall is only available on simulators,
4906a8eb99eSMax Filippov	  it does nothing on hardware.
4916a8eb99eSMax Filippov
4926a8eb99eSMax Filippovconfig XTENSA_SIMCALL_GDBIO
4936a8eb99eSMax Filippov	bool "GDBIO"
4946a8eb99eSMax Filippov	help
4956a8eb99eSMax Filippov	  Use break instruction. It is available on real hardware when GDB
4966a8eb99eSMax Filippov	  is attached to it via JTAG.
4976a8eb99eSMax Filippov
4986a8eb99eSMax Filippovendchoice
4996a8eb99eSMax Filippov
500b6c7e873SVictor Prupisconfig BLK_DEV_SIMDISK
501b6c7e873SVictor Prupis	tristate "Host file-based simulated block device support"
502b6c7e873SVictor Prupis	default n
5037a0684cdSMax Filippov	depends on XTENSA_PLATFORM_ISS && BLOCK
504b6c7e873SVictor Prupis	help
505b6c7e873SVictor Prupis	  Create block devices that map to files in the host file system.
506b6c7e873SVictor Prupis	  Device binding to host file may be changed at runtime via proc
507b6c7e873SVictor Prupis	  interface provided the device is not in use.
508b6c7e873SVictor Prupis
509b6c7e873SVictor Prupisconfig BLK_DEV_SIMDISK_COUNT
510b6c7e873SVictor Prupis	int "Number of host file-based simulated block devices"
511b6c7e873SVictor Prupis	range 1 10
512b6c7e873SVictor Prupis	depends on BLK_DEV_SIMDISK
513b6c7e873SVictor Prupis	default 2
514b6c7e873SVictor Prupis	help
515b6c7e873SVictor Prupis	  This is the default minimal number of created block devices.
516b6c7e873SVictor Prupis	  Kernel/module parameter 'simdisk_count' may be used to change this
517b6c7e873SVictor Prupis	  value at runtime. More file names (but no more than 10) may be
518b6c7e873SVictor Prupis	  specified as parameters, simdisk_count grows accordingly.
519b6c7e873SVictor Prupis
520b6c7e873SVictor Prupisconfig SIMDISK0_FILENAME
521b6c7e873SVictor Prupis	string "Host filename for the first simulated device"
522b6c7e873SVictor Prupis	depends on BLK_DEV_SIMDISK = y
523b6c7e873SVictor Prupis	default ""
524b6c7e873SVictor Prupis	help
525b6c7e873SVictor Prupis	  Attach a first simdisk to a host file. Conventionally, this file
526b6c7e873SVictor Prupis	  contains a root file system.
527b6c7e873SVictor Prupis
528b6c7e873SVictor Prupisconfig SIMDISK1_FILENAME
529b6c7e873SVictor Prupis	string "Host filename for the second simulated device"
530b6c7e873SVictor Prupis	depends on BLK_DEV_SIMDISK = y && BLK_DEV_SIMDISK_COUNT != 1
531b6c7e873SVictor Prupis	default ""
532b6c7e873SVictor Prupis	help
533b6c7e873SVictor Prupis	  Another simulated disk in a host file for a buildroot-independent
534b6c7e873SVictor Prupis	  storage.
535b6c7e873SVictor Prupis
5364949009eSMax Filippovconfig XTFPGA_LCD
5374949009eSMax Filippov	bool "Enable XTFPGA LCD driver"
5384949009eSMax Filippov	depends on XTENSA_PLATFORM_XTFPGA
5394949009eSMax Filippov	default n
5404949009eSMax Filippov	help
5414949009eSMax Filippov	  There's a 2x16 LCD on most of XTFPGA boards, kernel may output
5424949009eSMax Filippov	  progress messages there during bootup/shutdown. It may be useful
5434949009eSMax Filippov	  during board bringup.
5444949009eSMax Filippov
5454949009eSMax Filippov	  If unsure, say N.
5464949009eSMax Filippov
5474949009eSMax Filippovconfig XTFPGA_LCD_BASE_ADDR
5484949009eSMax Filippov	hex "XTFPGA LCD base address"
5494949009eSMax Filippov	depends on XTFPGA_LCD
5504949009eSMax Filippov	default "0x0d0c0000"
5514949009eSMax Filippov	help
5524949009eSMax Filippov	  Base address of the LCD controller inside KIO region.
5534949009eSMax Filippov	  Different boards from XTFPGA family have LCD controller at different
5544949009eSMax Filippov	  addresses. Please consult prototyping user guide for your board for
5554949009eSMax Filippov	  the correct address. Wrong address here may lead to hardware lockup.
5564949009eSMax Filippov
5574949009eSMax Filippovconfig XTFPGA_LCD_8BIT_ACCESS
5584949009eSMax Filippov	bool "Use 8-bit access to XTFPGA LCD"
5594949009eSMax Filippov	depends on XTFPGA_LCD
5604949009eSMax Filippov	default n
5614949009eSMax Filippov	help
5624949009eSMax Filippov	  LCD may be connected with 4- or 8-bit interface, 8-bit access may
5634949009eSMax Filippov	  only be used with 8-bit interface. Please consult prototyping user
5644949009eSMax Filippov	  guide for your board for the correct interface width.
5654949009eSMax Filippov
56676743c0eSMax Filippovcomment "Kernel memory layout"
56776743c0eSMax Filippov
56876743c0eSMax Filippovconfig INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
56976743c0eSMax Filippov	bool "Initialize Xtensa MMU inside the Linux kernel code"
57076743c0eSMax Filippov	depends on !XTENSA_VARIANT_FSF && !XTENSA_VARIANT_DC232B
57176743c0eSMax Filippov	default y if XTENSA_VARIANT_DC233C || XTENSA_VARIANT_CUSTOM
57276743c0eSMax Filippov	help
57376743c0eSMax Filippov	  Earlier version initialized the MMU in the exception vector
57476743c0eSMax Filippov	  before jumping to _startup in head.S and had an advantage that
57576743c0eSMax Filippov	  it was possible to place a software breakpoint at 'reset' and
57676743c0eSMax Filippov	  then enter your normal kernel breakpoints once the MMU was mapped
57776743c0eSMax Filippov	  to the kernel mappings (0XC0000000).
57876743c0eSMax Filippov
5798a128bc3SColin Ian King	  This unfortunately won't work for U-Boot and likely also won't
58076743c0eSMax Filippov	  work for using KEXEC to have a hot kernel ready for doing a
58176743c0eSMax Filippov	  KDUMP.
58276743c0eSMax Filippov
58376743c0eSMax Filippov	  So now the MMU is initialized in head.S but it's necessary to
58476743c0eSMax Filippov	  use hardware breakpoints (gdb 'hbreak' cmd) to break at _startup.
58576743c0eSMax Filippov	  xt-gdb can't place a Software Breakpoint in the  0XD region prior
58676743c0eSMax Filippov	  to mapping the MMU and after mapping even if the area of low memory
58776743c0eSMax Filippov	  was mapped gdb wouldn't remove the breakpoint on hitting it as the
58876743c0eSMax Filippov	  PC wouldn't match. Since Hardware Breakpoints are recommended for
58976743c0eSMax Filippov	  Linux configurations it seems reasonable to just assume they exist
59076743c0eSMax Filippov	  and leave this older mechanism for unfortunate souls that choose
59176743c0eSMax Filippov	  not to follow Tensilica's recommendation.
59276743c0eSMax Filippov
59376743c0eSMax Filippov	  Selecting this will cause U-Boot to set the KERNEL Load and Entry
59476743c0eSMax Filippov	  address at 0x00003000 instead of the mapped std of 0xD0003000.
59576743c0eSMax Filippov
59676743c0eSMax Filippov	  If in doubt, say Y.
59776743c0eSMax Filippov
5987af710d9SMax Filippovconfig XIP_KERNEL
5997af710d9SMax Filippov	bool "Kernel Execute-In-Place from ROM"
6007af710d9SMax Filippov	depends on PLATFORM_HAVE_XIP
6017af710d9SMax Filippov	help
6027af710d9SMax Filippov	  Execute-In-Place allows the kernel to run from non-volatile storage
6037af710d9SMax Filippov	  directly addressable by the CPU, such as NOR flash. This saves RAM
6047af710d9SMax Filippov	  space since the text section of the kernel is not loaded from flash
6057af710d9SMax Filippov	  to RAM. Read-write sections, such as the data section and stack,
6067af710d9SMax Filippov	  are still copied to RAM. The XIP kernel is not compressed since
6077af710d9SMax Filippov	  it has to run directly from flash, so it will take more space to
6087af710d9SMax Filippov	  store it. The flash address used to link the kernel object files,
6097af710d9SMax Filippov	  and for storing it, is configuration dependent. Therefore, if you
6107af710d9SMax Filippov	  say Y here, you must know the proper physical address where to
6117af710d9SMax Filippov	  store the kernel image depending on your own flash memory usage.
6127af710d9SMax Filippov
6137af710d9SMax Filippov	  Also note that the make target becomes "make xipImage" rather than
6147af710d9SMax Filippov	  "make Image" or "make uImage". The final kernel binary to put in
6157af710d9SMax Filippov	  ROM memory will be arch/xtensa/boot/xipImage.
6167af710d9SMax Filippov
6177af710d9SMax Filippov	  If unsure, say N.
6187af710d9SMax Filippov
61976743c0eSMax Filippovconfig MEMMAP_CACHEATTR
62076743c0eSMax Filippov	hex "Cache attributes for the memory address space"
62176743c0eSMax Filippov	depends on !MMU
62276743c0eSMax Filippov	default 0x22222222
62376743c0eSMax Filippov	help
62476743c0eSMax Filippov	  These cache attributes are set up for noMMU systems. Each hex digit
62576743c0eSMax Filippov	  specifies cache attributes for the corresponding 512MB memory
62676743c0eSMax Filippov	  region: bits 0..3 -- for addresses 0x00000000..0x1fffffff,
62776743c0eSMax Filippov	  bits 4..7 -- for addresses 0x20000000..0x3fffffff, and so on.
62876743c0eSMax Filippov
62976743c0eSMax Filippov	  Cache attribute values are specific for the MMU type.
63076743c0eSMax Filippov	  For region protection MMUs:
63176743c0eSMax Filippov	    1: WT cached,
63276743c0eSMax Filippov	    2: cache bypass,
63376743c0eSMax Filippov	    4: WB cached,
63476743c0eSMax Filippov	    f: illegal.
6352a9b29b2SRandy Dunlap	  For full MMU:
63676743c0eSMax Filippov	    bit 0: executable,
63776743c0eSMax Filippov	    bit 1: writable,
63876743c0eSMax Filippov	    bits 2..3:
63976743c0eSMax Filippov	      0: cache bypass,
64076743c0eSMax Filippov	      1: WB cache,
64176743c0eSMax Filippov	      2: WT cache,
64276743c0eSMax Filippov	      3: special (c and e are illegal, f is reserved).
64376743c0eSMax Filippov	  For MPU:
64476743c0eSMax Filippov	    0: illegal,
64576743c0eSMax Filippov	    1: WB cache,
64676743c0eSMax Filippov	    2: WB, no-write-allocate cache,
64776743c0eSMax Filippov	    3: WT cache,
64876743c0eSMax Filippov	    4: cache bypass.
64976743c0eSMax Filippov
65076743c0eSMax Filippovconfig KSEG_PADDR
65176743c0eSMax Filippov	hex "Physical address of the KSEG mapping"
65276743c0eSMax Filippov	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX && MMU
65376743c0eSMax Filippov	default 0x00000000
65476743c0eSMax Filippov	help
65576743c0eSMax Filippov	  This is the physical address where KSEG is mapped. Please refer to
65676743c0eSMax Filippov	  the chosen KSEG layout help for the required address alignment.
65776743c0eSMax Filippov	  Unpacked kernel image (including vectors) must be located completely
65876743c0eSMax Filippov	  within KSEG.
65976743c0eSMax Filippov	  Physical memory below this address is not available to linux.
66076743c0eSMax Filippov
66176743c0eSMax Filippov	  If unsure, leave the default value here.
66276743c0eSMax Filippov
6637af710d9SMax Filippovconfig KERNEL_VIRTUAL_ADDRESS
6647af710d9SMax Filippov	hex "Kernel virtual address"
6657af710d9SMax Filippov	depends on MMU && XIP_KERNEL
6667af710d9SMax Filippov	default 0xd0003000
6677af710d9SMax Filippov	help
6687af710d9SMax Filippov	  This is the virtual address where the XIP kernel is mapped.
6697af710d9SMax Filippov	  XIP kernel may be mapped into KSEG or KIO region, virtual address
6707af710d9SMax Filippov	  provided here must match kernel load address provided in
6717af710d9SMax Filippov	  KERNEL_LOAD_ADDRESS.
6727af710d9SMax Filippov
67376743c0eSMax Filippovconfig KERNEL_LOAD_ADDRESS
67476743c0eSMax Filippov	hex "Kernel load address"
67576743c0eSMax Filippov	default 0x60003000 if !MMU
67676743c0eSMax Filippov	default 0x00003000 if MMU && INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
67776743c0eSMax Filippov	default 0xd0003000 if MMU && !INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
67876743c0eSMax Filippov	help
67976743c0eSMax Filippov	  This is the address where the kernel is loaded.
68076743c0eSMax Filippov	  It is virtual address for MMUv2 configurations and physical address
68176743c0eSMax Filippov	  for all other configurations.
68276743c0eSMax Filippov
68376743c0eSMax Filippov	  If unsure, leave the default value here.
68476743c0eSMax Filippov
6855e4417f9SMax Filippovchoice
6865e4417f9SMax Filippov	prompt "Relocatable vectors location"
6875e4417f9SMax Filippov	default XTENSA_VECTORS_IN_TEXT
68876743c0eSMax Filippov	help
6895e4417f9SMax Filippov	  Choose whether relocatable vectors are merged into the kernel .text
6905e4417f9SMax Filippov	  or placed separately at runtime. This option does not affect
6915e4417f9SMax Filippov	  configurations without VECBASE register where vectors are always
6925e4417f9SMax Filippov	  placed at their hardware-defined locations.
69376743c0eSMax Filippov
6945e4417f9SMax Filippovconfig XTENSA_VECTORS_IN_TEXT
6955e4417f9SMax Filippov	bool "Merge relocatable vectors into kernel text"
6965e4417f9SMax Filippov	depends on !MTD_XIP
6975e4417f9SMax Filippov	help
6985e4417f9SMax Filippov	  This option puts relocatable vectors into the kernel .text section
6995e4417f9SMax Filippov	  with proper alignment.
7005e4417f9SMax Filippov	  This is a safe choice for most configurations.
7015e4417f9SMax Filippov
7025e4417f9SMax Filippovconfig XTENSA_VECTORS_SEPARATE
7035e4417f9SMax Filippov	bool "Put relocatable vectors at fixed address"
7045e4417f9SMax Filippov	help
7055e4417f9SMax Filippov	  This option puts relocatable vectors at specific virtual address.
7065e4417f9SMax Filippov	  Vectors are merged with the .init data in the kernel image and
7075e4417f9SMax Filippov	  are copied into their designated location during kernel startup.
7085e4417f9SMax Filippov	  Use it to put vectors into IRAM or out of FLASH on kernels with
7095e4417f9SMax Filippov	  XIP-aware MTD support.
7105e4417f9SMax Filippov
7115e4417f9SMax Filippovendchoice
7125e4417f9SMax Filippov
7135e4417f9SMax Filippovconfig VECTORS_ADDR
7145e4417f9SMax Filippov	hex "Kernel vectors virtual address"
7155e4417f9SMax Filippov	default 0x00000000
7165e4417f9SMax Filippov	depends on XTENSA_VECTORS_SEPARATE
7175e4417f9SMax Filippov	help
7185e4417f9SMax Filippov	  This is the virtual address of the (relocatable) vectors base.
7195e4417f9SMax Filippov	  It must be within KSEG if MMU is used.
72076743c0eSMax Filippov
7217af710d9SMax Filippovconfig XIP_DATA_ADDR
7227af710d9SMax Filippov	hex "XIP kernel data virtual address"
7237af710d9SMax Filippov	depends on XIP_KERNEL
7247af710d9SMax Filippov	default 0x00000000
7257af710d9SMax Filippov	help
7267af710d9SMax Filippov	  This is the virtual address where XIP kernel data is copied.
7277af710d9SMax Filippov	  It must be within KSEG if MMU is used.
7287af710d9SMax Filippov
72976743c0eSMax Filippovconfig PLATFORM_WANT_DEFAULT_MEM
73076743c0eSMax Filippov	def_bool n
73176743c0eSMax Filippov
73276743c0eSMax Filippovconfig DEFAULT_MEM_START
73376743c0eSMax Filippov	hex
73476743c0eSMax Filippov	prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM
73576743c0eSMax Filippov	default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM
73676743c0eSMax Filippov	default 0x00000000
73776743c0eSMax Filippov	help
73876743c0eSMax Filippov	  This is the base address used for both PAGE_OFFSET and PHYS_OFFSET
73976743c0eSMax Filippov	  in noMMU configurations.
74076743c0eSMax Filippov
74176743c0eSMax Filippov	  If unsure, leave the default value here.
74276743c0eSMax Filippov
74376743c0eSMax Filippovchoice
74476743c0eSMax Filippov	prompt "KSEG layout"
74576743c0eSMax Filippov	depends on MMU
74676743c0eSMax Filippov	default XTENSA_KSEG_MMU_V2
74776743c0eSMax Filippov
74876743c0eSMax Filippovconfig XTENSA_KSEG_MMU_V2
74976743c0eSMax Filippov	bool "MMUv2: 128MB cached + 128MB uncached"
75076743c0eSMax Filippov	help
75176743c0eSMax Filippov	  MMUv2 compatible kernel memory map: TLB way 5 maps 128MB starting
75276743c0eSMax Filippov	  at KSEG_PADDR to 0xd0000000 with cache and to 0xd8000000
75376743c0eSMax Filippov	  without cache.
75476743c0eSMax Filippov	  KSEG_PADDR must be aligned to 128MB.
75576743c0eSMax Filippov
75676743c0eSMax Filippovconfig XTENSA_KSEG_256M
75776743c0eSMax Filippov	bool "256MB cached + 256MB uncached"
75876743c0eSMax Filippov	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
75976743c0eSMax Filippov	help
76076743c0eSMax Filippov	  TLB way 6 maps 256MB starting at KSEG_PADDR to 0xb0000000
76176743c0eSMax Filippov	  with cache and to 0xc0000000 without cache.
76276743c0eSMax Filippov	  KSEG_PADDR must be aligned to 256MB.
76376743c0eSMax Filippov
76476743c0eSMax Filippovconfig XTENSA_KSEG_512M
76576743c0eSMax Filippov	bool "512MB cached + 512MB uncached"
76676743c0eSMax Filippov	depends on INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX
76776743c0eSMax Filippov	help
76876743c0eSMax Filippov	  TLB way 6 maps 512MB starting at KSEG_PADDR to 0xa0000000
76976743c0eSMax Filippov	  with cache and to 0xc0000000 without cache.
77076743c0eSMax Filippov	  KSEG_PADDR must be aligned to 256MB.
77176743c0eSMax Filippov
77276743c0eSMax Filippovendchoice
77376743c0eSMax Filippov
77476743c0eSMax Filippovconfig HIGHMEM
77576743c0eSMax Filippov	bool "High Memory Support"
77676743c0eSMax Filippov	depends on MMU
777629ed3f7SThomas Gleixner	select KMAP_LOCAL
77876743c0eSMax Filippov	help
77976743c0eSMax Filippov	  Linux can use the full amount of RAM in the system by
78076743c0eSMax Filippov	  default. However, the default MMUv2 setup only maps the
78176743c0eSMax Filippov	  lowermost 128 MB of memory linearly to the areas starting
78276743c0eSMax Filippov	  at 0xd0000000 (cached) and 0xd8000000 (uncached).
78376743c0eSMax Filippov	  When there are more than 128 MB memory in the system not
78476743c0eSMax Filippov	  all of it can be "permanently mapped" by the kernel.
78576743c0eSMax Filippov	  The physical memory that's not permanently mapped is called
78676743c0eSMax Filippov	  "high memory".
78776743c0eSMax Filippov
78876743c0eSMax Filippov	  If you are compiling a kernel which will never run on a
78976743c0eSMax Filippov	  machine with more than 128 MB total physical RAM, answer
79076743c0eSMax Filippov	  N here.
79176743c0eSMax Filippov
79276743c0eSMax Filippov	  If unsure, say Y.
79376743c0eSMax Filippov
7940192445cSZi Yanconfig ARCH_FORCE_MAX_ORDER
7954519a254SMike Rapoport (IBM)	int "Order of maximal physically contiguous allocations"
79623baf831SKirill A. Shutemov	default "10"
79776743c0eSMax Filippov	help
7984519a254SMike Rapoport (IBM)	  The kernel page allocator limits the size of maximal physically
7995e0a760bSKirill A. Shutemov	  contiguous allocations. The limit is called MAX_PAGE_ORDER and it
8004519a254SMike Rapoport (IBM)	  defines the maximal power of two of number of pages that can be
8014519a254SMike Rapoport (IBM)	  allocated as a single contiguous block. This option allows
8024519a254SMike Rapoport (IBM)	  overriding the default setting when ability to allocate very
8034519a254SMike Rapoport (IBM)	  large blocks of physically contiguous memory is required.
8044519a254SMike Rapoport (IBM)
8054519a254SMike Rapoport (IBM)	  Don't change if unsure.
80676743c0eSMax Filippov
8078e1a6dd2SChris Zankelendmenu
8088e1a6dd2SChris Zankel
809e00d8b2fSMax Filippovmenu "Power management options"
810e00d8b2fSMax Filippov
811733f5c28SMax Filippovconfig ARCH_HIBERNATION_POSSIBLE
812733f5c28SMax Filippov	def_bool y
813733f5c28SMax Filippov
814e00d8b2fSMax Filippovsource "kernel/power/Kconfig"
815e00d8b2fSMax Filippov
816e00d8b2fSMax Filippovendmenu
817