• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1config ARM64
2	def_bool y
3	select ACPI_CCA_REQUIRED if ACPI
4	select ACPI_GENERIC_GSI if ACPI
5	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
6	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
7	select ARCH_HAS_ELF_RANDOMIZE
8	select ARCH_HAS_GCOV_PROFILE_ALL
9	select ARCH_HAS_SG_CHAIN
10	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
11	select ARCH_USE_CMPXCHG_LOCKREF
12	select ARCH_SUPPORTS_ATOMIC_RMW
13	select ARCH_WANT_OPTIONAL_GPIOLIB
14	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
15	select ARCH_WANT_FRAME_POINTERS
16	select ARCH_HAS_UBSAN_SANITIZE_ALL
17	select ARM_AMBA
18	select ARM_ARCH_TIMER
19	select ARM_GIC
20	select AUDIT_ARCH_COMPAT_GENERIC
21	select ARM_GIC_V2M if PCI_MSI
22	select ARM_GIC_V3
23	select ARM_GIC_V3_ITS if PCI_MSI
24	select ARM_PSCI_FW
25	select BUILDTIME_EXTABLE_SORT
26	select CLONE_BACKWARDS
27	select COMMON_CLK
28	select CPU_PM if (SUSPEND || CPU_IDLE)
29	select DCACHE_WORD_ACCESS
30	select EDAC_SUPPORT
31	select FRAME_POINTER
32	select GENERIC_ALLOCATOR
33	select GENERIC_CLOCKEVENTS
34	select GENERIC_CLOCKEVENTS_BROADCAST
35	select GENERIC_CPU_AUTOPROBE
36	select GENERIC_EARLY_IOREMAP
37	select GENERIC_IDLE_POLL_SETUP
38	select GENERIC_IRQ_PROBE
39	select GENERIC_IRQ_SHOW
40	select GENERIC_IRQ_SHOW_LEVEL
41	select GENERIC_PCI_IOMAP
42	select GENERIC_SCHED_CLOCK
43	select GENERIC_SMP_IDLE_THREAD
44	select GENERIC_STRNCPY_FROM_USER
45	select GENERIC_STRNLEN_USER
46	select GENERIC_TIME_VSYSCALL
47	select HANDLE_DOMAIN_IRQ
48	select HARDIRQS_SW_RESEND
49	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
50	select HAVE_ARCH_AUDITSYSCALL
51	select HAVE_ARCH_BITREVERSE
52	select HAVE_ARCH_HARDENED_USERCOPY
53	select HAVE_ARCH_HUGE_VMAP
54	select HAVE_ARCH_JUMP_LABEL
55	select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP && !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
56	select HAVE_ARCH_KGDB
57	select HAVE_ARCH_MMAP_RND_BITS
58	select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
59	select HAVE_ARCH_SECCOMP_FILTER
60	select HAVE_ARCH_TRACEHOOK
61	select HAVE_BPF_JIT
62	select HAVE_EBPF_JIT
63	select HAVE_C_RECORDMCOUNT
64	select HAVE_CC_STACKPROTECTOR
65	select HAVE_CMPXCHG_DOUBLE
66	select HAVE_CMPXCHG_LOCAL
67	select HAVE_DEBUG_BUGVERBOSE
68	select HAVE_DEBUG_KMEMLEAK
69	select HAVE_DMA_API_DEBUG
70	select HAVE_DMA_ATTRS
71	select HAVE_DMA_CONTIGUOUS
72	select HAVE_DYNAMIC_FTRACE
73	select HAVE_EFFICIENT_UNALIGNED_ACCESS
74	select HAVE_FTRACE_MCOUNT_RECORD
75	select HAVE_FUNCTION_TRACER
76	select HAVE_FUNCTION_GRAPH_TRACER
77	select HAVE_GENERIC_DMA_COHERENT
78	select HAVE_HW_BREAKPOINT if PERF_EVENTS
79	select HAVE_IRQ_TIME_ACCOUNTING
80	select HAVE_MEMBLOCK
81	select HAVE_PATA_PLATFORM
82	select HAVE_PERF_EVENTS
83	select HAVE_PERF_REGS
84	select HAVE_PERF_USER_STACK_DUMP
85	select HAVE_RCU_TABLE_FREE
86	select HAVE_SYSCALL_TRACEPOINTS
87	select IOMMU_DMA if IOMMU_SUPPORT
88	select IRQ_DOMAIN
89	select IRQ_FORCED_THREADING
90	select MODULES_USE_ELF_RELA
91	select NO_BOOTMEM
92	select OF
93	select OF_EARLY_FLATTREE
94	select OF_RESERVED_MEM
95	select PERF_USE_VMALLOC
96	select POWER_RESET
97	select POWER_SUPPLY
98	select SPARSE_IRQ
99	select SYSCTL_EXCEPTION_TRACE
100	select HAVE_CONTEXT_TRACKING
101	select THREAD_INFO_IN_TASK
102	select HAVE_ARM_SMCCC
103	help
104	  ARM 64-bit (AArch64) Linux support.
105
106config 64BIT
107	def_bool y
108
109config ARCH_PHYS_ADDR_T_64BIT
110	def_bool y
111
112config MMU
113	def_bool y
114
115config ARCH_MMAP_RND_BITS_MIN
116       default 14 if ARM64_64K_PAGES
117       default 16 if ARM64_16K_PAGES
118       default 18
119
120# max bits determined by the following formula:
121#  VA_BITS - PAGE_SHIFT - 3
122config ARCH_MMAP_RND_BITS_MAX
123       default 19 if ARM64_VA_BITS=36
124       default 24 if ARM64_VA_BITS=39
125       default 27 if ARM64_VA_BITS=42
126       default 30 if ARM64_VA_BITS=47
127       default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES
128       default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES
129       default 33 if ARM64_VA_BITS=48
130       default 14 if ARM64_64K_PAGES
131       default 16 if ARM64_16K_PAGES
132       default 18
133
134config ARCH_MMAP_RND_COMPAT_BITS_MIN
135       default 7 if ARM64_64K_PAGES
136       default 9 if ARM64_16K_PAGES
137       default 11
138
139config ARCH_MMAP_RND_COMPAT_BITS_MAX
140       default 16
141
142config NO_IOPORT_MAP
143	def_bool y if !PCI
144
145config ILLEGAL_POINTER_VALUE
146	hex
147	default 0xdead000000000000
148
149config STACKTRACE_SUPPORT
150	def_bool y
151
152config ILLEGAL_POINTER_VALUE
153	hex
154	default 0xdead000000000000
155
156config LOCKDEP_SUPPORT
157	def_bool y
158
159config TRACE_IRQFLAGS_SUPPORT
160	def_bool y
161
162config RWSEM_XCHGADD_ALGORITHM
163	def_bool y
164
165config GENERIC_BUG
166	def_bool y
167	depends on BUG
168
169config GENERIC_BUG_RELATIVE_POINTERS
170	def_bool y
171	depends on GENERIC_BUG
172
173config GENERIC_HWEIGHT
174	def_bool y
175
176config GENERIC_CSUM
177        def_bool y
178
179config GENERIC_CALIBRATE_DELAY
180	def_bool y
181
182config ZONE_DMA
183	def_bool y
184
185config HAVE_GENERIC_RCU_GUP
186	def_bool y
187
188config ARCH_DMA_ADDR_T_64BIT
189	def_bool y
190
191config NEED_DMA_MAP_STATE
192	def_bool y
193
194config NEED_SG_DMA_LENGTH
195	def_bool y
196
197config SMP
198	def_bool y
199
200config SWIOTLB
201	def_bool y
202
203config IOMMU_HELPER
204	def_bool SWIOTLB
205
206config KERNEL_MODE_NEON
207	def_bool y
208
209config FIX_EARLYCON_MEM
210	def_bool y
211
212config PGTABLE_LEVELS
213	int
214	default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36
215	default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42
216	default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48
217	default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39
218	default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47
219	default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48
220
221source "init/Kconfig"
222
223source "kernel/Kconfig.freezer"
224
225source "arch/arm64/Kconfig.platforms"
226
227menu "Bus support"
228
229config PCI
230	bool "PCI support"
231	help
232	  This feature enables support for PCI bus system. If you say Y
233	  here, the kernel will include drivers and infrastructure code
234	  to support PCI bus devices.
235
236config PCI_DOMAINS
237	def_bool PCI
238
239config PCI_DOMAINS_GENERIC
240	def_bool PCI
241
242config PCI_SYSCALL
243	def_bool PCI
244
245source "drivers/pci/Kconfig"
246source "drivers/pci/pcie/Kconfig"
247source "drivers/pci/hotplug/Kconfig"
248
249endmenu
250
251menu "Kernel Features"
252
253menu "ARM errata workarounds via the alternatives framework"
254
255config ARM64_ERRATUM_826319
256	bool "Cortex-A53: 826319: System might deadlock if a write cannot complete until read data is accepted"
257	default y
258	help
259	  This option adds an alternative code sequence to work around ARM
260	  erratum 826319 on Cortex-A53 parts up to r0p2 with an AMBA 4 ACE or
261	  AXI master interface and an L2 cache.
262
263	  If a Cortex-A53 uses an AMBA AXI4 ACE interface to other processors
264	  and is unable to accept a certain write via this interface, it will
265	  not progress on read data presented on the read data channel and the
266	  system can deadlock.
267
268	  The workaround promotes data cache clean instructions to
269	  data cache clean-and-invalidate.
270	  Please note that this does not necessarily enable the workaround,
271	  as it depends on the alternative framework, which will only patch
272	  the kernel if an affected CPU is detected.
273
274	  If unsure, say Y.
275
276config ARM64_ERRATUM_827319
277	bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect"
278	default y
279	help
280	  This option adds an alternative code sequence to work around ARM
281	  erratum 827319 on Cortex-A53 parts up to r0p2 with an AMBA 5 CHI
282	  master interface and an L2 cache.
283
284	  Under certain conditions this erratum can cause a clean line eviction
285	  to occur at the same time as another transaction to the same address
286	  on the AMBA 5 CHI interface, which can cause data corruption if the
287	  interconnect reorders the two transactions.
288
289	  The workaround promotes data cache clean instructions to
290	  data cache clean-and-invalidate.
291	  Please note that this does not necessarily enable the workaround,
292	  as it depends on the alternative framework, which will only patch
293	  the kernel if an affected CPU is detected.
294
295	  If unsure, say Y.
296
297config ARM64_ERRATUM_824069
298	bool "Cortex-A53: 824069: Cache line might not be marked as clean after a CleanShared snoop"
299	default y
300	help
301	  This option adds an alternative code sequence to work around ARM
302	  erratum 824069 on Cortex-A53 parts up to r0p2 when it is connected
303	  to a coherent interconnect.
304
305	  If a Cortex-A53 processor is executing a store or prefetch for
306	  write instruction at the same time as a processor in another
307	  cluster is executing a cache maintenance operation to the same
308	  address, then this erratum might cause a clean cache line to be
309	  incorrectly marked as dirty.
310
311	  The workaround promotes data cache clean instructions to
312	  data cache clean-and-invalidate.
313	  Please note that this option does not necessarily enable the
314	  workaround, as it depends on the alternative framework, which will
315	  only patch the kernel if an affected CPU is detected.
316
317	  If unsure, say Y.
318
319config ARM64_ERRATUM_819472
320	bool "Cortex-A53: 819472: Store exclusive instructions might cause data corruption"
321	default y
322	help
323	  This option adds an alternative code sequence to work around ARM
324	  erratum 819472 on Cortex-A53 parts up to r0p1 with an L2 cache
325	  present when it is connected to a coherent interconnect.
326
327	  If the processor is executing a load and store exclusive sequence at
328	  the same time as a processor in another cluster is executing a cache
329	  maintenance operation to the same address, then this erratum might
330	  cause data corruption.
331
332	  The workaround promotes data cache clean instructions to
333	  data cache clean-and-invalidate.
334	  Please note that this does not necessarily enable the workaround,
335	  as it depends on the alternative framework, which will only patch
336	  the kernel if an affected CPU is detected.
337
338	  If unsure, say Y.
339
340config ARM64_ERRATUM_832075
341	bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads"
342	default y
343	help
344	  This option adds an alternative code sequence to work around ARM
345	  erratum 832075 on Cortex-A57 parts up to r1p2.
346
347	  Affected Cortex-A57 parts might deadlock when exclusive load/store
348	  instructions to Write-Back memory are mixed with Device loads.
349
350	  The workaround is to promote device loads to use Load-Acquire
351	  semantics.
352	  Please note that this does not necessarily enable the workaround,
353	  as it depends on the alternative framework, which will only patch
354	  the kernel if an affected CPU is detected.
355
356	  If unsure, say Y.
357
358config ARM64_ERRATUM_834220
359	bool "Cortex-A57: 834220: Stage 2 translation fault might be incorrectly reported in presence of a Stage 1 fault"
360	depends on KVM
361	default y
362	help
363	  This option adds an alternative code sequence to work around ARM
364	  erratum 834220 on Cortex-A57 parts up to r1p2.
365
366	  Affected Cortex-A57 parts might report a Stage 2 translation
367	  fault as the result of a Stage 1 fault for load crossing a
368	  page boundary when there is a permission or device memory
369	  alignment fault at Stage 1 and a translation fault at Stage 2.
370
371	  The workaround is to verify that the Stage 1 translation
372	  doesn't generate a fault before handling the Stage 2 fault.
373	  Please note that this does not necessarily enable the workaround,
374	  as it depends on the alternative framework, which will only patch
375	  the kernel if an affected CPU is detected.
376
377	  If unsure, say Y.
378
379config ARM64_ERRATUM_845719
380	bool "Cortex-A53: 845719: a load might read incorrect data"
381	depends on COMPAT
382	default y
383	help
384	  This option adds an alternative code sequence to work around ARM
385	  erratum 845719 on Cortex-A53 parts up to r0p4.
386
387	  When running a compat (AArch32) userspace on an affected Cortex-A53
388	  part, a load at EL0 from a virtual address that matches the bottom 32
389	  bits of the virtual address used by a recent load at (AArch64) EL1
390	  might return incorrect data.
391
392	  The workaround is to write the contextidr_el1 register on exception
393	  return to a 32-bit task.
394	  Please note that this does not necessarily enable the workaround,
395	  as it depends on the alternative framework, which will only patch
396	  the kernel if an affected CPU is detected.
397
398	  If unsure, say Y.
399
400config ARM64_ERRATUM_843419
401	bool "Cortex-A53: 843419: A load or store might access an incorrect address"
402	depends on MODULES
403	default y
404	select ARM64_MODULE_CMODEL_LARGE
405	help
406	  This option builds kernel modules using the large memory model in
407	  order to avoid the use of the ADRP instruction, which can cause
408	  a subsequent memory access to use an incorrect address on Cortex-A53
409	  parts up to r0p4.
410
411	  Note that the kernel itself must be linked with a version of ld
412	  which fixes potentially affected ADRP instructions through the
413	  use of veneers.
414
415	  If unsure, say Y.
416
417config ARM64_ERRATUM_1024718
418	bool "Cortex-A55: 1024718: Update of DBM/AP bits without break before make might result in incorrect update"
419	default y
420	help
421	  This option adds work around for Arm Cortex-A55 Erratum 1024718.
422
423	  Affected Cortex-A55 cores (all revisions) could cause incorrect
424	  update of the hardware dirty bit when the DBM/AP bits are updated
425	  without a break-before-make. The work around is to disable the usage
426	  of hardware DBM locally on the affected cores. CPUs not affected by
427	  erratum will continue to use the feature.
428
429	  If unsure, say Y.
430
431config CAVIUM_ERRATUM_22375
432	bool "Cavium erratum 22375, 24313"
433	default y
434	help
435	  Enable workaround for erratum 22375, 24313.
436
437	  This implements two gicv3-its errata workarounds for ThunderX. Both
438	  with small impact affecting only ITS table allocation.
439
440	    erratum 22375: only alloc 8MB table size
441	    erratum 24313: ignore memory access type
442
443	  The fixes are in ITS initialization and basically ignore memory access
444	  type and table size provided by the TYPER and BASER registers.
445
446	  If unsure, say Y.
447
448config CAVIUM_ERRATUM_23144
449	bool "Cavium erratum 23144: ITS SYNC hang on dual socket system"
450	depends on NUMA
451	default y
452	help
453	  ITS SYNC command hang for cross node io and collections/cpu mapping.
454
455	  If unsure, say Y.
456
457config CAVIUM_ERRATUM_23154
458	bool "Cavium erratum 23154: Access to ICC_IAR1_EL1 is not sync'ed"
459	default y
460	help
461	  The gicv3 of ThunderX requires a modified version for
462	  reading the IAR status to ensure data synchronization
463	  (access to icc_iar1_el1 is not sync'ed before and after).
464
465	  If unsure, say Y.
466
467config CAVIUM_ERRATUM_27456
468	bool "Cavium erratum 27456: Broadcast TLBI instructions may cause icache corruption"
469	default y
470	help
471	  On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
472	  instructions may cause the icache to become corrupted if it
473	  contains data for a non-current ASID.  The fix is to
474	  invalidate the icache when changing the mm context.
475
476	  If unsure, say Y.
477
478endmenu
479
480
481choice
482	prompt "Page size"
483	default ARM64_4K_PAGES
484	help
485	  Page size (translation granule) configuration.
486
487config ARM64_4K_PAGES
488	bool "4KB"
489	help
490	  This feature enables 4KB pages support.
491
492config ARM64_16K_PAGES
493	bool "16KB"
494	help
495	  The system will use 16KB pages support. AArch32 emulation
496	  requires applications compiled with 16K (or a multiple of 16K)
497	  aligned segments.
498
499config ARM64_64K_PAGES
500	bool "64KB"
501	help
502	  This feature enables 64KB pages support (4KB by default)
503	  allowing only two levels of page tables and faster TLB
504	  look-up. AArch32 emulation requires applications compiled
505	  with 64K aligned segments.
506
507endchoice
508
509choice
510	prompt "Virtual address space size"
511	default ARM64_VA_BITS_39 if ARM64_4K_PAGES
512	default ARM64_VA_BITS_47 if ARM64_16K_PAGES
513	default ARM64_VA_BITS_42 if ARM64_64K_PAGES
514	help
515	  Allows choosing one of multiple possible virtual address
516	  space sizes. The level of translation table is determined by
517	  a combination of page size and virtual address space size.
518
519config ARM64_VA_BITS_36
520	bool "36-bit" if EXPERT
521	depends on ARM64_16K_PAGES
522
523config ARM64_VA_BITS_39
524	bool "39-bit"
525	depends on ARM64_4K_PAGES
526
527config ARM64_VA_BITS_42
528	bool "42-bit"
529	depends on ARM64_64K_PAGES
530
531config ARM64_VA_BITS_47
532	bool "47-bit"
533	depends on ARM64_16K_PAGES
534
535config ARM64_VA_BITS_48
536	bool "48-bit"
537
538endchoice
539
540config ARM64_VA_BITS
541	int
542	default 36 if ARM64_VA_BITS_36
543	default 39 if ARM64_VA_BITS_39
544	default 42 if ARM64_VA_BITS_42
545	default 47 if ARM64_VA_BITS_47
546	default 48 if ARM64_VA_BITS_48
547
548config CPU_BIG_ENDIAN
549       bool "Build big-endian kernel"
550       help
551         Say Y if you plan on running a kernel in big-endian mode.
552
553config SCHED_MC
554	bool "Multi-core scheduler support"
555	help
556	  Multi-core scheduler support improves the CPU scheduler's decision
557	  making when dealing with multi-core CPU chips at a cost of slightly
558	  increased overhead in some places. If unsure say N here.
559
560config SCHED_SMT
561	bool "SMT scheduler support"
562	help
563	  Improves the CPU scheduler's decision making when dealing with
564	  MultiThreading at a cost of slightly increased overhead in some
565	  places. If unsure say N here.
566
567config NR_CPUS
568	int "Maximum number of CPUs (2-4096)"
569	range 2 4096
570	# These have to remain sorted largest to smallest
571	default "64"
572
573config HOTPLUG_CPU
574	bool "Support for hot-pluggable CPUs"
575	select GENERIC_IRQ_MIGRATION
576	help
577	  Say Y here to experiment with turning CPUs off and on.  CPUs
578	  can be controlled through /sys/devices/system/cpu.
579
580source kernel/Kconfig.preempt
581source kernel/Kconfig.hz
582
583config ARCH_SUPPORTS_DEBUG_PAGEALLOC
584	def_bool y
585
586config ARCH_HAS_HOLES_MEMORYMODEL
587	def_bool y if SPARSEMEM
588
589config ARCH_SPARSEMEM_ENABLE
590	def_bool y
591	select SPARSEMEM_VMEMMAP_ENABLE
592
593config ARCH_SPARSEMEM_DEFAULT
594	def_bool ARCH_SPARSEMEM_ENABLE
595
596config ARCH_SELECT_MEMORY_MODEL
597	def_bool ARCH_SPARSEMEM_ENABLE
598
599config HAVE_ARCH_PFN_VALID
600	def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
601
602config HW_PERF_EVENTS
603	def_bool y
604	depends on ARM_PMU
605
606config SYS_SUPPORTS_HUGETLBFS
607	def_bool y
608
609config ARCH_WANT_HUGE_PMD_SHARE
610	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
611
612config HAVE_ARCH_TRANSPARENT_HUGEPAGE
613	def_bool y
614
615config ARCH_HAS_CACHE_LINE_SIZE
616	def_bool y
617
618source "mm/Kconfig"
619
620config SECCOMP
621	bool "Enable seccomp to safely compute untrusted bytecode"
622	---help---
623	  This kernel feature is useful for number crunching applications
624	  that may need to compute untrusted bytecode during their
625	  execution. By using pipes or other transports made available to
626	  the process as file descriptors supporting the read/write
627	  syscalls, it's possible to isolate those applications in
628	  their own address space using seccomp. Once seccomp is
629	  enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
630	  and the task is only allowed to execute a few safe syscalls
631	  defined by each seccomp mode.
632
633config XEN_DOM0
634	def_bool y
635	depends on XEN
636
637config XEN
638	bool "Xen guest support on ARM64"
639	depends on ARM64 && OF
640	select SWIOTLB_XEN
641	help
642	  Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64.
643
644config FORCE_MAX_ZONEORDER
645	int
646	default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
647	default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
648	default "11"
649	help
650	  The kernel memory allocator divides physically contiguous memory
651	  blocks into "zones", where each zone is a power of two number of
652	  pages.  This option selects the largest power of two that the kernel
653	  keeps in the memory allocator.  If you need to allocate very large
654	  blocks of physically contiguous memory, then you may need to
655	  increase this value.
656
657	  This config option is actually maximum order plus one. For example,
658	  a value of 11 means that the largest free memory block is 2^10 pages.
659
660	  We make sure that we can allocate upto a HugePage size for each configuration.
661	  Hence we have :
662		MAX_ORDER = (PMD_SHIFT - PAGE_SHIFT) + 1 => PAGE_SHIFT - 2
663
664	  However for 4K, we choose a higher default value, 11 as opposed to 10, giving us
665	  4M allocations matching the default size used by generic code.
666
667config UNMAP_KERNEL_AT_EL0
668	bool "Unmap kernel when running in userspace (aka \"KAISER\")" if EXPERT
669	default y
670	help
671	  Speculation attacks against some high-performance processors can
672	  be used to bypass MMU permission checks and leak kernel data to
673	  userspace. This can be defended against by unmapping the kernel
674	  when running in userspace, mapping it back in on exception entry
675	  via a trampoline page in the vector table.
676
677	  If unsure, say Y.
678
679menuconfig ARMV8_DEPRECATED
680	bool "Emulate deprecated/obsolete ARMv8 instructions"
681	depends on COMPAT
682	help
683	  Legacy software support may require certain instructions
684	  that have been deprecated or obsoleted in the architecture.
685
686	  Enable this config to enable selective emulation of these
687	  features.
688
689	  If unsure, say Y
690
691if ARMV8_DEPRECATED
692
693config SWP_EMULATION
694	bool "Emulate SWP/SWPB instructions"
695	help
696	  ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that
697	  they are always undefined. Say Y here to enable software
698	  emulation of these instructions for userspace using LDXR/STXR.
699
700	  In some older versions of glibc [<=2.8] SWP is used during futex
701	  trylock() operations with the assumption that the code will not
702	  be preempted. This invalid assumption may be more likely to fail
703	  with SWP emulation enabled, leading to deadlock of the user
704	  application.
705
706	  NOTE: when accessing uncached shared regions, LDXR/STXR rely
707	  on an external transaction monitoring block called a global
708	  monitor to maintain update atomicity. If your system does not
709	  implement a global monitor, this option can cause programs that
710	  perform SWP operations to uncached memory to deadlock.
711
712	  If unsure, say Y
713
714config CP15_BARRIER_EMULATION
715	bool "Emulate CP15 Barrier instructions"
716	help
717	  The CP15 barrier instructions - CP15ISB, CP15DSB, and
718	  CP15DMB - are deprecated in ARMv8 (and ARMv7). It is
719	  strongly recommended to use the ISB, DSB, and DMB
720	  instructions instead.
721
722	  Say Y here to enable software emulation of these
723	  instructions for AArch32 userspace code. When this option is
724	  enabled, CP15 barrier usage is traced which can help
725	  identify software that needs updating.
726
727	  If unsure, say Y
728
729config SETEND_EMULATION
730	bool "Emulate SETEND instruction"
731	help
732	  The SETEND instruction alters the data-endianness of the
733	  AArch32 EL0, and is deprecated in ARMv8.
734
735	  Say Y here to enable software emulation of the instruction
736	  for AArch32 userspace code.
737
738	  Note: All the cpus on the system must have mixed endian support at EL0
739	  for this feature to be enabled. If a new CPU - which doesn't support mixed
740	  endian - is hotplugged in after this feature has been enabled, there could
741	  be unexpected results in the applications.
742
743	  If unsure, say Y
744endif
745
746config ARM64_SW_TTBR0_PAN
747	bool "Emulate Privileged Access Never using TTBR0_EL1 switching"
748	help
749	  Enabling this option prevents the kernel from accessing
750	  user-space memory directly by pointing TTBR0_EL1 to a reserved
751	  zeroed area and reserved ASID. The user access routines
752	  restore the valid TTBR0_EL1 temporarily.
753
754menu "ARMv8.1 architectural features"
755
756config ARM64_HW_AFDBM
757	bool "Support for hardware updates of the Access and Dirty page flags"
758	default y
759	help
760	  The ARMv8.1 architecture extensions introduce support for
761	  hardware updates of the access and dirty information in page
762	  table entries. When enabled in TCR_EL1 (HA and HD bits) on
763	  capable processors, accesses to pages with PTE_AF cleared will
764	  set this bit instead of raising an access flag fault.
765	  Similarly, writes to read-only pages with the DBM bit set will
766	  clear the read-only bit (AP[2]) instead of raising a
767	  permission fault.
768
769	  Kernels built with this configuration option enabled continue
770	  to work on pre-ARMv8.1 hardware and the performance impact is
771	  minimal. If unsure, say Y.
772
773config ARM64_PAN
774	bool "Enable support for Privileged Access Never (PAN)"
775	default y
776	help
777	 Privileged Access Never (PAN; part of the ARMv8.1 Extensions)
778	 prevents the kernel or hypervisor from accessing user-space (EL0)
779	 memory directly.
780
781	 Choosing this option will cause any unprotected (not using
782	 copy_to_user et al) memory access to fail with a permission fault.
783
784	 The feature is detected at runtime, and will remain as a 'nop'
785	 instruction if the cpu does not implement the feature.
786
787config ARM64_LSE_ATOMICS
788	bool "Atomic instructions"
789	help
790	  As part of the Large System Extensions, ARMv8.1 introduces new
791	  atomic instructions that are designed specifically to scale in
792	  very large systems.
793
794	  Say Y here to make use of these instructions for the in-kernel
795	  atomic routines. This incurs a small overhead on CPUs that do
796	  not support these instructions and requires the kernel to be
797	  built with binutils >= 2.25.
798
799endmenu
800
801config ARM64_UAO
802	bool "Enable support for User Access Override (UAO)"
803	default y
804	help
805	  User Access Override (UAO; part of the ARMv8.2 Extensions)
806	  causes the 'unprivileged' variant of the load/store instructions to
807	  be overriden to be privileged.
808
809	  This option changes get_user() and friends to use the 'unprivileged'
810	  variant of the load/store instructions. This ensures that user-space
811	  really did have access to the supplied memory. When addr_limit is
812	  set to kernel memory the UAO bit will be set, allowing privileged
813	  access to kernel memory.
814
815	  Choosing this option will cause copy_to_user() et al to use user-space
816	  memory permissions.
817
818	  The feature is detected at runtime, the kernel will use the
819	  regular load/store instructions if the cpu does not implement the
820	  feature.
821
822config ARM64_MODULE_CMODEL_LARGE
823	bool
824
825config ARM64_MODULE_PLTS
826	bool
827	select ARM64_MODULE_CMODEL_LARGE
828	select HAVE_MOD_ARCH_SPECIFIC
829
830config RELOCATABLE
831	bool
832	help
833	  This builds the kernel as a Position Independent Executable (PIE),
834	  which retains all relocation metadata required to relocate the
835	  kernel binary at runtime to a different virtual address than the
836	  address it was linked at.
837	  Since AArch64 uses the RELA relocation format, this requires a
838	  relocation pass at runtime even if the kernel is loaded at the
839	  same address it was linked at.
840
841config RANDOMIZE_BASE
842	bool "Randomize the address of the kernel image"
843	select ARM64_MODULE_PLTS if MODULES
844	select RELOCATABLE
845	help
846	  Randomizes the virtual address at which the kernel image is
847	  loaded, as a security feature that deters exploit attempts
848	  relying on knowledge of the location of kernel internals.
849
850	  It is the bootloader's job to provide entropy, by passing a
851	  random u64 value in /chosen/kaslr-seed at kernel entry.
852
853	  When booting via the UEFI stub, it will invoke the firmware's
854	  EFI_RNG_PROTOCOL implementation (if available) to supply entropy
855	  to the kernel proper. In addition, it will randomise the physical
856	  location of the kernel Image as well.
857
858	  If unsure, say N.
859
860config RANDOMIZE_MODULE_REGION_FULL
861	bool "Randomize the module region independently from the core kernel"
862	depends on RANDOMIZE_BASE && !DYNAMIC_FTRACE
863	default y
864	help
865	  Randomizes the location of the module region without considering the
866	  location of the core kernel. This way, it is impossible for modules
867	  to leak information about the location of core kernel data structures
868	  but it does imply that function calls between modules and the core
869	  kernel will need to be resolved via veneers in the module PLT.
870
871	  When this option is not set, the module region will be randomized over
872	  a limited range that contains the [_stext, _etext] interval of the
873	  core kernel, so branch relocations are always in range.
874
875endmenu
876
877menu "Boot options"
878
879config ARM64_ACPI_PARKING_PROTOCOL
880	bool "Enable support for the ARM64 ACPI parking protocol"
881	depends on ACPI
882	help
883	  Enable support for the ARM64 ACPI parking protocol. If disabled
884	  the kernel will not allow booting through the ARM64 ACPI parking
885	  protocol even if the corresponding data is present in the ACPI
886	  MADT table.
887
888config CMDLINE
889	string "Default kernel command string"
890	default ""
891	help
892	  Provide a set of default command-line options at build time by
893	  entering them here. As a minimum, you should specify the the
894	  root device (e.g. root=/dev/nfs).
895
896choice
897	prompt "Kernel command line type" if CMDLINE != ""
898	default CMDLINE_FROM_BOOTLOADER
899
900config CMDLINE_FROM_BOOTLOADER
901	bool "Use bootloader kernel arguments if available"
902	help
903	  Uses the command-line options passed by the boot loader. If
904	  the boot loader doesn't provide any, the default kernel command
905	  string provided in CMDLINE will be used.
906
907config CMDLINE_EXTEND
908	bool "Extend bootloader kernel arguments"
909	help
910	  The command-line arguments provided by the boot loader will be
911	  appended to the default kernel command string.
912
913config CMDLINE_FORCE
914	bool "Always use the default kernel command string"
915	help
916	  Always use the default kernel command string, even if the boot
917	  loader passes other arguments to the kernel.
918	  This is useful if you cannot or don't want to change the
919	  command-line options your boot loader passes to the kernel.
920endchoice
921
922config EFI_STUB
923	bool
924
925config EFI
926	bool "UEFI runtime support"
927	depends on OF && !CPU_BIG_ENDIAN
928	select LIBFDT
929	select UCS2_STRING
930	select EFI_PARAMS_FROM_FDT
931	select EFI_RUNTIME_WRAPPERS
932	select EFI_STUB
933	select EFI_ARMSTUB
934	default y
935	help
936	  This option provides support for runtime services provided
937	  by UEFI firmware (such as non-volatile variables, realtime
938          clock, and platform reset). A UEFI stub is also provided to
939	  allow the kernel to be booted as an EFI application. This
940	  is only useful on systems that have UEFI firmware.
941
942config DMI
943	bool "Enable support for SMBIOS (DMI) tables"
944	depends on EFI
945	default y
946	help
947	  This enables SMBIOS/DMI feature for systems.
948
949	  This option is only useful on systems that have UEFI firmware.
950	  However, even with this option, the resultant kernel should
951	  continue to boot on existing non-UEFI platforms.
952
953config BUILD_ARM64_APPENDED_DTB_IMAGE
954	bool "Build a concatenated Image.gz/dtb by default"
955	depends on OF
956	help
957	  Enabling this option will cause a concatenated Image.gz and list of
958	  DTBs to be built by default (instead of a standalone Image.gz.)
959	  The image will built in arch/arm64/boot/Image.gz-dtb
960
961choice
962	prompt "Appended DTB Kernel Image name"
963	depends on BUILD_ARM64_APPENDED_DTB_IMAGE
964	help
965	  Enabling this option will cause a specific kernel image Image or
966	  Image.gz to be used for final image creation.
967	  The image will built in arch/arm64/boot/IMAGE-NAME-dtb
968
969	config IMG_GZ_DTB
970		bool "Image.gz-dtb"
971	config IMG_DTB
972		bool "Image-dtb"
973endchoice
974
975config BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME
976	string
977	depends on BUILD_ARM64_APPENDED_DTB_IMAGE
978	default "Image.gz-dtb" if IMG_GZ_DTB
979	default "Image-dtb" if IMG_DTB
980
981config BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES
982	string "Default dtb names"
983	depends on BUILD_ARM64_APPENDED_DTB_IMAGE
984	help
985	  Space separated list of names of dtbs to append when
986	  building a concatenated Image.gz-dtb.
987
988endmenu
989
990menu "Userspace binary formats"
991
992source "fs/Kconfig.binfmt"
993
994config COMPAT
995	bool "Kernel support for 32-bit EL0"
996	depends on ARM64_4K_PAGES || EXPERT
997	select COMPAT_BINFMT_ELF if BINFMT_ELF
998	select HAVE_UID16
999	select OLD_SIGSUSPEND3
1000	select COMPAT_OLD_SIGACTION
1001	help
1002	  This option enables support for a 32-bit EL0 running under a 64-bit
1003	  kernel at EL1. AArch32-specific components such as system calls,
1004	  the user helper functions, VFP support and the ptrace interface are
1005	  handled appropriately by the kernel.
1006
1007	  If you use a page size other than 4KB (i.e, 16KB or 64KB), please be aware
1008	  that you will only be able to execute AArch32 binaries that were compiled
1009	  with page size aligned segments.
1010
1011	  If you want to execute 32-bit userspace applications, say Y.
1012
1013config SYSVIPC_COMPAT
1014	def_bool y
1015	depends on COMPAT && SYSVIPC
1016
1017config KEYS_COMPAT
1018	def_bool y
1019	depends on COMPAT && KEYS
1020
1021endmenu
1022
1023menu "Power management options"
1024
1025source "kernel/power/Kconfig"
1026
1027config ARCH_SUSPEND_POSSIBLE
1028	def_bool y
1029
1030endmenu
1031
1032menu "CPU Power Management"
1033
1034source "drivers/cpuidle/Kconfig"
1035
1036source "drivers/cpufreq/Kconfig"
1037
1038endmenu
1039
1040source "net/Kconfig"
1041
1042source "drivers/Kconfig"
1043
1044source "drivers/firmware/Kconfig"
1045
1046source "drivers/acpi/Kconfig"
1047
1048source "fs/Kconfig"
1049
1050source "arch/arm64/kvm/Kconfig"
1051
1052source "arch/arm64/Kconfig.debug"
1053
1054source "security/Kconfig"
1055
1056source "crypto/Kconfig"
1057if CRYPTO
1058source "arch/arm64/crypto/Kconfig"
1059endif
1060
1061source "lib/Kconfig"
1062