1# SPDX-License-Identifier: GPL-2.0-only
2config MICROBLAZE
3	def_bool y
4	select ARCH_32BIT_OFF_T
5	select ARCH_NO_SWAP
6	select ARCH_HAS_DMA_PREP_COHERENT
7	select ARCH_HAS_GCOV_PROFILE_ALL
8	select ARCH_HAS_SYNC_DMA_FOR_CPU
9	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
10	select ARCH_MIGHT_HAVE_PC_PARPORT
11	select ARCH_WANT_IPC_PARSE_VERSION
12	select BUILDTIME_TABLE_SORT
13	select TIMER_OF
14	select CLONE_BACKWARDS3
15	select COMMON_CLK
16	select DMA_DIRECT_REMAP
17	select GENERIC_ATOMIC64
18	select GENERIC_CPU_DEVICES
19	select GENERIC_IDLE_POLL_SETUP
20	select GENERIC_IRQ_PROBE
21	select GENERIC_IRQ_SHOW
22	select GENERIC_PCI_IOMAP
23	select GENERIC_SCHED_CLOCK
24	select HAS_IOPORT if PCI
25	select HAVE_ARCH_HASH
26	select HAVE_ARCH_KGDB
27	select HAVE_ARCH_SECCOMP
28	select HAVE_DEBUG_KMEMLEAK
29	select HAVE_DMA_CONTIGUOUS
30	select HAVE_DYNAMIC_FTRACE
31	select HAVE_FTRACE_MCOUNT_RECORD
32	select HAVE_FUNCTION_GRAPH_TRACER
33	select HAVE_FUNCTION_TRACER
34	select HAVE_PCI
35	select IRQ_DOMAIN
36	select XILINX_INTC
37	select MODULES_USE_ELF_RELA
38	select OF
39	select OF_EARLY_FLATTREE
40	select PCI_DOMAINS_GENERIC if PCI
41	select PCI_SYSCALL if PCI
42	select CPU_NO_EFFICIENT_FFS
43	select MMU_GATHER_NO_RANGE
44	select SPARSE_IRQ
45	select ZONE_DMA
46	select TRACE_IRQFLAGS_SUPPORT
47	select GENERIC_IRQ_MULTI_HANDLER
48
49# Endianness selection
50choice
51	prompt "Endianness selection"
52	default CPU_LITTLE_ENDIAN
53	help
54	  microblaze architectures can be configured for either little or
55	  big endian formats. Be sure to select the appropriate mode.
56
57config CPU_BIG_ENDIAN
58	bool "Big endian"
59
60config CPU_LITTLE_ENDIAN
61	bool "Little endian"
62
63endchoice
64
65config ARCH_HAS_ILOG2_U32
66	def_bool n
67
68config ARCH_HAS_ILOG2_U64
69	def_bool n
70
71config GENERIC_HWEIGHT
72	def_bool y
73
74config GENERIC_CALIBRATE_DELAY
75	def_bool y
76
77config GENERIC_CSUM
78	def_bool y
79
80config STACKTRACE_SUPPORT
81	def_bool y
82
83config LOCKDEP_SUPPORT
84	def_bool y
85
86source "arch/microblaze/Kconfig.platform"
87
88menu "Processor type and features"
89
90source "kernel/Kconfig.hz"
91
92config MMU
93	def_bool y
94
95comment "Boot options"
96
97config CMDLINE_BOOL
98	bool "Default bootloader kernel arguments"
99
100config CMDLINE
101	string "Default kernel command string"
102	depends on CMDLINE_BOOL
103	default "console=ttyUL0,115200"
104	help
105	  On some architectures there is currently no way for the boot loader
106	  to pass arguments to the kernel. For these architectures, you should
107	  supply some command-line options at build time by entering them
108	  here.
109
110config CMDLINE_FORCE
111	bool "Force default kernel command string"
112	depends on CMDLINE_BOOL
113	default n
114	help
115	  Set this to have arguments from the default kernel command string
116	  override those passed by the boot loader.
117
118endmenu
119
120menu "Kernel features"
121
122config NR_CPUS
123	int
124	default "1"
125
126config ADVANCED_OPTIONS
127	bool "Prompt for advanced kernel configuration options"
128	help
129	  This option will enable prompting for a variety of advanced kernel
130	  configuration options.  These options can cause the kernel to not
131	  work if they are set incorrectly, but can be used to optimize certain
132	  aspects of kernel memory management.
133
134	  Unless you know what you are doing, say N here.
135
136comment "Default settings for advanced configuration options are used"
137	depends on !ADVANCED_OPTIONS
138
139config HIGHMEM
140	bool "High memory support"
141	select KMAP_LOCAL
142	help
143	  The address space of Microblaze processors is only 4 Gigabytes large
144	  and it has to accommodate user address space, kernel address
145	  space as well as some memory mapped IO. That means that, if you
146	  have a large amount of physical memory and/or IO, not all of the
147	  memory can be "permanently mapped" by the kernel. The physical
148	  memory that is not permanently mapped is called "high memory".
149
150	  If unsure, say n.
151
152config LOWMEM_SIZE_BOOL
153	bool "Set maximum low memory"
154	depends on ADVANCED_OPTIONS
155	help
156	  This option allows you to set the maximum amount of memory which
157	  will be used as "low memory", that is, memory which the kernel can
158	  access directly, without having to set up a kernel virtual mapping.
159	  This can be useful in optimizing the layout of kernel virtual
160	  memory.
161
162	  Say N here unless you know what you are doing.
163
164config LOWMEM_SIZE
165	hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
166	default "0x30000000"
167
168config MANUAL_RESET_VECTOR
169	hex "Microblaze reset vector address setup"
170	default "0x0"
171	help
172	  Set this option to have the kernel override the CPU Reset vector.
173	  If zero, no change will be made to the MicroBlaze reset vector at
174	  address 0x0.
175	  If non-zero, a jump instruction to this address, will be written
176	  to the reset vector at address 0x0.
177	  If you are unsure, set it to default value 0x0.
178
179config KERNEL_START_BOOL
180	bool "Set custom kernel base address"
181	depends on ADVANCED_OPTIONS
182	help
183	  This option allows you to set the kernel virtual address at which
184	  the kernel will map low memory (the kernel image will be linked at
185	  this address).  This can be useful in optimizing the virtual memory
186	  layout of the system.
187
188	  Say N here unless you know what you are doing.
189
190config KERNEL_START
191	hex "Virtual address of kernel base" if KERNEL_START_BOOL
192	default "0xc0000000"
193
194config TASK_SIZE_BOOL
195	bool "Set custom user task size"
196	depends on ADVANCED_OPTIONS
197	help
198	  This option allows you to set the amount of virtual address space
199	  allocated to user tasks.  This can be useful in optimizing the
200	  virtual memory layout of the system.
201
202	  Say N here unless you know what you are doing.
203
204config TASK_SIZE
205	hex "Size of user task space" if TASK_SIZE_BOOL
206	default "0x80000000"
207
208config MB_MANAGER
209	bool "Support for Microblaze Manager"
210	depends on ADVANCED_OPTIONS
211	help
212	  This option enables API for configuring the MicroBlaze manager
213	  control register, which is consumed by the break handler to
214	  block the break.
215
216	  Say N here unless you know what you are doing.
217
218endmenu
219