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