1config ARM64 2 def_bool y 3 select ACPI_CCA_REQUIRED if ACPI 4 select ACPI_GENERIC_GSI if ACPI 5 select ACPI_GTDT if ACPI 6 select ACPI_IORT if ACPI 7 select ACPI_REDUCED_HARDWARE_ONLY if ACPI 8 select ACPI_MCFG if ACPI 9 select ACPI_SPCR_TABLE if ACPI 10 select ARCH_CLOCKSOURCE_DATA 11 select ARCH_HAS_DEBUG_VIRTUAL 12 select ARCH_HAS_DEVMEM_IS_ALLOWED 13 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI 14 select ARCH_HAS_ELF_RANDOMIZE 15 select ARCH_HAS_FORTIFY_SOURCE 16 select ARCH_HAS_GCOV_PROFILE_ALL 17 select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA 18 select ARCH_HAS_KCOV 19 select ARCH_HAS_SET_MEMORY 20 select ARCH_HAS_SG_CHAIN 21 select ARCH_HAS_STRICT_KERNEL_RWX 22 select ARCH_HAS_STRICT_MODULE_RWX 23 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 24 select ARCH_HAVE_NMI_SAFE_CMPXCHG 25 select ARCH_INLINE_READ_LOCK if !PREEMPT 26 select ARCH_INLINE_READ_LOCK_BH if !PREEMPT 27 select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPT 28 select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPT 29 select ARCH_INLINE_READ_UNLOCK if !PREEMPT 30 select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPT 31 select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPT 32 select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPT 33 select ARCH_INLINE_WRITE_LOCK if !PREEMPT 34 select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPT 35 select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPT 36 select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPT 37 select ARCH_INLINE_WRITE_UNLOCK if !PREEMPT 38 select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPT 39 select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPT 40 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPT 41 select ARCH_USE_CMPXCHG_LOCKREF 42 select ARCH_USE_QUEUED_RWLOCKS 43 select ARCH_SUPPORTS_MEMORY_FAILURE 44 select ARCH_SUPPORTS_ATOMIC_RMW 45 select ARCH_SUPPORTS_NUMA_BALANCING 46 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 47 select ARCH_WANT_FRAME_POINTERS 48 select ARCH_HAS_UBSAN_SANITIZE_ALL 49 select ARM_AMBA 50 select ARM_ARCH_TIMER 51 select ARM_GIC 52 select AUDIT_ARCH_COMPAT_GENERIC 53 select ARM_GIC_V2M if PCI 54 select ARM_GIC_V3 55 select ARM_GIC_V3_ITS if PCI 56 select ARM_PSCI_FW 57 select BUILDTIME_EXTABLE_SORT 58 select CLONE_BACKWARDS 59 select COMMON_CLK 60 select CPU_PM if (SUSPEND || CPU_IDLE) 61 select DCACHE_WORD_ACCESS 62 select DMA_DIRECT_OPS 63 select EDAC_SUPPORT 64 select FRAME_POINTER 65 select GENERIC_ALLOCATOR 66 select GENERIC_ARCH_TOPOLOGY 67 select GENERIC_CLOCKEVENTS 68 select GENERIC_CLOCKEVENTS_BROADCAST 69 select GENERIC_CPU_AUTOPROBE 70 select GENERIC_EARLY_IOREMAP 71 select GENERIC_IDLE_POLL_SETUP 72 select GENERIC_IRQ_PROBE 73 select GENERIC_IRQ_SHOW 74 select GENERIC_IRQ_SHOW_LEVEL 75 select GENERIC_PCI_IOMAP 76 select GENERIC_SCHED_CLOCK 77 select GENERIC_SMP_IDLE_THREAD 78 select GENERIC_STRNCPY_FROM_USER 79 select GENERIC_STRNLEN_USER 80 select GENERIC_TIME_VSYSCALL 81 select HANDLE_DOMAIN_IRQ 82 select HARDIRQS_SW_RESEND 83 select HAVE_ACPI_APEI if (ACPI && EFI) 84 select HAVE_ALIGNED_STRUCT_PAGE if SLUB 85 select HAVE_ARCH_AUDITSYSCALL 86 select HAVE_ARCH_BITREVERSE 87 select HAVE_ARCH_HUGE_VMAP 88 select HAVE_ARCH_JUMP_LABEL 89 select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) 90 select HAVE_ARCH_KGDB 91 select HAVE_ARCH_MMAP_RND_BITS 92 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT 93 select HAVE_ARCH_SECCOMP_FILTER 94 select HAVE_ARCH_TRACEHOOK 95 select HAVE_ARCH_TRANSPARENT_HUGEPAGE 96 select HAVE_ARCH_VMAP_STACK 97 select HAVE_ARM_SMCCC 98 select HAVE_EBPF_JIT 99 select HAVE_C_RECORDMCOUNT 100 select HAVE_CC_STACKPROTECTOR 101 select HAVE_CMPXCHG_DOUBLE 102 select HAVE_CMPXCHG_LOCAL 103 select HAVE_CONTEXT_TRACKING 104 select HAVE_DEBUG_BUGVERBOSE 105 select HAVE_DEBUG_KMEMLEAK 106 select HAVE_DMA_API_DEBUG 107 select HAVE_DMA_CONTIGUOUS 108 select HAVE_DYNAMIC_FTRACE 109 select HAVE_EFFICIENT_UNALIGNED_ACCESS 110 select HAVE_FTRACE_MCOUNT_RECORD 111 select HAVE_FUNCTION_TRACER 112 select HAVE_FUNCTION_GRAPH_TRACER 113 select HAVE_GCC_PLUGINS 114 select HAVE_GENERIC_DMA_COHERENT 115 select HAVE_HW_BREAKPOINT if PERF_EVENTS 116 select HAVE_IRQ_TIME_ACCOUNTING 117 select HAVE_MEMBLOCK 118 select HAVE_MEMBLOCK_NODE_MAP if NUMA 119 select HAVE_NMI 120 select HAVE_PATA_PLATFORM 121 select HAVE_PERF_EVENTS 122 select HAVE_PERF_REGS 123 select HAVE_PERF_USER_STACK_DUMP 124 select HAVE_REGS_AND_STACK_ACCESS_API 125 select HAVE_RCU_TABLE_FREE 126 select HAVE_SYSCALL_TRACEPOINTS 127 select HAVE_KPROBES 128 select HAVE_KRETPROBES 129 select IOMMU_DMA if IOMMU_SUPPORT 130 select IRQ_DOMAIN 131 select IRQ_FORCED_THREADING 132 select MODULES_USE_ELF_RELA 133 select NO_BOOTMEM 134 select OF 135 select OF_EARLY_FLATTREE 136 select OF_RESERVED_MEM 137 select PCI_ECAM if ACPI 138 select POWER_RESET 139 select POWER_SUPPLY 140 select REFCOUNT_FULL 141 select SPARSE_IRQ 142 select SYSCTL_EXCEPTION_TRACE 143 select THREAD_INFO_IN_TASK 144 help 145 ARM 64-bit (AArch64) Linux support. 146 147config 64BIT 148 def_bool y 149 150config ARCH_PHYS_ADDR_T_64BIT 151 def_bool y 152 153config MMU 154 def_bool y 155 156config ARM64_PAGE_SHIFT 157 int 158 default 16 if ARM64_64K_PAGES 159 default 14 if ARM64_16K_PAGES 160 default 12 161 162config ARM64_CONT_SHIFT 163 int 164 default 5 if ARM64_64K_PAGES 165 default 7 if ARM64_16K_PAGES 166 default 4 167 168config ARCH_MMAP_RND_BITS_MIN 169 default 14 if ARM64_64K_PAGES 170 default 16 if ARM64_16K_PAGES 171 default 18 172 173# max bits determined by the following formula: 174# VA_BITS - PAGE_SHIFT - 3 175config ARCH_MMAP_RND_BITS_MAX 176 default 19 if ARM64_VA_BITS=36 177 default 24 if ARM64_VA_BITS=39 178 default 27 if ARM64_VA_BITS=42 179 default 30 if ARM64_VA_BITS=47 180 default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES 181 default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES 182 default 33 if ARM64_VA_BITS=48 183 default 14 if ARM64_64K_PAGES 184 default 16 if ARM64_16K_PAGES 185 default 18 186 187config ARCH_MMAP_RND_COMPAT_BITS_MIN 188 default 7 if ARM64_64K_PAGES 189 default 9 if ARM64_16K_PAGES 190 default 11 191 192config ARCH_MMAP_RND_COMPAT_BITS_MAX 193 default 16 194 195config NO_IOPORT_MAP 196 def_bool y if !PCI 197 198config STACKTRACE_SUPPORT 199 def_bool y 200 201config ILLEGAL_POINTER_VALUE 202 hex 203 default 0xdead000000000000 204 205config LOCKDEP_SUPPORT 206 def_bool y 207 208config TRACE_IRQFLAGS_SUPPORT 209 def_bool y 210 211config RWSEM_XCHGADD_ALGORITHM 212 def_bool y 213 214config GENERIC_BUG 215 def_bool y 216 depends on BUG 217 218config GENERIC_BUG_RELATIVE_POINTERS 219 def_bool y 220 depends on GENERIC_BUG 221 222config GENERIC_HWEIGHT 223 def_bool y 224 225config GENERIC_CSUM 226 def_bool y 227 228config GENERIC_CALIBRATE_DELAY 229 def_bool y 230 231config ZONE_DMA32 232 def_bool y 233 234config HAVE_GENERIC_GUP 235 def_bool y 236 237config ARCH_DMA_ADDR_T_64BIT 238 def_bool y 239 240config NEED_DMA_MAP_STATE 241 def_bool y 242 243config NEED_SG_DMA_LENGTH 244 def_bool y 245 246config SMP 247 def_bool y 248 249config SWIOTLB 250 def_bool y 251 252config IOMMU_HELPER 253 def_bool SWIOTLB 254 255config KERNEL_MODE_NEON 256 def_bool y 257 258config FIX_EARLYCON_MEM 259 def_bool y 260 261config PGTABLE_LEVELS 262 int 263 default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36 264 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42 265 default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48 266 default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39 267 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47 268 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48 269 270config ARCH_SUPPORTS_UPROBES 271 def_bool y 272 273config ARCH_PROC_KCORE_TEXT 274 def_bool y 275 276source "init/Kconfig" 277 278source "kernel/Kconfig.freezer" 279 280source "arch/arm64/Kconfig.platforms" 281 282menu "Bus support" 283 284config PCI 285 bool "PCI support" 286 help 287 This feature enables support for PCI bus system. If you say Y 288 here, the kernel will include drivers and infrastructure code 289 to support PCI bus devices. 290 291config PCI_DOMAINS 292 def_bool PCI 293 294config PCI_DOMAINS_GENERIC 295 def_bool PCI 296 297config PCI_SYSCALL 298 def_bool PCI 299 300source "drivers/pci/Kconfig" 301 302endmenu 303 304menu "Kernel Features" 305 306menu "ARM errata workarounds via the alternatives framework" 307 308config ARM64_ERRATUM_826319 309 bool "Cortex-A53: 826319: System might deadlock if a write cannot complete until read data is accepted" 310 default y 311 help 312 This option adds an alternative code sequence to work around ARM 313 erratum 826319 on Cortex-A53 parts up to r0p2 with an AMBA 4 ACE or 314 AXI master interface and an L2 cache. 315 316 If a Cortex-A53 uses an AMBA AXI4 ACE interface to other processors 317 and is unable to accept a certain write via this interface, it will 318 not progress on read data presented on the read data channel and the 319 system can deadlock. 320 321 The workaround promotes data cache clean instructions to 322 data cache clean-and-invalidate. 323 Please note that this does not necessarily enable the workaround, 324 as it depends on the alternative framework, which will only patch 325 the kernel if an affected CPU is detected. 326 327 If unsure, say Y. 328 329config ARM64_ERRATUM_827319 330 bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect" 331 default y 332 help 333 This option adds an alternative code sequence to work around ARM 334 erratum 827319 on Cortex-A53 parts up to r0p2 with an AMBA 5 CHI 335 master interface and an L2 cache. 336 337 Under certain conditions this erratum can cause a clean line eviction 338 to occur at the same time as another transaction to the same address 339 on the AMBA 5 CHI interface, which can cause data corruption if the 340 interconnect reorders the two transactions. 341 342 The workaround promotes data cache clean instructions to 343 data cache clean-and-invalidate. 344 Please note that this does not necessarily enable the workaround, 345 as it depends on the alternative framework, which will only patch 346 the kernel if an affected CPU is detected. 347 348 If unsure, say Y. 349 350config ARM64_ERRATUM_824069 351 bool "Cortex-A53: 824069: Cache line might not be marked as clean after a CleanShared snoop" 352 default y 353 help 354 This option adds an alternative code sequence to work around ARM 355 erratum 824069 on Cortex-A53 parts up to r0p2 when it is connected 356 to a coherent interconnect. 357 358 If a Cortex-A53 processor is executing a store or prefetch for 359 write instruction at the same time as a processor in another 360 cluster is executing a cache maintenance operation to the same 361 address, then this erratum might cause a clean cache line to be 362 incorrectly marked as dirty. 363 364 The workaround promotes data cache clean instructions to 365 data cache clean-and-invalidate. 366 Please note that this option does not necessarily enable the 367 workaround, as it depends on the alternative framework, which will 368 only patch the kernel if an affected CPU is detected. 369 370 If unsure, say Y. 371 372config ARM64_ERRATUM_819472 373 bool "Cortex-A53: 819472: Store exclusive instructions might cause data corruption" 374 default y 375 help 376 This option adds an alternative code sequence to work around ARM 377 erratum 819472 on Cortex-A53 parts up to r0p1 with an L2 cache 378 present when it is connected to a coherent interconnect. 379 380 If the processor is executing a load and store exclusive sequence at 381 the same time as a processor in another cluster is executing a cache 382 maintenance operation to the same address, then this erratum might 383 cause data corruption. 384 385 The workaround promotes data cache clean instructions to 386 data cache clean-and-invalidate. 387 Please note that this does not necessarily enable the workaround, 388 as it depends on the alternative framework, which will only patch 389 the kernel if an affected CPU is detected. 390 391 If unsure, say Y. 392 393config ARM64_ERRATUM_832075 394 bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads" 395 default y 396 help 397 This option adds an alternative code sequence to work around ARM 398 erratum 832075 on Cortex-A57 parts up to r1p2. 399 400 Affected Cortex-A57 parts might deadlock when exclusive load/store 401 instructions to Write-Back memory are mixed with Device loads. 402 403 The workaround is to promote device loads to use Load-Acquire 404 semantics. 405 Please note that this does not necessarily enable the workaround, 406 as it depends on the alternative framework, which will only patch 407 the kernel if an affected CPU is detected. 408 409 If unsure, say Y. 410 411config ARM64_ERRATUM_834220 412 bool "Cortex-A57: 834220: Stage 2 translation fault might be incorrectly reported in presence of a Stage 1 fault" 413 depends on KVM 414 default y 415 help 416 This option adds an alternative code sequence to work around ARM 417 erratum 834220 on Cortex-A57 parts up to r1p2. 418 419 Affected Cortex-A57 parts might report a Stage 2 translation 420 fault as the result of a Stage 1 fault for load crossing a 421 page boundary when there is a permission or device memory 422 alignment fault at Stage 1 and a translation fault at Stage 2. 423 424 The workaround is to verify that the Stage 1 translation 425 doesn't generate a fault before handling the Stage 2 fault. 426 Please note that this does not necessarily enable the workaround, 427 as it depends on the alternative framework, which will only patch 428 the kernel if an affected CPU is detected. 429 430 If unsure, say Y. 431 432config ARM64_ERRATUM_845719 433 bool "Cortex-A53: 845719: a load might read incorrect data" 434 depends on COMPAT 435 default y 436 help 437 This option adds an alternative code sequence to work around ARM 438 erratum 845719 on Cortex-A53 parts up to r0p4. 439 440 When running a compat (AArch32) userspace on an affected Cortex-A53 441 part, a load at EL0 from a virtual address that matches the bottom 32 442 bits of the virtual address used by a recent load at (AArch64) EL1 443 might return incorrect data. 444 445 The workaround is to write the contextidr_el1 register on exception 446 return to a 32-bit task. 447 Please note that this does not necessarily enable the workaround, 448 as it depends on the alternative framework, which will only patch 449 the kernel if an affected CPU is detected. 450 451 If unsure, say Y. 452 453config ARM64_ERRATUM_843419 454 bool "Cortex-A53: 843419: A load or store might access an incorrect address" 455 default y 456 select ARM64_MODULE_CMODEL_LARGE if MODULES 457 help 458 This option links the kernel with '--fix-cortex-a53-843419' and 459 builds modules using the large memory model in order to avoid the use 460 of the ADRP instruction, which can cause a subsequent memory access 461 to use an incorrect address on Cortex-A53 parts up to r0p4. 462 463 If unsure, say Y. 464 465config CAVIUM_ERRATUM_22375 466 bool "Cavium erratum 22375, 24313" 467 default y 468 help 469 Enable workaround for erratum 22375, 24313. 470 471 This implements two gicv3-its errata workarounds for ThunderX. Both 472 with small impact affecting only ITS table allocation. 473 474 erratum 22375: only alloc 8MB table size 475 erratum 24313: ignore memory access type 476 477 The fixes are in ITS initialization and basically ignore memory access 478 type and table size provided by the TYPER and BASER registers. 479 480 If unsure, say Y. 481 482config CAVIUM_ERRATUM_23144 483 bool "Cavium erratum 23144: ITS SYNC hang on dual socket system" 484 depends on NUMA 485 default y 486 help 487 ITS SYNC command hang for cross node io and collections/cpu mapping. 488 489 If unsure, say Y. 490 491config CAVIUM_ERRATUM_23154 492 bool "Cavium erratum 23154: Access to ICC_IAR1_EL1 is not sync'ed" 493 default y 494 help 495 The gicv3 of ThunderX requires a modified version for 496 reading the IAR status to ensure data synchronization 497 (access to icc_iar1_el1 is not sync'ed before and after). 498 499 If unsure, say Y. 500 501config CAVIUM_ERRATUM_27456 502 bool "Cavium erratum 27456: Broadcast TLBI instructions may cause icache corruption" 503 default y 504 help 505 On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI 506 instructions may cause the icache to become corrupted if it 507 contains data for a non-current ASID. The fix is to 508 invalidate the icache when changing the mm context. 509 510 If unsure, say Y. 511 512config CAVIUM_ERRATUM_30115 513 bool "Cavium erratum 30115: Guest may disable interrupts in host" 514 default y 515 help 516 On ThunderX T88 pass 1.x through 2.2, T81 pass 1.0 through 517 1.2, and T83 Pass 1.0, KVM guest execution may disable 518 interrupts in host. Trapping both GICv3 group-0 and group-1 519 accesses sidesteps the issue. 520 521 If unsure, say Y. 522 523config QCOM_FALKOR_ERRATUM_1003 524 bool "Falkor E1003: Incorrect translation due to ASID change" 525 default y 526 help 527 On Falkor v1, an incorrect ASID may be cached in the TLB when ASID 528 and BADDR are changed together in TTBRx_EL1. Since we keep the ASID 529 in TTBR1_EL1, this situation only occurs in the entry trampoline and 530 then only for entries in the walk cache, since the leaf translation 531 is unchanged. Work around the erratum by invalidating the walk cache 532 entries for the trampoline before entering the kernel proper. 533 534config QCOM_FALKOR_ERRATUM_1009 535 bool "Falkor E1009: Prematurely complete a DSB after a TLBI" 536 default y 537 help 538 On Falkor v1, the CPU may prematurely complete a DSB following a 539 TLBI xxIS invalidate maintenance operation. Repeat the TLBI operation 540 one more time to fix the issue. 541 542 If unsure, say Y. 543 544config QCOM_QDF2400_ERRATUM_0065 545 bool "QDF2400 E0065: Incorrect GITS_TYPER.ITT_Entry_size" 546 default y 547 help 548 On Qualcomm Datacenter Technologies QDF2400 SoC, ITS hardware reports 549 ITE size incorrectly. The GITS_TYPER.ITT_Entry_size field should have 550 been indicated as 16Bytes (0xf), not 8Bytes (0x7). 551 552 If unsure, say Y. 553 554config SOCIONEXT_SYNQUACER_PREITS 555 bool "Socionext Synquacer: Workaround for GICv3 pre-ITS" 556 default y 557 help 558 Socionext Synquacer SoCs implement a separate h/w block to generate 559 MSI doorbell writes with non-zero values for the device ID. 560 561 If unsure, say Y. 562 563config HISILICON_ERRATUM_161600802 564 bool "Hip07 161600802: Erroneous redistributor VLPI base" 565 default y 566 help 567 The HiSilicon Hip07 SoC usees the wrong redistributor base 568 when issued ITS commands such as VMOVP and VMAPP, and requires 569 a 128kB offset to be applied to the target address in this commands. 570 571 If unsure, say Y. 572 573config QCOM_FALKOR_ERRATUM_E1041 574 bool "Falkor E1041: Speculative instruction fetches might cause errant memory access" 575 default y 576 help 577 Falkor CPU may speculatively fetch instructions from an improper 578 memory location when MMU translation is changed from SCTLR_ELn[M]=1 579 to SCTLR_ELn[M]=0. Prefix an ISB instruction to fix the problem. 580 581 If unsure, say Y. 582 583endmenu 584 585 586choice 587 prompt "Page size" 588 default ARM64_4K_PAGES 589 help 590 Page size (translation granule) configuration. 591 592config ARM64_4K_PAGES 593 bool "4KB" 594 help 595 This feature enables 4KB pages support. 596 597config ARM64_16K_PAGES 598 bool "16KB" 599 help 600 The system will use 16KB pages support. AArch32 emulation 601 requires applications compiled with 16K (or a multiple of 16K) 602 aligned segments. 603 604config ARM64_64K_PAGES 605 bool "64KB" 606 help 607 This feature enables 64KB pages support (4KB by default) 608 allowing only two levels of page tables and faster TLB 609 look-up. AArch32 emulation requires applications compiled 610 with 64K aligned segments. 611 612endchoice 613 614choice 615 prompt "Virtual address space size" 616 default ARM64_VA_BITS_39 if ARM64_4K_PAGES 617 default ARM64_VA_BITS_47 if ARM64_16K_PAGES 618 default ARM64_VA_BITS_42 if ARM64_64K_PAGES 619 help 620 Allows choosing one of multiple possible virtual address 621 space sizes. The level of translation table is determined by 622 a combination of page size and virtual address space size. 623 624config ARM64_VA_BITS_36 625 bool "36-bit" if EXPERT 626 depends on ARM64_16K_PAGES 627 628config ARM64_VA_BITS_39 629 bool "39-bit" 630 depends on ARM64_4K_PAGES 631 632config ARM64_VA_BITS_42 633 bool "42-bit" 634 depends on ARM64_64K_PAGES 635 636config ARM64_VA_BITS_47 637 bool "47-bit" 638 depends on ARM64_16K_PAGES 639 640config ARM64_VA_BITS_48 641 bool "48-bit" 642 643endchoice 644 645config ARM64_VA_BITS 646 int 647 default 36 if ARM64_VA_BITS_36 648 default 39 if ARM64_VA_BITS_39 649 default 42 if ARM64_VA_BITS_42 650 default 47 if ARM64_VA_BITS_47 651 default 48 if ARM64_VA_BITS_48 652 653choice 654 prompt "Physical address space size" 655 default ARM64_PA_BITS_48 656 help 657 Choose the maximum physical address range that the kernel will 658 support. 659 660config ARM64_PA_BITS_48 661 bool "48-bit" 662 663config ARM64_PA_BITS_52 664 bool "52-bit (ARMv8.2)" 665 depends on ARM64_64K_PAGES 666 depends on ARM64_PAN || !ARM64_SW_TTBR0_PAN 667 help 668 Enable support for a 52-bit physical address space, introduced as 669 part of the ARMv8.2-LPA extension. 670 671 With this enabled, the kernel will also continue to work on CPUs that 672 do not support ARMv8.2-LPA, but with some added memory overhead (and 673 minor performance overhead). 674 675endchoice 676 677config ARM64_PA_BITS 678 int 679 default 48 if ARM64_PA_BITS_48 680 default 52 if ARM64_PA_BITS_52 681 682config CPU_BIG_ENDIAN 683 bool "Build big-endian kernel" 684 help 685 Say Y if you plan on running a kernel in big-endian mode. 686 687config SCHED_MC 688 bool "Multi-core scheduler support" 689 help 690 Multi-core scheduler support improves the CPU scheduler's decision 691 making when dealing with multi-core CPU chips at a cost of slightly 692 increased overhead in some places. If unsure say N here. 693 694config SCHED_SMT 695 bool "SMT scheduler support" 696 help 697 Improves the CPU scheduler's decision making when dealing with 698 MultiThreading at a cost of slightly increased overhead in some 699 places. If unsure say N here. 700 701config NR_CPUS 702 int "Maximum number of CPUs (2-4096)" 703 range 2 4096 704 # These have to remain sorted largest to smallest 705 default "64" 706 707config HOTPLUG_CPU 708 bool "Support for hot-pluggable CPUs" 709 select GENERIC_IRQ_MIGRATION 710 help 711 Say Y here to experiment with turning CPUs off and on. CPUs 712 can be controlled through /sys/devices/system/cpu. 713 714# Common NUMA Features 715config NUMA 716 bool "Numa Memory Allocation and Scheduler Support" 717 select ACPI_NUMA if ACPI 718 select OF_NUMA 719 help 720 Enable NUMA (Non Uniform Memory Access) support. 721 722 The kernel will try to allocate memory used by a CPU on the 723 local memory of the CPU and add some more 724 NUMA awareness to the kernel. 725 726config NODES_SHIFT 727 int "Maximum NUMA Nodes (as a power of 2)" 728 range 1 10 729 default "2" 730 depends on NEED_MULTIPLE_NODES 731 help 732 Specify the maximum number of NUMA Nodes available on the target 733 system. Increases memory reserved to accommodate various tables. 734 735config USE_PERCPU_NUMA_NODE_ID 736 def_bool y 737 depends on NUMA 738 739config HAVE_SETUP_PER_CPU_AREA 740 def_bool y 741 depends on NUMA 742 743config NEED_PER_CPU_EMBED_FIRST_CHUNK 744 def_bool y 745 depends on NUMA 746 747config HOLES_IN_ZONE 748 def_bool y 749 depends on NUMA 750 751source kernel/Kconfig.preempt 752source kernel/Kconfig.hz 753 754config ARCH_SUPPORTS_DEBUG_PAGEALLOC 755 def_bool y 756 757config ARCH_HAS_HOLES_MEMORYMODEL 758 def_bool y if SPARSEMEM 759 760config ARCH_SPARSEMEM_ENABLE 761 def_bool y 762 select SPARSEMEM_VMEMMAP_ENABLE 763 764config ARCH_SPARSEMEM_DEFAULT 765 def_bool ARCH_SPARSEMEM_ENABLE 766 767config ARCH_SELECT_MEMORY_MODEL 768 def_bool ARCH_SPARSEMEM_ENABLE 769 770config HAVE_ARCH_PFN_VALID 771 def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM 772 773config HW_PERF_EVENTS 774 def_bool y 775 depends on ARM_PMU 776 777config SYS_SUPPORTS_HUGETLBFS 778 def_bool y 779 780config ARCH_WANT_HUGE_PMD_SHARE 781 def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36) 782 783config ARCH_HAS_CACHE_LINE_SIZE 784 def_bool y 785 786source "mm/Kconfig" 787 788config SECCOMP 789 bool "Enable seccomp to safely compute untrusted bytecode" 790 ---help--- 791 This kernel feature is useful for number crunching applications 792 that may need to compute untrusted bytecode during their 793 execution. By using pipes or other transports made available to 794 the process as file descriptors supporting the read/write 795 syscalls, it's possible to isolate those applications in 796 their own address space using seccomp. Once seccomp is 797 enabled via prctl(PR_SET_SECCOMP), it cannot be disabled 798 and the task is only allowed to execute a few safe syscalls 799 defined by each seccomp mode. 800 801config PARAVIRT 802 bool "Enable paravirtualization code" 803 help 804 This changes the kernel so it can modify itself when it is run 805 under a hypervisor, potentially improving performance significantly 806 over full virtualization. 807 808config PARAVIRT_TIME_ACCOUNTING 809 bool "Paravirtual steal time accounting" 810 select PARAVIRT 811 default n 812 help 813 Select this option to enable fine granularity task steal time 814 accounting. Time spent executing other tasks in parallel with 815 the current vCPU is discounted from the vCPU power. To account for 816 that, there can be a small performance impact. 817 818 If in doubt, say N here. 819 820config KEXEC 821 depends on PM_SLEEP_SMP 822 select KEXEC_CORE 823 bool "kexec system call" 824 ---help--- 825 kexec is a system call that implements the ability to shutdown your 826 current kernel, and to start another kernel. It is like a reboot 827 but it is independent of the system firmware. And like a reboot 828 you can start any kernel with it, not just Linux. 829 830config CRASH_DUMP 831 bool "Build kdump crash kernel" 832 help 833 Generate crash dump after being started by kexec. This should 834 be normally only set in special crash dump kernels which are 835 loaded in the main kernel with kexec-tools into a specially 836 reserved region and then later executed after a crash by 837 kdump/kexec. 838 839 For more details see Documentation/kdump/kdump.txt 840 841config XEN_DOM0 842 def_bool y 843 depends on XEN 844 845config XEN 846 bool "Xen guest support on ARM64" 847 depends on ARM64 && OF 848 select SWIOTLB_XEN 849 select PARAVIRT 850 help 851 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64. 852 853config FORCE_MAX_ZONEORDER 854 int 855 default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE) 856 default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE) 857 default "11" 858 help 859 The kernel memory allocator divides physically contiguous memory 860 blocks into "zones", where each zone is a power of two number of 861 pages. This option selects the largest power of two that the kernel 862 keeps in the memory allocator. If you need to allocate very large 863 blocks of physically contiguous memory, then you may need to 864 increase this value. 865 866 This config option is actually maximum order plus one. For example, 867 a value of 11 means that the largest free memory block is 2^10 pages. 868 869 We make sure that we can allocate upto a HugePage size for each configuration. 870 Hence we have : 871 MAX_ORDER = (PMD_SHIFT - PAGE_SHIFT) + 1 => PAGE_SHIFT - 2 872 873 However for 4K, we choose a higher default value, 11 as opposed to 10, giving us 874 4M allocations matching the default size used by generic code. 875 876config UNMAP_KERNEL_AT_EL0 877 bool "Unmap kernel when running in userspace (aka \"KAISER\")" if EXPERT 878 default y 879 help 880 Speculation attacks against some high-performance processors can 881 be used to bypass MMU permission checks and leak kernel data to 882 userspace. This can be defended against by unmapping the kernel 883 when running in userspace, mapping it back in on exception entry 884 via a trampoline page in the vector table. 885 886 If unsure, say Y. 887 888config HARDEN_BRANCH_PREDICTOR 889 bool "Harden the branch predictor against aliasing attacks" if EXPERT 890 default y 891 help 892 Speculation attacks against some high-performance processors rely on 893 being able to manipulate the branch predictor for a victim context by 894 executing aliasing branches in the attacker context. Such attacks 895 can be partially mitigated against by clearing internal branch 896 predictor state and limiting the prediction logic in some situations. 897 898 This config option will take CPU-specific actions to harden the 899 branch predictor against aliasing attacks and may rely on specific 900 instruction sequences or control bits being set by the system 901 firmware. 902 903 If unsure, say Y. 904 905menuconfig ARMV8_DEPRECATED 906 bool "Emulate deprecated/obsolete ARMv8 instructions" 907 depends on COMPAT 908 depends on SYSCTL 909 help 910 Legacy software support may require certain instructions 911 that have been deprecated or obsoleted in the architecture. 912 913 Enable this config to enable selective emulation of these 914 features. 915 916 If unsure, say Y 917 918if ARMV8_DEPRECATED 919 920config SWP_EMULATION 921 bool "Emulate SWP/SWPB instructions" 922 help 923 ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that 924 they are always undefined. Say Y here to enable software 925 emulation of these instructions for userspace using LDXR/STXR. 926 927 In some older versions of glibc [<=2.8] SWP is used during futex 928 trylock() operations with the assumption that the code will not 929 be preempted. This invalid assumption may be more likely to fail 930 with SWP emulation enabled, leading to deadlock of the user 931 application. 932 933 NOTE: when accessing uncached shared regions, LDXR/STXR rely 934 on an external transaction monitoring block called a global 935 monitor to maintain update atomicity. If your system does not 936 implement a global monitor, this option can cause programs that 937 perform SWP operations to uncached memory to deadlock. 938 939 If unsure, say Y 940 941config CP15_BARRIER_EMULATION 942 bool "Emulate CP15 Barrier instructions" 943 help 944 The CP15 barrier instructions - CP15ISB, CP15DSB, and 945 CP15DMB - are deprecated in ARMv8 (and ARMv7). It is 946 strongly recommended to use the ISB, DSB, and DMB 947 instructions instead. 948 949 Say Y here to enable software emulation of these 950 instructions for AArch32 userspace code. When this option is 951 enabled, CP15 barrier usage is traced which can help 952 identify software that needs updating. 953 954 If unsure, say Y 955 956config SETEND_EMULATION 957 bool "Emulate SETEND instruction" 958 help 959 The SETEND instruction alters the data-endianness of the 960 AArch32 EL0, and is deprecated in ARMv8. 961 962 Say Y here to enable software emulation of the instruction 963 for AArch32 userspace code. 964 965 Note: All the cpus on the system must have mixed endian support at EL0 966 for this feature to be enabled. If a new CPU - which doesn't support mixed 967 endian - is hotplugged in after this feature has been enabled, there could 968 be unexpected results in the applications. 969 970 If unsure, say Y 971endif 972 973config ARM64_SW_TTBR0_PAN 974 bool "Emulate Privileged Access Never using TTBR0_EL1 switching" 975 help 976 Enabling this option prevents the kernel from accessing 977 user-space memory directly by pointing TTBR0_EL1 to a reserved 978 zeroed area and reserved ASID. The user access routines 979 restore the valid TTBR0_EL1 temporarily. 980 981menu "ARMv8.1 architectural features" 982 983config ARM64_HW_AFDBM 984 bool "Support for hardware updates of the Access and Dirty page flags" 985 default y 986 help 987 The ARMv8.1 architecture extensions introduce support for 988 hardware updates of the access and dirty information in page 989 table entries. When enabled in TCR_EL1 (HA and HD bits) on 990 capable processors, accesses to pages with PTE_AF cleared will 991 set this bit instead of raising an access flag fault. 992 Similarly, writes to read-only pages with the DBM bit set will 993 clear the read-only bit (AP[2]) instead of raising a 994 permission fault. 995 996 Kernels built with this configuration option enabled continue 997 to work on pre-ARMv8.1 hardware and the performance impact is 998 minimal. If unsure, say Y. 999 1000config ARM64_PAN 1001 bool "Enable support for Privileged Access Never (PAN)" 1002 default y 1003 help 1004 Privileged Access Never (PAN; part of the ARMv8.1 Extensions) 1005 prevents the kernel or hypervisor from accessing user-space (EL0) 1006 memory directly. 1007 1008 Choosing this option will cause any unprotected (not using 1009 copy_to_user et al) memory access to fail with a permission fault. 1010 1011 The feature is detected at runtime, and will remain as a 'nop' 1012 instruction if the cpu does not implement the feature. 1013 1014config ARM64_LSE_ATOMICS 1015 bool "Atomic instructions" 1016 help 1017 As part of the Large System Extensions, ARMv8.1 introduces new 1018 atomic instructions that are designed specifically to scale in 1019 very large systems. 1020 1021 Say Y here to make use of these instructions for the in-kernel 1022 atomic routines. This incurs a small overhead on CPUs that do 1023 not support these instructions and requires the kernel to be 1024 built with binutils >= 2.25. 1025 1026config ARM64_VHE 1027 bool "Enable support for Virtualization Host Extensions (VHE)" 1028 default y 1029 help 1030 Virtualization Host Extensions (VHE) allow the kernel to run 1031 directly at EL2 (instead of EL1) on processors that support 1032 it. This leads to better performance for KVM, as they reduce 1033 the cost of the world switch. 1034 1035 Selecting this option allows the VHE feature to be detected 1036 at runtime, and does not affect processors that do not 1037 implement this feature. 1038 1039endmenu 1040 1041menu "ARMv8.2 architectural features" 1042 1043config ARM64_UAO 1044 bool "Enable support for User Access Override (UAO)" 1045 default y 1046 help 1047 User Access Override (UAO; part of the ARMv8.2 Extensions) 1048 causes the 'unprivileged' variant of the load/store instructions to 1049 be overridden to be privileged. 1050 1051 This option changes get_user() and friends to use the 'unprivileged' 1052 variant of the load/store instructions. This ensures that user-space 1053 really did have access to the supplied memory. When addr_limit is 1054 set to kernel memory the UAO bit will be set, allowing privileged 1055 access to kernel memory. 1056 1057 Choosing this option will cause copy_to_user() et al to use user-space 1058 memory permissions. 1059 1060 The feature is detected at runtime, the kernel will use the 1061 regular load/store instructions if the cpu does not implement the 1062 feature. 1063 1064config ARM64_PMEM 1065 bool "Enable support for persistent memory" 1066 select ARCH_HAS_PMEM_API 1067 select ARCH_HAS_UACCESS_FLUSHCACHE 1068 help 1069 Say Y to enable support for the persistent memory API based on the 1070 ARMv8.2 DCPoP feature. 1071 1072 The feature is detected at runtime, and the kernel will use DC CVAC 1073 operations if DC CVAP is not supported (following the behaviour of 1074 DC CVAP itself if the system does not define a point of persistence). 1075 1076config ARM64_RAS_EXTN 1077 bool "Enable support for RAS CPU Extensions" 1078 default y 1079 help 1080 CPUs that support the Reliability, Availability and Serviceability 1081 (RAS) Extensions, part of ARMv8.2 are able to track faults and 1082 errors, classify them and report them to software. 1083 1084 On CPUs with these extensions system software can use additional 1085 barriers to determine if faults are pending and read the 1086 classification from a new set of registers. 1087 1088 Selecting this feature will allow the kernel to use these barriers 1089 and access the new registers if the system supports the extension. 1090 Platform RAS features may additionally depend on firmware support. 1091 1092endmenu 1093 1094config ARM64_SVE 1095 bool "ARM Scalable Vector Extension support" 1096 default y 1097 help 1098 The Scalable Vector Extension (SVE) is an extension to the AArch64 1099 execution state which complements and extends the SIMD functionality 1100 of the base architecture to support much larger vectors and to enable 1101 additional vectorisation opportunities. 1102 1103 To enable use of this extension on CPUs that implement it, say Y. 1104 1105config ARM64_MODULE_CMODEL_LARGE 1106 bool 1107 1108config ARM64_MODULE_PLTS 1109 bool 1110 select ARM64_MODULE_CMODEL_LARGE 1111 select HAVE_MOD_ARCH_SPECIFIC 1112 1113config RELOCATABLE 1114 bool 1115 help 1116 This builds the kernel as a Position Independent Executable (PIE), 1117 which retains all relocation metadata required to relocate the 1118 kernel binary at runtime to a different virtual address than the 1119 address it was linked at. 1120 Since AArch64 uses the RELA relocation format, this requires a 1121 relocation pass at runtime even if the kernel is loaded at the 1122 same address it was linked at. 1123 1124config RANDOMIZE_BASE 1125 bool "Randomize the address of the kernel image" 1126 select ARM64_MODULE_PLTS if MODULES 1127 select RELOCATABLE 1128 help 1129 Randomizes the virtual address at which the kernel image is 1130 loaded, as a security feature that deters exploit attempts 1131 relying on knowledge of the location of kernel internals. 1132 1133 It is the bootloader's job to provide entropy, by passing a 1134 random u64 value in /chosen/kaslr-seed at kernel entry. 1135 1136 When booting via the UEFI stub, it will invoke the firmware's 1137 EFI_RNG_PROTOCOL implementation (if available) to supply entropy 1138 to the kernel proper. In addition, it will randomise the physical 1139 location of the kernel Image as well. 1140 1141 If unsure, say N. 1142 1143config RANDOMIZE_MODULE_REGION_FULL 1144 bool "Randomize the module region independently from the core kernel" 1145 depends on RANDOMIZE_BASE 1146 default y 1147 help 1148 Randomizes the location of the module region without considering the 1149 location of the core kernel. This way, it is impossible for modules 1150 to leak information about the location of core kernel data structures 1151 but it does imply that function calls between modules and the core 1152 kernel will need to be resolved via veneers in the module PLT. 1153 1154 When this option is not set, the module region will be randomized over 1155 a limited range that contains the [_stext, _etext] interval of the 1156 core kernel, so branch relocations are always in range. 1157 1158endmenu 1159 1160menu "Boot options" 1161 1162config ARM64_ACPI_PARKING_PROTOCOL 1163 bool "Enable support for the ARM64 ACPI parking protocol" 1164 depends on ACPI 1165 help 1166 Enable support for the ARM64 ACPI parking protocol. If disabled 1167 the kernel will not allow booting through the ARM64 ACPI parking 1168 protocol even if the corresponding data is present in the ACPI 1169 MADT table. 1170 1171config CMDLINE 1172 string "Default kernel command string" 1173 default "" 1174 help 1175 Provide a set of default command-line options at build time by 1176 entering them here. As a minimum, you should specify the the 1177 root device (e.g. root=/dev/nfs). 1178 1179config CMDLINE_FORCE 1180 bool "Always use the default kernel command string" 1181 help 1182 Always use the default kernel command string, even if the boot 1183 loader passes other arguments to the kernel. 1184 This is useful if you cannot or don't want to change the 1185 command-line options your boot loader passes to the kernel. 1186 1187config EFI_STUB 1188 bool 1189 1190config EFI 1191 bool "UEFI runtime support" 1192 depends on OF && !CPU_BIG_ENDIAN 1193 depends on KERNEL_MODE_NEON 1194 select LIBFDT 1195 select UCS2_STRING 1196 select EFI_PARAMS_FROM_FDT 1197 select EFI_RUNTIME_WRAPPERS 1198 select EFI_STUB 1199 select EFI_ARMSTUB 1200 default y 1201 help 1202 This option provides support for runtime services provided 1203 by UEFI firmware (such as non-volatile variables, realtime 1204 clock, and platform reset). A UEFI stub is also provided to 1205 allow the kernel to be booted as an EFI application. This 1206 is only useful on systems that have UEFI firmware. 1207 1208config DMI 1209 bool "Enable support for SMBIOS (DMI) tables" 1210 depends on EFI 1211 default y 1212 help 1213 This enables SMBIOS/DMI feature for systems. 1214 1215 This option is only useful on systems that have UEFI firmware. 1216 However, even with this option, the resultant kernel should 1217 continue to boot on existing non-UEFI platforms. 1218 1219endmenu 1220 1221menu "Userspace binary formats" 1222 1223source "fs/Kconfig.binfmt" 1224 1225config COMPAT 1226 bool "Kernel support for 32-bit EL0" 1227 depends on ARM64_4K_PAGES || EXPERT 1228 select COMPAT_BINFMT_ELF if BINFMT_ELF 1229 select HAVE_UID16 1230 select OLD_SIGSUSPEND3 1231 select COMPAT_OLD_SIGACTION 1232 help 1233 This option enables support for a 32-bit EL0 running under a 64-bit 1234 kernel at EL1. AArch32-specific components such as system calls, 1235 the user helper functions, VFP support and the ptrace interface are 1236 handled appropriately by the kernel. 1237 1238 If you use a page size other than 4KB (i.e, 16KB or 64KB), please be aware 1239 that you will only be able to execute AArch32 binaries that were compiled 1240 with page size aligned segments. 1241 1242 If you want to execute 32-bit userspace applications, say Y. 1243 1244config SYSVIPC_COMPAT 1245 def_bool y 1246 depends on COMPAT && SYSVIPC 1247 1248endmenu 1249 1250menu "Power management options" 1251 1252source "kernel/power/Kconfig" 1253 1254config ARCH_HIBERNATION_POSSIBLE 1255 def_bool y 1256 depends on CPU_PM 1257 1258config ARCH_HIBERNATION_HEADER 1259 def_bool y 1260 depends on HIBERNATION 1261 1262config ARCH_SUSPEND_POSSIBLE 1263 def_bool y 1264 1265endmenu 1266 1267menu "CPU Power Management" 1268 1269source "drivers/cpuidle/Kconfig" 1270 1271source "drivers/cpufreq/Kconfig" 1272 1273endmenu 1274 1275source "net/Kconfig" 1276 1277source "drivers/Kconfig" 1278 1279source "drivers/firmware/Kconfig" 1280 1281source "drivers/acpi/Kconfig" 1282 1283source "fs/Kconfig" 1284 1285source "arch/arm64/kvm/Kconfig" 1286 1287source "arch/arm64/Kconfig.debug" 1288 1289source "security/Kconfig" 1290 1291source "crypto/Kconfig" 1292if CRYPTO 1293source "arch/arm64/crypto/Kconfig" 1294endif 1295 1296source "lib/Kconfig" 1297