xref: /openbmc/linux/arch/riscv/Kconfig (revision cc8c418b)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# For a description of the syntax of this configuration file,
4# see Documentation/kbuild/kconfig-language.rst.
5#
6
7config 64BIT
8	bool
9
10config 32BIT
11	bool
12
13config RISCV
14	def_bool y
15	select ARCH_CLOCKSOURCE_INIT
16	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
17	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
18	select ARCH_HAS_BINFMT_FLAT
19	select ARCH_HAS_CURRENT_STACK_POINTER
20	select ARCH_HAS_DEBUG_VM_PGTABLE
21	select ARCH_HAS_DEBUG_VIRTUAL if MMU
22	select ARCH_HAS_DEBUG_WX
23	select ARCH_HAS_FORTIFY_SOURCE
24	select ARCH_HAS_GCOV_PROFILE_ALL
25	select ARCH_HAS_GIGANTIC_PAGE
26	select ARCH_HAS_KCOV
27	select ARCH_HAS_MMIOWB
28	select ARCH_HAS_PTE_SPECIAL
29	select ARCH_HAS_SET_DIRECT_MAP if MMU
30	select ARCH_HAS_SET_MEMORY if MMU
31	select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
32	select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
33	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
34	select ARCH_HAS_UBSAN_SANITIZE_ALL
35	select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
36	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
37	select ARCH_STACKWALK
38	select ARCH_SUPPORTS_ATOMIC_RMW
39	select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
40	select ARCH_SUPPORTS_HUGETLBFS if MMU
41	select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
42	select ARCH_USE_MEMTEST
43	select ARCH_USE_QUEUED_RWLOCKS
44	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
45	select ARCH_WANT_FRAME_POINTERS
46	select ARCH_WANT_GENERAL_HUGETLB
47	select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
48	select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
49	select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
50	select BUILDTIME_TABLE_SORT if MMU
51	select CLONE_BACKWARDS
52	select CLINT_TIMER if !MMU
53	select COMMON_CLK
54	select CPU_PM if CPU_IDLE
55	select EDAC_SUPPORT
56	select GENERIC_ARCH_TOPOLOGY
57	select GENERIC_ATOMIC64 if !64BIT
58	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
59	select GENERIC_EARLY_IOREMAP
60	select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
61	select GENERIC_IDLE_POLL_SETUP
62	select GENERIC_IOREMAP if MMU
63	select GENERIC_IRQ_MULTI_HANDLER
64	select GENERIC_IRQ_SHOW
65	select GENERIC_IRQ_SHOW_LEVEL
66	select GENERIC_LIB_DEVMEM_IS_ALLOWED
67	select GENERIC_PCI_IOMAP
68	select GENERIC_PTDUMP if MMU
69	select GENERIC_SCHED_CLOCK
70	select GENERIC_SMP_IDLE_THREAD
71	select GENERIC_TIME_VSYSCALL if MMU && 64BIT
72	select GENERIC_VDSO_TIME_NS if HAVE_GENERIC_VDSO
73	select HARDIRQS_SW_RESEND
74	select HAVE_ARCH_AUDITSYSCALL
75	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
76	select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
77	select HAVE_ARCH_KASAN if MMU && 64BIT
78	select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
79	select HAVE_ARCH_KFENCE if MMU && 64BIT
80	select HAVE_ARCH_KGDB if !XIP_KERNEL
81	select HAVE_ARCH_KGDB_QXFER_PKT
82	select HAVE_ARCH_MMAP_RND_BITS if MMU
83	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
84	select HAVE_ARCH_SECCOMP_FILTER
85	select HAVE_ARCH_TRACEHOOK
86	select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
87	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
88	select HAVE_ARCH_THREAD_STRUCT_WHITELIST
89	select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
90	select HAVE_ASM_MODVERSIONS
91	select HAVE_CONTEXT_TRACKING_USER
92	select HAVE_DEBUG_KMEMLEAK
93	select HAVE_DMA_CONTIGUOUS if MMU
94	select HAVE_EBPF_JIT if MMU
95	select HAVE_FUNCTION_ERROR_INJECTION
96	select HAVE_GCC_PLUGINS
97	select HAVE_GENERIC_VDSO if MMU && 64BIT
98	select HAVE_IRQ_TIME_ACCOUNTING
99	select HAVE_KPROBES if !XIP_KERNEL
100	select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
101	select HAVE_KRETPROBES if !XIP_KERNEL
102	select HAVE_MOVE_PMD
103	select HAVE_MOVE_PUD
104	select HAVE_PCI
105	select HAVE_PERF_EVENTS
106	select HAVE_PERF_REGS
107	select HAVE_PERF_USER_STACK_DUMP
108	select HAVE_POSIX_CPU_TIMERS_TASK_WORK
109	select HAVE_REGS_AND_STACK_ACCESS_API
110	select HAVE_FUNCTION_ARG_ACCESS_API
111	select HAVE_STACKPROTECTOR
112	select HAVE_SYSCALL_TRACEPOINTS
113	select HAVE_RSEQ
114	select IRQ_DOMAIN
115	select IRQ_FORCED_THREADING
116	select MODULES_USE_ELF_RELA if MODULES
117	select MODULE_SECTIONS if MODULES
118	select OF
119	select OF_DMA_DEFAULT_COHERENT
120	select OF_EARLY_FLATTREE
121	select OF_IRQ
122	select PCI_DOMAINS_GENERIC if PCI
123	select PCI_MSI if PCI
124	select RISCV_INTC
125	select RISCV_TIMER if RISCV_SBI
126	select SPARSE_IRQ
127	select SYSCTL_EXCEPTION_TRACE
128	select THREAD_INFO_IN_TASK
129	select TRACE_IRQFLAGS_SUPPORT
130	select UACCESS_MEMCPY if !MMU
131	select ZONE_DMA32 if 64BIT
132
133config ARCH_MMAP_RND_BITS_MIN
134	default 18 if 64BIT
135	default 8
136
137config ARCH_MMAP_RND_COMPAT_BITS_MIN
138	default 8
139
140# max bits determined by the following formula:
141#  VA_BITS - PAGE_SHIFT - 3
142config ARCH_MMAP_RND_BITS_MAX
143	default 24 if 64BIT # SV39 based
144	default 17
145
146config ARCH_MMAP_RND_COMPAT_BITS_MAX
147	default 17
148
149# set if we run in machine mode, cleared if we run in supervisor mode
150config RISCV_M_MODE
151	bool
152	default !MMU
153
154# set if we are running in S-mode and can use SBI calls
155config RISCV_SBI
156	bool
157	depends on !RISCV_M_MODE
158	default y
159
160config MMU
161	bool "MMU-based Paged Memory Management Support"
162	default y
163	help
164	  Select if you want MMU-based virtualised addressing space
165	  support by paged memory management. If unsure, say 'Y'.
166
167config PAGE_OFFSET
168	hex
169	default 0xC0000000 if 32BIT
170	default 0x80000000 if 64BIT && !MMU
171	default 0xff60000000000000 if 64BIT
172
173config KASAN_SHADOW_OFFSET
174	hex
175	depends on KASAN_GENERIC
176	default 0xdfffffff00000000 if 64BIT
177	default 0xffffffff if 32BIT
178
179config ARCH_FLATMEM_ENABLE
180	def_bool !NUMA
181
182config ARCH_SPARSEMEM_ENABLE
183	def_bool y
184	depends on MMU
185	select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
186	select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
187
188config ARCH_SELECT_MEMORY_MODEL
189	def_bool ARCH_SPARSEMEM_ENABLE
190
191config ARCH_SUPPORTS_UPROBES
192	def_bool y
193
194config STACKTRACE_SUPPORT
195	def_bool y
196
197config GENERIC_BUG
198	def_bool y
199	depends on BUG
200	select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
201
202config GENERIC_BUG_RELATIVE_POINTERS
203	bool
204
205config GENERIC_CALIBRATE_DELAY
206	def_bool y
207
208config GENERIC_CSUM
209	def_bool y
210
211config GENERIC_HWEIGHT
212	def_bool y
213
214config FIX_EARLYCON_MEM
215	def_bool MMU
216
217config PGTABLE_LEVELS
218	int
219	default 5 if 64BIT
220	default 2
221
222config LOCKDEP_SUPPORT
223	def_bool y
224
225config RISCV_DMA_NONCOHERENT
226	bool
227	select ARCH_HAS_DMA_PREP_COHERENT
228	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
229	select ARCH_HAS_SYNC_DMA_FOR_CPU
230	select ARCH_HAS_SETUP_DMA_OPS
231	select DMA_DIRECT_REMAP
232
233config AS_HAS_INSN
234	def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero)
235
236source "arch/riscv/Kconfig.socs"
237source "arch/riscv/Kconfig.erratas"
238
239menu "Platform type"
240
241config NONPORTABLE
242	bool "Allow configurations that result in non-portable kernels"
243	help
244	  RISC-V kernel binaries are compatible between all known systems
245	  whenever possible, but there are some use cases that can only be
246	  satisfied by configurations that result in kernel binaries that are
247	  not portable between systems.
248
249	  Selecting N does not guarantee kernels will be portable to all known
250	  systems.  Selecting any of the options guarded by NONPORTABLE will
251	  result in kernel binaries that are unlikely to be portable between
252	  systems.
253
254	  If unsure, say N.
255
256choice
257	prompt "Base ISA"
258	default ARCH_RV64I
259	help
260	  This selects the base ISA that this kernel will target and must match
261	  the target platform.
262
263config ARCH_RV32I
264	bool "RV32I"
265	depends on NONPORTABLE
266	select 32BIT
267	select GENERIC_LIB_ASHLDI3
268	select GENERIC_LIB_ASHRDI3
269	select GENERIC_LIB_LSHRDI3
270	select GENERIC_LIB_UCMPDI2
271	select MMU
272
273config ARCH_RV64I
274	bool "RV64I"
275	select 64BIT
276	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
277	select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8)
278	select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
279	select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
280	select HAVE_FUNCTION_GRAPH_TRACER
281	select HAVE_FUNCTION_TRACER if !XIP_KERNEL
282	select SWIOTLB if MMU
283
284endchoice
285
286# We must be able to map all physical memory into the kernel, but the compiler
287# is still a bit more efficient when generating code if it's setup in a manner
288# such that it can only map 2GiB of memory.
289choice
290	prompt "Kernel Code Model"
291	default CMODEL_MEDLOW if 32BIT
292	default CMODEL_MEDANY if 64BIT
293
294	config CMODEL_MEDLOW
295		bool "medium low code model"
296	config CMODEL_MEDANY
297		bool "medium any code model"
298endchoice
299
300config MODULE_SECTIONS
301	bool
302	select HAVE_MOD_ARCH_SPECIFIC
303
304config SMP
305	bool "Symmetric Multi-Processing"
306	help
307	  This enables support for systems with more than one CPU.  If
308	  you say N here, the kernel will run on single and
309	  multiprocessor machines, but will use only one CPU of a
310	  multiprocessor machine. If you say Y here, the kernel will run
311	  on many, but not all, single processor machines. On a single
312	  processor machine, the kernel will run faster if you say N
313	  here.
314
315	  If you don't know what to do here, say N.
316
317config NR_CPUS
318	int "Maximum number of CPUs (2-512)"
319	depends on SMP
320	range 2 512 if !SBI_V01
321	range 2 32 if SBI_V01 && 32BIT
322	range 2 64 if SBI_V01 && 64BIT
323	default "32" if 32BIT
324	default "64" if 64BIT
325
326config HOTPLUG_CPU
327	bool "Support for hot-pluggable CPUs"
328	depends on SMP
329	select GENERIC_IRQ_MIGRATION
330	help
331
332	  Say Y here to experiment with turning CPUs off and on.  CPUs
333	  can be controlled through /sys/devices/system/cpu.
334
335	  Say N if you want to disable CPU hotplug.
336
337choice
338	prompt "CPU Tuning"
339	default TUNE_GENERIC
340
341config TUNE_GENERIC
342	bool "generic"
343
344endchoice
345
346# Common NUMA Features
347config NUMA
348	bool "NUMA Memory Allocation and Scheduler Support"
349	depends on SMP && MMU
350	select GENERIC_ARCH_NUMA
351	select OF_NUMA
352	select ARCH_SUPPORTS_NUMA_BALANCING
353	select USE_PERCPU_NUMA_NODE_ID
354	select NEED_PER_CPU_EMBED_FIRST_CHUNK
355	help
356	  Enable NUMA (Non-Uniform Memory Access) support.
357
358	  The kernel will try to allocate memory used by a CPU on the
359	  local memory of the CPU and add some more NUMA awareness to the kernel.
360
361config NODES_SHIFT
362	int "Maximum NUMA Nodes (as a power of 2)"
363	range 1 10
364	default "2"
365	depends on NUMA
366	help
367	  Specify the maximum number of NUMA Nodes available on the target
368	  system.  Increases memory reserved to accommodate various tables.
369
370config RISCV_ALTERNATIVE
371	bool
372	depends on !XIP_KERNEL
373	help
374	  This Kconfig allows the kernel to automatically patch the
375	  errata required by the execution platform at run time. The
376	  code patching is performed once in the boot stages. It means
377	  that the overhead from this mechanism is just taken once.
378
379config RISCV_ALTERNATIVE_EARLY
380	bool
381	depends on RISCV_ALTERNATIVE
382	help
383	  Allows early patching of the kernel for special errata
384
385config RISCV_ISA_C
386	bool "Emit compressed instructions when building Linux"
387	default y
388	help
389	  Adds "C" to the ISA subsets that the toolchain is allowed to emit
390	  when building Linux, which results in compressed instructions in the
391	  Linux binary.
392
393	  If you don't know what to do here, say Y.
394
395config RISCV_ISA_SVPBMT
396	bool "SVPBMT extension support"
397	depends on 64BIT && MMU
398	depends on !XIP_KERNEL
399	select RISCV_ALTERNATIVE
400	default y
401	help
402	   Adds support to dynamically detect the presence of the SVPBMT
403	   ISA-extension (Supervisor-mode: page-based memory types) and
404	   enable its usage.
405
406	   The memory type for a page contains a combination of attributes
407	   that indicate the cacheability, idempotency, and ordering
408	   properties for access to that page.
409
410	   The SVPBMT extension is only available on 64Bit cpus.
411
412	   If you don't know what to do here, say Y.
413
414config CC_HAS_ZICBOM
415	bool
416	default y if 64BIT && $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
417	default y if 32BIT && $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
418
419config RISCV_ISA_ZICBOM
420	bool "Zicbom extension support for non-coherent DMA operation"
421	depends on CC_HAS_ZICBOM
422	depends on !XIP_KERNEL && MMU
423	select RISCV_DMA_NONCOHERENT
424	select RISCV_ALTERNATIVE
425	default y
426	help
427	   Adds support to dynamically detect the presence of the ZICBOM
428	   extension (Cache Block Management Operations) and enable its
429	   usage.
430
431	   The Zicbom extension can be used to handle for example
432	   non-coherent DMA support on devices that need it.
433
434	   If you don't know what to do here, say Y.
435
436config FPU
437	bool "FPU support"
438	default y
439	help
440	  Say N here if you want to disable all floating-point related procedure
441	  in the kernel.
442
443	  If you don't know what to do here, say Y.
444
445endmenu # "Platform type"
446
447menu "Kernel features"
448
449source "kernel/Kconfig.hz"
450
451config RISCV_SBI_V01
452	bool "SBI v0.1 support"
453	depends on RISCV_SBI
454	help
455	  This config allows kernel to use SBI v0.1 APIs. This will be
456	  deprecated in future once legacy M-mode software are no longer in use.
457
458config RISCV_BOOT_SPINWAIT
459	bool "Spinwait booting method"
460	depends on SMP
461	default y if RISCV_SBI_V01 || RISCV_M_MODE
462	help
463	  This enables support for booting Linux via spinwait method. In the
464	  spinwait method, all cores randomly jump to Linux. One of the cores
465	  gets chosen via lottery and all other keep spinning on a percpu
466	  variable. This method cannot support CPU hotplug and sparse hartid
467	  scheme. It should be only enabled for M-mode Linux or platforms relying
468	  on older firmware without SBI HSM extension. All other platforms should
469	  rely on ordered booting via SBI HSM extension which gets chosen
470	  dynamically at runtime if the firmware supports it.
471
472	  Since spinwait is incompatible with sparse hart IDs, it requires
473	  NR_CPUS be large enough to contain the physical hart ID of the first
474	  hart to enter Linux.
475
476	  If unsure what to do here, say N.
477
478config KEXEC
479	bool "Kexec system call"
480	select KEXEC_CORE
481	select HOTPLUG_CPU if SMP
482	depends on MMU
483	help
484	  kexec is a system call that implements the ability to shutdown your
485	  current kernel, and to start another kernel. It is like a reboot
486	  but it is independent of the system firmware. And like a reboot
487	  you can start any kernel with it, not just Linux.
488
489	  The name comes from the similarity to the exec system call.
490
491config KEXEC_FILE
492	bool "kexec file based systmem call"
493	select KEXEC_CORE
494	select KEXEC_ELF
495	select HAVE_IMA_KEXEC if IMA
496	depends on 64BIT
497	help
498	  This is new version of kexec system call. This system call is
499	  file based and takes file descriptors as system call argument
500	  for kernel and initramfs as opposed to list of segments as
501	  accepted by previous system call.
502
503	  If you don't know what to do here, say Y.
504
505config ARCH_HAS_KEXEC_PURGATORY
506	def_bool KEXEC_FILE
507	depends on CRYPTO=y
508	depends on CRYPTO_SHA256=y
509
510config CRASH_DUMP
511	bool "Build kdump crash kernel"
512	help
513	  Generate crash dump after being started by kexec. This should
514	  be normally only set in special crash dump kernels which are
515	  loaded in the main kernel with kexec-tools into a specially
516	  reserved region and then later executed after a crash by
517	  kdump/kexec.
518
519	  For more details see Documentation/admin-guide/kdump/kdump.rst
520
521config COMPAT
522	bool "Kernel support for 32-bit U-mode"
523	default 64BIT
524	depends on 64BIT && MMU
525	help
526	  This option enables support for a 32-bit U-mode running under a 64-bit
527	  kernel at S-mode. riscv32-specific components such as system calls,
528	  the user helper functions (vdso), signal rt_frame functions and the
529	  ptrace interface are handled appropriately by the kernel.
530
531	  If you want to execute 32-bit userspace applications, say Y.
532
533endmenu # "Kernel features"
534
535menu "Boot options"
536
537config CMDLINE
538	string "Built-in kernel command line"
539	help
540	  For most platforms, the arguments for the kernel's command line
541	  are provided at run-time, during boot. However, there are cases
542	  where either no arguments are being provided or the provided
543	  arguments are insufficient or even invalid.
544
545	  When that occurs, it is possible to define a built-in command
546	  line here and choose how the kernel should use it later on.
547
548choice
549	prompt "Built-in command line usage" if CMDLINE != ""
550	default CMDLINE_FALLBACK
551	help
552	  Choose how the kernel will handle the provided built-in command
553	  line.
554
555config CMDLINE_FALLBACK
556	bool "Use bootloader kernel arguments if available"
557	help
558	  Use the built-in command line as fallback in case we get nothing
559	  during boot. This is the default behaviour.
560
561config CMDLINE_EXTEND
562	bool "Extend bootloader kernel arguments"
563	help
564	  The command-line arguments provided during boot will be
565	  appended to the built-in command line. This is useful in
566	  cases where the provided arguments are insufficient and
567	  you don't want to or cannot modify them.
568
569config CMDLINE_FORCE
570	bool "Always use the default kernel command string"
571	help
572	  Always use the built-in command line, even if we get one during
573	  boot. This is useful in case you need to override the provided
574	  command line on systems where you don't have or want control
575	  over it.
576
577endchoice
578
579config EFI_STUB
580	bool
581
582config EFI
583	bool "UEFI runtime support"
584	depends on OF && !XIP_KERNEL
585	select LIBFDT
586	select UCS2_STRING
587	select EFI_PARAMS_FROM_FDT
588	select EFI_STUB
589	select EFI_GENERIC_STUB
590	select EFI_RUNTIME_WRAPPERS
591	select RISCV_ISA_C
592	depends on MMU
593	default y
594	help
595	  This option provides support for runtime services provided
596	  by UEFI firmware (such as non-volatile variables, realtime
597	  clock, and platform reset). A UEFI stub is also provided to
598	  allow the kernel to be booted as an EFI application. This
599	  is only useful on systems that have UEFI firmware.
600
601config CC_HAVE_STACKPROTECTOR_TLS
602	def_bool $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)
603
604config STACKPROTECTOR_PER_TASK
605	def_bool y
606	depends on !RANDSTRUCT
607	depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
608
609config PHYS_RAM_BASE_FIXED
610	bool "Explicitly specified physical RAM address"
611	depends on NONPORTABLE
612	default n
613
614config PHYS_RAM_BASE
615	hex "Platform Physical RAM address"
616	depends on PHYS_RAM_BASE_FIXED
617	default "0x80000000"
618	help
619	  This is the physical address of RAM in the system. It has to be
620	  explicitly specified to run early relocations of read-write data
621	  from flash to RAM.
622
623config XIP_KERNEL
624	bool "Kernel Execute-In-Place from ROM"
625	depends on MMU && SPARSEMEM && NONPORTABLE
626	# This prevents XIP from being enabled by all{yes,mod}config, which
627	# fail to build since XIP doesn't support large kernels.
628	depends on !COMPILE_TEST
629	select PHYS_RAM_BASE_FIXED
630	help
631	  Execute-In-Place allows the kernel to run from non-volatile storage
632	  directly addressable by the CPU, such as NOR flash. This saves RAM
633	  space since the text section of the kernel is not loaded from flash
634	  to RAM.  Read-write sections, such as the data section and stack,
635	  are still copied to RAM.  The XIP kernel is not compressed since
636	  it has to run directly from flash, so it will take more space to
637	  store it.  The flash address used to link the kernel object files,
638	  and for storing it, is configuration dependent. Therefore, if you
639	  say Y here, you must know the proper physical address where to
640	  store the kernel image depending on your own flash memory usage.
641
642	  Also note that the make target becomes "make xipImage" rather than
643	  "make zImage" or "make Image".  The final kernel binary to put in
644	  ROM memory will be arch/riscv/boot/xipImage.
645
646	  SPARSEMEM is required because the kernel text and rodata that are
647	  flash resident are not backed by memmap, then any attempt to get
648	  a struct page on those regions will trigger a fault.
649
650	  If unsure, say N.
651
652config XIP_PHYS_ADDR
653	hex "XIP Kernel Physical Location"
654	depends on XIP_KERNEL
655	default "0x21000000"
656	help
657	  This is the physical address in your flash memory the kernel will
658	  be linked for and stored to.  This address is dependent on your
659	  own flash usage.
660
661endmenu # "Boot options"
662
663config BUILTIN_DTB
664	bool
665	depends on OF && NONPORTABLE
666	default y if XIP_KERNEL
667
668config PORTABLE
669	bool
670	default !NONPORTABLE
671	select EFI
672	select OF
673	select MMU
674
675menu "Power management options"
676
677source "kernel/power/Kconfig"
678
679endmenu # "Power management options"
680
681menu "CPU Power Management"
682
683source "drivers/cpuidle/Kconfig"
684
685endmenu # "CPU Power Management"
686
687source "arch/riscv/kvm/Kconfig"
688