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