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