1# SPDX-License-Identifier: GPL-2.0-only 2config ARM64 3 def_bool y 4 select ACPI_APMT if ACPI 5 select ACPI_CCA_REQUIRED if ACPI 6 select ACPI_GENERIC_GSI if ACPI 7 select ACPI_GTDT if ACPI 8 select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU 9 select ACPI_IORT if ACPI 10 select ACPI_REDUCED_HARDWARE_ONLY if ACPI 11 select ACPI_MCFG if (ACPI && PCI) 12 select ACPI_SPCR_TABLE if ACPI 13 select ACPI_PPTT if ACPI 14 select ARCH_HAS_DEBUG_WX 15 select ARCH_BINFMT_ELF_EXTRA_PHDRS 16 select ARCH_BINFMT_ELF_STATE 17 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION 18 select ARCH_ENABLE_MEMORY_HOTPLUG 19 select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 20 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE 21 select ARCH_HAS_CACHE_LINE_SIZE 22 select ARCH_HAS_CC_PLATFORM 23 select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION 24 select ARCH_HAS_CURRENT_STACK_POINTER 25 select ARCH_HAS_DEBUG_VIRTUAL 26 select ARCH_HAS_DEBUG_VM_PGTABLE 27 select ARCH_HAS_DMA_OPS if XEN 28 select ARCH_HAS_DMA_PREP_COHERENT 29 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI 30 select ARCH_HAS_FAST_MULTIPLIER 31 select ARCH_HAS_FORTIFY_SOURCE 32 select ARCH_HAS_GCOV_PROFILE_ALL 33 select ARCH_HAS_GIGANTIC_PAGE 34 select ARCH_HAS_KCOV 35 select ARCH_HAS_KERNEL_FPU_SUPPORT if KERNEL_MODE_NEON 36 select ARCH_HAS_KEEPINITRD 37 select ARCH_HAS_LAZY_MMU_MODE 38 select ARCH_HAS_MEMBARRIER_SYNC_CORE 39 select ARCH_HAS_MEM_ENCRYPT 40 select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 41 select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS 42 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE 43 select ARCH_HAS_NONLEAF_PMD_YOUNG if ARM64_HAFT 44 select ARCH_HAS_PREEMPT_LAZY 45 select ARCH_HAS_PTDUMP 46 select ARCH_HAS_PTE_SPECIAL 47 select ARCH_HAS_HW_PTE_YOUNG 48 select ARCH_HAS_SETUP_DMA_OPS 49 select ARCH_HAS_SET_DIRECT_MAP 50 select ARCH_HAS_SET_MEMORY 51 select ARCH_HAS_FORCE_DMA_UNENCRYPTED 52 select ARCH_STACKWALK 53 select ARCH_HAS_STRICT_KERNEL_RWX 54 select ARCH_HAS_STRICT_MODULE_RWX 55 select ARCH_HAS_SYNC_DMA_FOR_DEVICE 56 select ARCH_HAS_SYNC_DMA_FOR_CPU 57 select ARCH_HAS_BATCHED_DMA_SYNC 58 select ARCH_HAS_SYSCALL_WRAPPER 59 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 60 select ARCH_HAS_ZONE_DMA_SET if EXPERT 61 select ARCH_HAVE_ELF_PROT 62 select ARCH_HAVE_NMI_SAFE_CMPXCHG 63 select ARCH_HAVE_TRACE_MMIO_ACCESS 64 select ARCH_KEEP_MEMBLOCK 65 select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE 66 select ARCH_USE_CMPXCHG_LOCKREF 67 select ARCH_USE_GNU_PROPERTY 68 select ARCH_USE_MEMTEST 69 select ARCH_USE_QUEUED_RWLOCKS 70 select ARCH_USE_QUEUED_SPINLOCKS 71 select ARCH_USE_SYM_ANNOTATIONS 72 select ARCH_SUPPORTS_DEBUG_PAGEALLOC 73 select ARCH_SUPPORTS_HUGETLBFS 74 select ARCH_SUPPORTS_MEMORY_FAILURE 75 select ARCH_SUPPORTS_SHADOW_CALL_STACK if CC_HAVE_SHADOW_CALL_STACK 76 select ARCH_SUPPORTS_LTO_CLANG if CPU_LITTLE_ENDIAN 77 select ARCH_SUPPORTS_LTO_CLANG_THIN 78 select ARCH_SUPPORTS_CFI 79 select ARCH_SUPPORTS_ATOMIC_RMW 80 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 81 select ARCH_SUPPORTS_NUMA_BALANCING 82 select ARCH_SUPPORTS_PAGE_TABLE_CHECK 83 select ARCH_SUPPORTS_PER_VMA_LOCK 84 select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE 85 select ARCH_SUPPORTS_RT 86 select ARCH_SUPPORTS_SCHED_SMT 87 select ARCH_SUPPORTS_SCHED_CLUSTER 88 select ARCH_SUPPORTS_SCHED_MC 89 select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH 90 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT 91 select ARCH_WANT_DEFAULT_BPF_JIT 92 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 93 select ARCH_WANT_FRAME_POINTERS 94 select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36) 95 select ARCH_WANT_LD_ORPHAN_WARN 96 select ARCH_WANTS_EXECMEM_LATE 97 select ARCH_WANTS_NO_INSTR 98 select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES 99 select ARCH_HAS_UBSAN 100 select ARM_AMBA 101 select ARM_ARCH_TIMER 102 select ARM_GIC 103 select AUDIT_ARCH_COMPAT_GENERIC 104 select ARM_GIC_V2M if PCI 105 select ARM_GIC_V3 106 select ARM_GIC_V3_ITS if PCI 107 select ARM_GIC_V5 108 select ARM_PSCI_FW 109 select BUILDTIME_TABLE_SORT 110 select CLONE_BACKWARDS 111 select COMMON_CLK 112 select CPU_PM if (SUSPEND || CPU_IDLE) 113 select CPUMASK_OFFSTACK if NR_CPUS > 256 114 select DCACHE_WORD_ACCESS 115 select HAVE_EXTRA_IPI_TRACEPOINTS 116 select DYNAMIC_FTRACE if FUNCTION_TRACER 117 select DMA_BOUNCE_UNALIGNED_KMALLOC 118 select DMA_DIRECT_REMAP 119 select EDAC_SUPPORT 120 select FRAME_POINTER 121 select FUNCTION_ALIGNMENT_4B 122 select FUNCTION_ALIGNMENT_8B if DYNAMIC_FTRACE_WITH_CALL_OPS 123 select GENERIC_ALLOCATOR 124 select GENERIC_ARCH_TOPOLOGY 125 select GENERIC_CLOCKEVENTS_BROADCAST 126 select GENERIC_CPU_AUTOPROBE 127 select GENERIC_CPU_CACHE_MAINTENANCE 128 select GENERIC_CPU_DEVICES 129 select GENERIC_CPU_VULNERABILITIES 130 select GENERIC_EARLY_IOREMAP 131 select GENERIC_IDLE_POLL_SETUP 132 select GENERIC_IOREMAP 133 select GENERIC_IRQ_ENTRY 134 select GENERIC_IRQ_IPI 135 select GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD 136 select GENERIC_IRQ_PROBE 137 select GENERIC_IRQ_SHOW 138 select GENERIC_IRQ_SHOW_LEVEL 139 select GENERIC_LIB_DEVMEM_IS_ALLOWED 140 select GENERIC_PCI_IOMAP 141 select GENERIC_SCHED_CLOCK 142 select GENERIC_SMP_IDLE_THREAD 143 select GENERIC_GETTIMEOFDAY 144 select HARDIRQS_SW_RESEND 145 select HAS_IOPORT 146 select HAVE_MOVE_PMD 147 select HAVE_MOVE_PUD 148 select HAVE_PCI 149 select HAVE_ACPI_APEI if (ACPI && EFI) 150 select HAVE_ALIGNED_STRUCT_PAGE 151 select HAVE_ARCH_AUDITSYSCALL 152 select HAVE_ARCH_BITREVERSE if BITREVERSE 153 select HAVE_ARCH_COMPILER_H 154 select HAVE_ARCH_HUGE_VMALLOC 155 select HAVE_ARCH_HUGE_VMAP 156 select HAVE_ARCH_JUMP_LABEL 157 select HAVE_ARCH_JUMP_LABEL_RELATIVE 158 select HAVE_ARCH_KASAN 159 select HAVE_ARCH_KASAN_VMALLOC 160 select HAVE_ARCH_KASAN_SW_TAGS 161 select HAVE_ARCH_KASAN_HW_TAGS if ARM64_MTE 162 # Some instrumentation may be unsound, hence EXPERT 163 select HAVE_ARCH_KCSAN if EXPERT 164 select HAVE_ARCH_KFENCE 165 select HAVE_ARCH_KGDB 166 select HAVE_ARCH_KSTACK_ERASE 167 select HAVE_ARCH_MMAP_RND_BITS 168 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT 169 select HAVE_ARCH_PREL32_RELOCATIONS 170 select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET 171 select HAVE_ARCH_SECCOMP_FILTER 172 select HAVE_ARCH_THREAD_STRUCT_WHITELIST 173 select HAVE_ARCH_TRACEHOOK 174 select HAVE_ARCH_TRANSPARENT_HUGEPAGE 175 select HAVE_ARCH_VMAP_STACK 176 select HAVE_ARM_SMCCC 177 select HAVE_ASM_MODVERSIONS 178 select HAVE_EBPF_JIT 179 select HAVE_C_RECORDMCOUNT 180 select HAVE_CMPXCHG_DOUBLE 181 select HAVE_CMPXCHG_LOCAL 182 select HAVE_CONTEXT_TRACKING_USER 183 select HAVE_DEBUG_KMEMLEAK 184 select HAVE_DMA_CONTIGUOUS 185 select HAVE_DYNAMIC_FTRACE 186 select HAVE_DYNAMIC_FTRACE_WITH_ARGS \ 187 if (GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS || \ 188 CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS) 189 select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS \ 190 if DYNAMIC_FTRACE_WITH_ARGS && DYNAMIC_FTRACE_WITH_CALL_OPS 191 select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS \ 192 if (DYNAMIC_FTRACE_WITH_ARGS && !CFI && \ 193 (CC_IS_CLANG || !CC_OPTIMIZE_FOR_SIZE)) 194 select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \ 195 if DYNAMIC_FTRACE_WITH_ARGS 196 select HAVE_SAMPLE_FTRACE_DIRECT 197 select HAVE_SAMPLE_FTRACE_DIRECT_MULTI 198 select HAVE_BUILDTIME_MCOUNT_SORT 199 select HAVE_EFFICIENT_UNALIGNED_ACCESS 200 select HAVE_GUP_FAST 201 select HAVE_FTRACE_GRAPH_FUNC 202 select HAVE_FUNCTION_TRACER 203 select HAVE_FUNCTION_ERROR_INJECTION 204 select HAVE_FUNCTION_GRAPH_FREGS 205 select HAVE_FUNCTION_GRAPH_TRACER 206 select HAVE_GCC_PLUGINS 207 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \ 208 HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI 209 select HAVE_HW_BREAKPOINT if PERF_EVENTS 210 select HAVE_IOREMAP_PROT 211 select HAVE_IRQ_TIME_ACCOUNTING 212 select HAVE_LIVEPATCH 213 select HAVE_MOD_ARCH_SPECIFIC 214 select HAVE_NMI 215 select HAVE_PERF_EVENTS 216 select HAVE_PERF_EVENTS_NMI if ARM64_PSEUDO_NMI 217 select HAVE_PERF_REGS 218 select HAVE_PERF_USER_STACK_DUMP 219 select HAVE_PREEMPT_DYNAMIC_KEY 220 select HAVE_REGS_AND_STACK_ACCESS_API 221 select HAVE_RELIABLE_STACKTRACE 222 select HAVE_POSIX_CPU_TIMERS_TASK_WORK 223 select HAVE_FUNCTION_ARG_ACCESS_API 224 select MMU_GATHER_RCU_TABLE_FREE 225 select HAVE_RSEQ 226 select HAVE_RUST if RUSTC_SUPPORTS_ARM64 227 select HAVE_STACKPROTECTOR 228 select HAVE_STATIC_CALL if CFI 229 select HAVE_SYSCALL_TRACEPOINTS 230 select HAVE_KPROBES 231 select HAVE_KRETPROBES 232 select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 233 select HOTPLUG_SMT if HOTPLUG_CPU 234 select IRQ_DOMAIN 235 select IRQ_FORCED_THREADING 236 select JUMP_LABEL 237 select KASAN_VMALLOC if KASAN 238 select LOCK_MM_AND_FIND_VMA 239 select MODULES_USE_ELF_RELA 240 select NEED_DMA_MAP_STATE 241 select NEED_SG_DMA_LENGTH 242 select OF 243 select OF_EARLY_FLATTREE 244 select PCI_DOMAINS_GENERIC if PCI 245 select PCI_ECAM if (ACPI && PCI) 246 select PCI_SYSCALL if PCI 247 select POWER_RESET 248 select POWER_SUPPLY 249 select SPARSE_IRQ 250 select SWIOTLB 251 select SYSCTL_EXCEPTION_TRACE 252 select THREAD_INFO_IN_TASK 253 select HAVE_ARCH_USERFAULTFD_MINOR if USERFAULTFD 254 select HAVE_ARCH_USERFAULTFD_WP if USERFAULTFD 255 select TRACE_IRQFLAGS_SUPPORT 256 select TRACE_IRQFLAGS_NMI_SUPPORT 257 select HAVE_SOFTIRQ_ON_OWN_STACK 258 select USER_STACKTRACE_SUPPORT 259 select VDSO_GETRANDOM 260 select VMAP_STACK 261 help 262 ARM 64-bit (AArch64) Linux support. 263 264config RUSTC_SUPPORTS_ARM64 265 def_bool y 266 depends on CPU_LITTLE_ENDIAN 267 268config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS 269 def_bool CC_IS_CLANG 270 # https://github.com/ClangBuiltLinux/linux/issues/1507 271 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600)) 272 273config GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS 274 def_bool CC_IS_GCC 275 depends on $(cc-option,-fpatchable-function-entry=2) 276 277config 64BIT 278 def_bool y 279 280config MMU 281 def_bool y 282 283config ARM64_CONT_PTE_SHIFT 284 int 285 default 5 if PAGE_SIZE_64KB 286 default 7 if PAGE_SIZE_16KB 287 default 4 288 289config ARM64_CONT_PMD_SHIFT 290 int 291 default 5 if PAGE_SIZE_64KB 292 default 5 if PAGE_SIZE_16KB 293 default 4 294 295config ARCH_MMAP_RND_BITS_MIN 296 default 14 if PAGE_SIZE_64KB 297 default 16 if PAGE_SIZE_16KB 298 default 18 299 300# max bits determined by the following formula: 301# VA_BITS - PTDESC_TABLE_SHIFT 302config ARCH_MMAP_RND_BITS_MAX 303 default 19 if ARM64_VA_BITS=36 304 default 24 if ARM64_VA_BITS=39 305 default 27 if ARM64_VA_BITS=42 306 default 30 if ARM64_VA_BITS=47 307 default 29 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) && ARM64_64K_PAGES 308 default 31 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) && ARM64_16K_PAGES 309 default 33 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) 310 default 14 if ARM64_64K_PAGES 311 default 16 if ARM64_16K_PAGES 312 default 18 313 314config ARCH_MMAP_RND_COMPAT_BITS_MIN 315 default 7 if ARM64_64K_PAGES 316 default 9 if ARM64_16K_PAGES 317 default 11 318 319config ARCH_MMAP_RND_COMPAT_BITS_MAX 320 default 16 321 322config NO_IOPORT_MAP 323 def_bool y if !PCI 324 325config STACKTRACE_SUPPORT 326 def_bool y 327 328config ILLEGAL_POINTER_VALUE 329 hex 330 default 0xdead000000000000 331 332config LOCKDEP_SUPPORT 333 def_bool y 334 335config GENERIC_BUG 336 def_bool y 337 depends on BUG 338 339config GENERIC_BUG_RELATIVE_POINTERS 340 def_bool y 341 depends on GENERIC_BUG 342 343config GENERIC_HWEIGHT 344 def_bool y 345 346config GENERIC_CSUM 347 def_bool y 348 349config GENERIC_CALIBRATE_DELAY 350 def_bool y 351 352config SMP 353 def_bool y 354 355config KERNEL_MODE_NEON 356 def_bool y 357 358config FIX_EARLYCON_MEM 359 def_bool y 360 361config PGTABLE_LEVELS 362 int 363 default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36 364 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42 365 default 3 if ARM64_64K_PAGES && (ARM64_VA_BITS_48 || ARM64_VA_BITS_52) 366 default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39 367 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47 368 default 4 if ARM64_16K_PAGES && (ARM64_VA_BITS_48 || ARM64_VA_BITS_52) 369 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48 370 default 5 if ARM64_4K_PAGES && ARM64_VA_BITS_52 371 372config ARCH_SUPPORTS_UPROBES 373 def_bool y 374 375config ARCH_PROC_KCORE_TEXT 376 def_bool y 377 378config BROKEN_GAS_INST 379 def_bool !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n) 380 381config BUILTIN_RETURN_ADDRESS_STRIPS_PAC 382 bool 383 # Clang's __builtin_return_address() strips the PAC since 12.0.0 384 # https://github.com/llvm/llvm-project/commit/2a96f47c5ffca84cd774ad402cacd137f4bf45e2 385 default y if CC_IS_CLANG 386 # GCC's __builtin_return_address() strips the PAC since 11.1.0, 387 # and this was backported to 10.2.0, 9.4.0, 8.5.0, but not earlier 388 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94891 389 default y if CC_IS_GCC && (GCC_VERSION >= 110100) 390 default y if CC_IS_GCC && (GCC_VERSION >= 100200) && (GCC_VERSION < 110000) 391 default y if CC_IS_GCC && (GCC_VERSION >= 90400) && (GCC_VERSION < 100000) 392 default y if CC_IS_GCC && (GCC_VERSION >= 80500) && (GCC_VERSION < 90000) 393 default n 394 395config KASAN_SHADOW_OFFSET 396 hex 397 depends on KASAN_GENERIC || KASAN_SW_TAGS 398 default 0xdfff800000000000 if (ARM64_VA_BITS_48 || (ARM64_VA_BITS_52 && !ARM64_16K_PAGES)) && !KASAN_SW_TAGS 399 default 0xdfffc00000000000 if (ARM64_VA_BITS_47 || ARM64_VA_BITS_52) && ARM64_16K_PAGES && !KASAN_SW_TAGS 400 default 0xdffffe0000000000 if ARM64_VA_BITS_42 && !KASAN_SW_TAGS 401 default 0xdfffffc000000000 if ARM64_VA_BITS_39 && !KASAN_SW_TAGS 402 default 0xdffffff800000000 if ARM64_VA_BITS_36 && !KASAN_SW_TAGS 403 default 0xefff800000000000 if (ARM64_VA_BITS_48 || (ARM64_VA_BITS_52 && !ARM64_16K_PAGES)) && KASAN_SW_TAGS 404 default 0xefffc00000000000 if (ARM64_VA_BITS_47 || ARM64_VA_BITS_52) && ARM64_16K_PAGES && KASAN_SW_TAGS 405 default 0xeffffe0000000000 if ARM64_VA_BITS_42 && KASAN_SW_TAGS 406 default 0xefffffc000000000 if ARM64_VA_BITS_39 && KASAN_SW_TAGS 407 default 0xeffffff800000000 if ARM64_VA_BITS_36 && KASAN_SW_TAGS 408 default 0xffffffffffffffff 409 410config UNWIND_TABLES 411 bool 412 413source "arch/arm64/Kconfig.platforms" 414 415menu "Kernel Features" 416 417menu "ARM errata workarounds via the alternatives framework" 418 419config AMPERE_ERRATUM_AC03_CPU_38 420 bool "AmpereOne: AC03_CPU_38: Certain bits in the Virtualization Translation Control Register and Translation Control Registers do not follow RES0 semantics" 421 default y 422 help 423 This option adds an alternative code sequence to work around Ampere 424 errata AC03_CPU_38 and AC04_CPU_10 on AmpereOne. 425 426 The affected design reports FEAT_HAFDBS as not implemented in 427 ID_AA64MMFR1_EL1.HAFDBS, but (V)TCR_ELx.{HA,HD} are not RES0 428 as required by the architecture. The unadvertised HAFDBS 429 implementation suffers from an additional erratum where hardware 430 A/D updates can occur after a PTE has been marked invalid. 431 432 The workaround forces KVM to explicitly set VTCR_EL2.HA to 0, 433 which avoids enabling unadvertised hardware Access Flag management 434 at stage-2. 435 436 If unsure, say Y. 437 438config AMPERE_ERRATUM_AC04_CPU_23 439 bool "AmpereOne: AC04_CPU_23: Failure to synchronize writes to HCR_EL2 may corrupt address translations." 440 default y 441 help 442 This option adds an alternative code sequence to work around Ampere 443 errata AC04_CPU_23 on AmpereOne. 444 445 Updates to HCR_EL2 can rarely corrupt simultaneous translations for 446 data addresses initiated by load/store instructions. Only 447 instruction initiated translations are vulnerable, not translations 448 from prefetches for example. A DSB before the store to HCR_EL2 is 449 sufficient to prevent older instructions from hitting the window 450 for corruption, and an ISB after is sufficient to prevent younger 451 instructions from hitting the window for corruption. 452 453 If unsure, say Y. 454 455config ARM64_WORKAROUND_CLEAN_CACHE 456 bool 457 458config ARM64_ERRATUM_826319 459 bool "Cortex-A53: 826319: System might deadlock if a write cannot complete until read data is accepted" 460 default y 461 select ARM64_WORKAROUND_CLEAN_CACHE 462 help 463 This option adds an alternative code sequence to work around ARM 464 erratum 826319 on Cortex-A53 parts up to r0p2 with an AMBA 4 ACE or 465 AXI master interface and an L2 cache. 466 467 If a Cortex-A53 uses an AMBA AXI4 ACE interface to other processors 468 and is unable to accept a certain write via this interface, it will 469 not progress on read data presented on the read data channel and the 470 system can deadlock. 471 472 The workaround promotes data cache clean instructions to 473 data cache clean-and-invalidate. 474 Please note that this does not necessarily enable the workaround, 475 as it depends on the alternative framework, which will only patch 476 the kernel if an affected CPU is detected. 477 478 If unsure, say Y. 479 480config ARM64_ERRATUM_827319 481 bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect" 482 default y 483 select ARM64_WORKAROUND_CLEAN_CACHE 484 help 485 This option adds an alternative code sequence to work around ARM 486 erratum 827319 on Cortex-A53 parts up to r0p2 with an AMBA 5 CHI 487 master interface and an L2 cache. 488 489 Under certain conditions this erratum can cause a clean line eviction 490 to occur at the same time as another transaction to the same address 491 on the AMBA 5 CHI interface, which can cause data corruption if the 492 interconnect reorders the two transactions. 493 494 The workaround promotes data cache clean instructions to 495 data cache clean-and-invalidate. 496 Please note that this does not necessarily enable the workaround, 497 as it depends on the alternative framework, which will only patch 498 the kernel if an affected CPU is detected. 499 500 If unsure, say Y. 501 502config ARM64_ERRATUM_824069 503 bool "Cortex-A53: 824069: Cache line might not be marked as clean after a CleanShared snoop" 504 default y 505 select ARM64_WORKAROUND_CLEAN_CACHE 506 help 507 This option adds an alternative code sequence to work around ARM 508 erratum 824069 on Cortex-A53 parts up to r0p2 when it is connected 509 to a coherent interconnect. 510 511 If a Cortex-A53 processor is executing a store or prefetch for 512 write instruction at the same time as a processor in another 513 cluster is executing a cache maintenance operation to the same 514 address, then this erratum might cause a clean cache line to be 515 incorrectly marked as dirty. 516 517 The workaround promotes data cache clean instructions to 518 data cache clean-and-invalidate. 519 Please note that this option does not necessarily enable the 520 workaround, as it depends on the alternative framework, which will 521 only patch the kernel if an affected CPU is detected. 522 523 If unsure, say Y. 524 525config ARM64_ERRATUM_819472 526 bool "Cortex-A53: 819472: Store exclusive instructions might cause data corruption" 527 default y 528 select ARM64_WORKAROUND_CLEAN_CACHE 529 help 530 This option adds an alternative code sequence to work around ARM 531 erratum 819472 on Cortex-A53 parts up to r0p1 with an L2 cache 532 present when it is connected to a coherent interconnect. 533 534 If the processor is executing a load and store exclusive sequence at 535 the same time as a processor in another cluster is executing a cache 536 maintenance operation to the same address, then this erratum might 537 cause data corruption. 538 539 The workaround promotes data cache clean instructions to 540 data cache clean-and-invalidate. 541 Please note that this does not necessarily enable the workaround, 542 as it depends on the alternative framework, which will only patch 543 the kernel if an affected CPU is detected. 544 545 If unsure, say Y. 546 547config ARM64_ERRATUM_832075 548 bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads" 549 default y 550 help 551 This option adds an alternative code sequence to work around ARM 552 erratum 832075 on Cortex-A57 parts up to r1p2. 553 554 Affected Cortex-A57 parts might deadlock when exclusive load/store 555 instructions to Write-Back memory are mixed with Device loads. 556 557 The workaround is to promote device loads to use Load-Acquire 558 semantics. 559 Please note that this does not necessarily enable the workaround, 560 as it depends on the alternative framework, which will only patch 561 the kernel if an affected CPU is detected. 562 563 If unsure, say Y. 564 565config ARM64_ERRATUM_834220 566 bool "Cortex-A57: 834220: Stage 2 translation fault might be incorrectly reported in presence of a Stage 1 fault (rare)" 567 depends on KVM 568 help 569 This option adds an alternative code sequence to work around ARM 570 erratum 834220 on Cortex-A57 parts up to r1p2. 571 572 Affected Cortex-A57 parts might report a Stage 2 translation 573 fault as the result of a Stage 1 fault for load crossing a 574 page boundary when there is a permission or device memory 575 alignment fault at Stage 1 and a translation fault at Stage 2. 576 577 The workaround is to verify that the Stage 1 translation 578 doesn't generate a fault before handling the Stage 2 fault. 579 Please note that this does not necessarily enable the workaround, 580 as it depends on the alternative framework, which will only patch 581 the kernel if an affected CPU is detected. 582 583 If unsure, say N. 584 585config ARM64_ERRATUM_1742098 586 bool "Cortex-A57/A72: 1742098: ELR recorded incorrectly on interrupt taken between cryptographic instructions in a sequence" 587 depends on COMPAT 588 default y 589 help 590 This option removes the AES hwcap for aarch32 user-space to 591 workaround erratum 1742098 on Cortex-A57 and Cortex-A72. 592 593 Affected parts may corrupt the AES state if an interrupt is 594 taken between a pair of AES instructions. These instructions 595 are only present if the cryptography extensions are present. 596 All software should have a fallback implementation for CPUs 597 that don't implement the cryptography extensions. 598 599 If unsure, say Y. 600 601config ARM64_ERRATUM_845719 602 bool "Cortex-A53: 845719: a load might read incorrect data" 603 depends on COMPAT 604 default y 605 help 606 This option adds an alternative code sequence to work around ARM 607 erratum 845719 on Cortex-A53 parts up to r0p4. 608 609 When running a compat (AArch32) userspace on an affected Cortex-A53 610 part, a load at EL0 from a virtual address that matches the bottom 32 611 bits of the virtual address used by a recent load at (AArch64) EL1 612 might return incorrect data. 613 614 The workaround is to write the contextidr_el1 register on exception 615 return to a 32-bit task. 616 Please note that this does not necessarily enable the workaround, 617 as it depends on the alternative framework, which will only patch 618 the kernel if an affected CPU is detected. 619 620 If unsure, say Y. 621 622config ARM64_ERRATUM_843419 623 bool "Cortex-A53: 843419: A load or store might access an incorrect address" 624 default y 625 help 626 This option links the kernel with '--fix-cortex-a53-843419' and 627 enables PLT support to replace certain ADRP instructions, which can 628 cause subsequent memory accesses to use an incorrect address on 629 Cortex-A53 parts up to r0p4. 630 631 If unsure, say Y. 632 633config ARM64_ERRATUM_1024718 634 bool "Cortex-A55: 1024718: Update of DBM/AP bits without break before make might result in incorrect update" 635 default y 636 help 637 This option adds a workaround for ARM Cortex-A55 Erratum 1024718. 638 639 Affected Cortex-A55 cores (all revisions) could cause incorrect 640 update of the hardware dirty bit when the DBM/AP bits are updated 641 without a break-before-make. The workaround is to disable the usage 642 of hardware DBM locally on the affected cores. CPUs not affected by 643 this erratum will continue to use the feature. 644 645 If unsure, say Y. 646 647config ARM64_ERRATUM_1418040 648 bool "Cortex-A76/Neoverse-N1: MRC read following MRRC read of specific Generic Timer in AArch32 might give incorrect result" 649 default y 650 depends on COMPAT 651 help 652 This option adds a workaround for ARM Cortex-A76/Neoverse-N1 653 errata 1188873 and 1418040. 654 655 Affected Cortex-A76/Neoverse-N1 cores (r0p0 to r3p1) could 656 cause register corruption when accessing the timer registers 657 from AArch32 userspace. 658 659 If unsure, say Y. 660 661config ARM64_WORKAROUND_SPECULATIVE_AT 662 bool 663 664config ARM64_ERRATUM_1165522 665 bool "Cortex-A76: 1165522: Speculative AT instruction using out-of-context translation regime could cause subsequent request to generate an incorrect translation" 666 default y 667 select ARM64_WORKAROUND_SPECULATIVE_AT 668 help 669 This option adds a workaround for ARM Cortex-A76 erratum 1165522. 670 671 Affected Cortex-A76 cores (r0p0, r1p0, r2p0) could end-up with 672 corrupted TLBs by speculating an AT instruction during a guest 673 context switch. 674 675 If unsure, say Y. 676 677config ARM64_ERRATUM_1319367 678 bool "Cortex-A57/A72: 1319537: Speculative AT instruction using out-of-context translation regime could cause subsequent request to generate an incorrect translation" 679 default y 680 select ARM64_WORKAROUND_SPECULATIVE_AT 681 help 682 This option adds work arounds for ARM Cortex-A57 erratum 1319537 683 and A72 erratum 1319367 684 685 Cortex-A57 and A72 cores could end-up with corrupted TLBs by 686 speculating an AT instruction during a guest context switch. 687 688 If unsure, say Y. 689 690config ARM64_ERRATUM_1530923 691 bool "Cortex-A55: 1530923: Speculative AT instruction using out-of-context translation regime could cause subsequent request to generate an incorrect translation" 692 default y 693 select ARM64_WORKAROUND_SPECULATIVE_AT 694 help 695 This option adds a workaround for ARM Cortex-A55 erratum 1530923. 696 697 Affected Cortex-A55 cores (r0p0, r0p1, r1p0, r2p0) could end-up with 698 corrupted TLBs by speculating an AT instruction during a guest 699 context switch. 700 701 If unsure, say Y. 702 703config ARM64_WORKAROUND_REPEAT_TLBI 704 bool 705 706config ARM64_ERRATUM_2441007 707 bool "Cortex-A55: Completion of affected memory accesses might not be guaranteed by completion of a TLBI (rare)" 708 select ARM64_WORKAROUND_REPEAT_TLBI 709 help 710 This option adds a workaround for ARM Cortex-A55 erratum #2441007. 711 712 Under very rare circumstances, affected Cortex-A55 CPUs 713 may not handle a race between a break-before-make sequence on one 714 CPU, and another CPU accessing the same page. This could allow a 715 store to a page that has been unmapped. 716 717 Work around this by adding the affected CPUs to the list that needs 718 TLB sequences to be done twice. 719 720 If unsure, say N. 721 722config ARM64_ERRATUM_1286807 723 bool "Cortex-A76: Modification of the translation table for a virtual address might lead to read-after-read ordering violation (rare)" 724 select ARM64_WORKAROUND_REPEAT_TLBI 725 help 726 This option adds a workaround for ARM Cortex-A76 erratum 1286807. 727 728 On the affected Cortex-A76 cores (r0p0 to r3p0), if a virtual 729 address for a cacheable mapping of a location is being 730 accessed by a core while another core is remapping the virtual 731 address to a new physical page using the recommended 732 break-before-make sequence, then under very rare circumstances 733 TLBI+DSB completes before a read using the translation being 734 invalidated has been observed by other observers. The 735 workaround repeats the TLBI+DSB operation. 736 737 If unsure, say N. 738 739config ARM64_ERRATUM_1463225 740 bool "Cortex-A76: Software Step might prevent interrupt recognition" 741 default y 742 help 743 This option adds a workaround for Arm Cortex-A76 erratum 1463225. 744 745 On the affected Cortex-A76 cores (r0p0 to r3p1), software stepping 746 of a system call instruction (SVC) can prevent recognition of 747 subsequent interrupts when software stepping is disabled in the 748 exception handler of the system call and either kernel debugging 749 is enabled or VHE is in use. 750 751 Work around the erratum by triggering a dummy step exception 752 when handling a system call from a task that is being stepped 753 in a VHE configuration of the kernel. 754 755 If unsure, say Y. 756 757config ARM64_ERRATUM_1542419 758 bool "Neoverse-N1: workaround mis-ordering of instruction fetches (rare)" 759 help 760 This option adds a workaround for ARM Neoverse-N1 erratum 761 1542419. 762 763 Affected Neoverse-N1 cores could execute a stale instruction when 764 modified by another CPU. The workaround depends on a firmware 765 counterpart. 766 767 Workaround the issue by hiding the DIC feature from EL0. This 768 forces user-space to perform cache maintenance. 769 770 If unsure, say N. 771 772config ARM64_ERRATUM_1508412 773 bool "Cortex-A77: 1508412: workaround deadlock on sequence of NC/Device load and store exclusive or PAR read" 774 default y 775 help 776 This option adds a workaround for Arm Cortex-A77 erratum 1508412. 777 778 Affected Cortex-A77 cores (r0p0, r1p0) could deadlock on a sequence 779 of a store-exclusive or read of PAR_EL1 and a load with device or 780 non-cacheable memory attributes. The workaround depends on a firmware 781 counterpart. 782 783 KVM guests must also have the workaround implemented or they can 784 deadlock the system. 785 786 Work around the issue by inserting DMB SY barriers around PAR_EL1 787 register reads and warning KVM users. The DMB barrier is sufficient 788 to prevent a speculative PAR_EL1 read. 789 790 If unsure, say Y. 791 792config ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE 793 bool 794 795config ARM64_ERRATUM_2051678 796 bool "Cortex-A510: 2051678: disable Hardware Update of the page table dirty bit" 797 default y 798 help 799 This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678. 800 Affected Cortex-A510 might not respect the ordering rules for 801 hardware update of the page table's dirty bit. The workaround 802 is to not enable the feature on affected CPUs. 803 804 If unsure, say Y. 805 806config ARM64_ERRATUM_2077057 807 bool "Cortex-A510: 2077057: workaround software-step corrupting SPSR_EL2" 808 default y 809 help 810 This option adds the workaround for ARM Cortex-A510 erratum 2077057. 811 Affected Cortex-A510 may corrupt SPSR_EL2 when the a step exception is 812 expected, but a Pointer Authentication trap is taken instead. The 813 erratum causes SPSR_EL1 to be copied to SPSR_EL2, which could allow 814 EL1 to cause a return to EL2 with a guest controlled ELR_EL2. 815 816 This can only happen when EL2 is stepping EL1. 817 818 When these conditions occur, the SPSR_EL2 value is unchanged from the 819 previous guest entry, and can be restored from the in-memory copy. 820 821 If unsure, say Y. 822 823config ARM64_ERRATUM_2658417 824 bool "Cortex-A510: 2658417: remove BF16 support due to incorrect result" 825 default y 826 help 827 This option adds the workaround for ARM Cortex-A510 erratum 2658417. 828 Affected Cortex-A510 (r0p0 to r1p1) may produce the wrong result for 829 BFMMLA or VMMLA instructions in rare circumstances when a pair of 830 A510 CPUs are using shared neon hardware. As the sharing is not 831 discoverable by the kernel, hide the BF16 HWCAP to indicate that 832 user-space should not be using these instructions. 833 834 If unsure, say Y. 835 836config ARM64_ERRATUM_2119858 837 bool "Cortex-A710/X2: 2119858: workaround TRBE overwriting trace data in FILL mode" 838 default y 839 depends on CORESIGHT_TRBE 840 select ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE 841 help 842 This option adds the workaround for ARM Cortex-A710/X2 erratum 2119858. 843 844 Affected Cortex-A710/X2 cores could overwrite up to 3 cache lines of trace 845 data at the base of the buffer (pointed to by TRBASER_EL1) in FILL mode in 846 the event of a WRAP event. 847 848 Work around the issue by always making sure we move the TRBPTR_EL1 by 849 256 bytes before enabling the buffer and filling the first 256 bytes of 850 the buffer with ETM ignore packets upon disabling. 851 852 If unsure, say Y. 853 854config ARM64_ERRATUM_2139208 855 bool "Neoverse-N2: 2139208: workaround TRBE overwriting trace data in FILL mode" 856 default y 857 depends on CORESIGHT_TRBE 858 select ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE 859 help 860 This option adds the workaround for ARM Neoverse-N2 erratum 2139208. 861 862 Affected Neoverse-N2 cores could overwrite up to 3 cache lines of trace 863 data at the base of the buffer (pointed to by TRBASER_EL1) in FILL mode in 864 the event of a WRAP event. 865 866 Work around the issue by always making sure we move the TRBPTR_EL1 by 867 256 bytes before enabling the buffer and filling the first 256 bytes of 868 the buffer with ETM ignore packets upon disabling. 869 870 If unsure, say Y. 871 872config ARM64_WORKAROUND_TSB_FLUSH_FAILURE 873 bool 874 875config ARM64_ERRATUM_2054223 876 bool "Cortex-A710: 2054223: workaround TSB instruction failing to flush trace" 877 default y 878 select ARM64_WORKAROUND_TSB_FLUSH_FAILURE 879 help 880 Enable workaround for ARM Cortex-A710 erratum 2054223 881 882 Affected cores may fail to flush the trace data on a TSB instruction, when 883 the PE is in trace prohibited state. This will cause losing a few bytes 884 of the trace cached. 885 886 Workaround is to issue two TSB consecutively on affected cores. 887 888 If unsure, say Y. 889 890config ARM64_ERRATUM_2067961 891 bool "Neoverse-N2: 2067961: workaround TSB instruction failing to flush trace" 892 default y 893 select ARM64_WORKAROUND_TSB_FLUSH_FAILURE 894 help 895 Enable workaround for ARM Neoverse-N2 erratum 2067961 896 897 Affected cores may fail to flush the trace data on a TSB instruction, when 898 the PE is in trace prohibited state. This will cause losing a few bytes 899 of the trace cached. 900 901 Workaround is to issue two TSB consecutively on affected cores. 902 903 If unsure, say Y. 904 905config ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE 906 bool 907 908config ARM64_ERRATUM_2253138 909 bool "Neoverse-N2: 2253138: workaround TRBE writing to address out-of-range" 910 depends on CORESIGHT_TRBE 911 default y 912 select ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE 913 help 914 This option adds the workaround for ARM Neoverse-N2 erratum 2253138. 915 916 Affected Neoverse-N2 cores might write to an out-of-range address, not reserved 917 for TRBE. Under some conditions, the TRBE might generate a write to the next 918 virtually addressed page following the last page of the TRBE address space 919 (i.e., the TRBLIMITR_EL1.LIMIT), instead of wrapping around to the base. 920 921 Work around this in the driver by always making sure that there is a 922 page beyond the TRBLIMITR_EL1.LIMIT, within the space allowed for the TRBE. 923 924 If unsure, say Y. 925 926config ARM64_ERRATUM_2224489 927 bool "Cortex-A710/X2: 2224489: workaround TRBE writing to address out-of-range" 928 depends on CORESIGHT_TRBE 929 default y 930 select ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE 931 help 932 This option adds the workaround for ARM Cortex-A710/X2 erratum 2224489. 933 934 Affected Cortex-A710/X2 cores might write to an out-of-range address, not reserved 935 for TRBE. Under some conditions, the TRBE might generate a write to the next 936 virtually addressed page following the last page of the TRBE address space 937 (i.e., the TRBLIMITR_EL1.LIMIT), instead of wrapping around to the base. 938 939 Work around this in the driver by always making sure that there is a 940 page beyond the TRBLIMITR_EL1.LIMIT, within the space allowed for the TRBE. 941 942 If unsure, say Y. 943 944config ARM64_ERRATUM_2441009 945 bool "Cortex-A510: Completion of affected memory accesses might not be guaranteed by completion of a TLBI (rare)" 946 select ARM64_WORKAROUND_REPEAT_TLBI 947 help 948 This option adds a workaround for ARM Cortex-A510 erratum #2441009. 949 950 Under very rare circumstances, affected Cortex-A510 CPUs 951 may not handle a race between a break-before-make sequence on one 952 CPU, and another CPU accessing the same page. This could allow a 953 store to a page that has been unmapped. 954 955 Work around this by adding the affected CPUs to the list that needs 956 TLB sequences to be done twice. 957 958 If unsure, say N. 959 960config ARM64_ERRATUM_2064142 961 bool "Cortex-A510: 2064142: workaround TRBE register writes while disabled" 962 depends on CORESIGHT_TRBE 963 default y 964 help 965 This option adds the workaround for ARM Cortex-A510 erratum 2064142. 966 967 Affected Cortex-A510 core might fail to write into system registers after the 968 TRBE has been disabled. Under some conditions after the TRBE has been disabled 969 writes into TRBE registers TRBLIMITR_EL1, TRBPTR_EL1, TRBBASER_EL1, TRBSR_EL1, 970 and TRBTRG_EL1 will be ignored and will not be effected. 971 972 Work around this in the driver by executing TSB CSYNC and DSB after collection 973 is stopped and before performing a system register write to one of the affected 974 registers. 975 976 If unsure, say Y. 977 978config ARM64_ERRATUM_2038923 979 bool "Cortex-A510: 2038923: workaround TRBE corruption with enable" 980 depends on CORESIGHT_TRBE 981 default y 982 help 983 This option adds the workaround for ARM Cortex-A510 erratum 2038923. 984 985 Affected Cortex-A510 core might cause an inconsistent view on whether trace is 986 prohibited within the CPU. As a result, the trace buffer or trace buffer state 987 might be corrupted. This happens after TRBE buffer has been enabled by setting 988 TRBLIMITR_EL1.E, followed by just a single context synchronization event before 989 execution changes from a context, in which trace is prohibited to one where it 990 isn't, or vice versa. In these mentioned conditions, the view of whether trace 991 is prohibited is inconsistent between parts of the CPU, and the trace buffer or 992 the trace buffer state might be corrupted. 993 994 Work around this in the driver by preventing an inconsistent view of whether the 995 trace is prohibited or not based on TRBLIMITR_EL1.E by immediately following a 996 change to TRBLIMITR_EL1.E with at least one ISB instruction before an ERET, or 997 two ISB instructions if no ERET is to take place. 998 999 If unsure, say Y. 1000 1001config ARM64_ERRATUM_1902691 1002 bool "Cortex-A510: 1902691: workaround TRBE trace corruption" 1003 depends on CORESIGHT_TRBE 1004 default y 1005 help 1006 This option adds the workaround for ARM Cortex-A510 erratum 1902691. 1007 1008 Affected Cortex-A510 core might cause trace data corruption, when being written 1009 into the memory. Effectively TRBE is broken and hence cannot be used to capture 1010 trace data. 1011 1012 Work around this problem in the driver by just preventing TRBE initialization on 1013 affected cpus. The firmware must have disabled the access to TRBE for the kernel 1014 on such implementations. This will cover the kernel for any firmware that doesn't 1015 do this already. 1016 1017 If unsure, say Y. 1018 1019config ARM64_ERRATUM_2457168 1020 bool "Cortex-A510: 2457168: workaround for AMEVCNTR01 incrementing incorrectly" 1021 depends on ARM64_AMU_EXTN 1022 default y 1023 help 1024 This option adds the workaround for ARM Cortex-A510 erratum 2457168. 1025 1026 The AMU counter AMEVCNTR01 (constant counter) should increment at the same rate 1027 as the system counter. On affected Cortex-A510 cores AMEVCNTR01 increments 1028 incorrectly giving a significantly higher output value. 1029 1030 Work around this problem by returning 0 when reading the affected counter in 1031 key locations that results in disabling all users of this counter. This effect 1032 is the same to firmware disabling affected counters. 1033 1034 If unsure, say Y. 1035 1036config ARM64_ERRATUM_2645198 1037 bool "Cortex-A715: 2645198: Workaround possible [ESR|FAR]_ELx corruption" 1038 default y 1039 help 1040 This option adds the workaround for ARM Cortex-A715 erratum 2645198. 1041 1042 If a Cortex-A715 cpu sees a page mapping permissions change from executable 1043 to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers on the 1044 next instruction abort caused by permission fault. 1045 1046 Only user-space does executable to non-executable permission transition via 1047 mprotect() system call. Workaround the problem by doing a break-before-make 1048 TLB invalidation, for all changes to executable user space mappings. 1049 1050 If unsure, say Y. 1051 1052config ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD 1053 bool 1054 1055config ARM64_ERRATUM_2966298 1056 bool "Cortex-A520: 2966298: workaround for speculatively executed unprivileged load" 1057 select ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD 1058 default y 1059 help 1060 This option adds the workaround for ARM Cortex-A520 erratum 2966298. 1061 1062 On an affected Cortex-A520 core, a speculatively executed unprivileged 1063 load might leak data from a privileged level via a cache side channel. 1064 1065 Work around this problem by executing a TLBI before returning to EL0. 1066 1067 If unsure, say Y. 1068 1069config ARM64_ERRATUM_3117295 1070 bool "Cortex-A510: 3117295: workaround for speculatively executed unprivileged load" 1071 select ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD 1072 default y 1073 help 1074 This option adds the workaround for ARM Cortex-A510 erratum 3117295. 1075 1076 On an affected Cortex-A510 core, a speculatively executed unprivileged 1077 load might leak data from a privileged level via a cache side channel. 1078 1079 Work around this problem by executing a TLBI before returning to EL0. 1080 1081 If unsure, say Y. 1082 1083config ARM64_ERRATUM_3194386 1084 bool "Cortex-*/Neoverse-*: workaround for MSR SSBS not self-synchronizing" 1085 default y 1086 help 1087 This option adds the workaround for the following errata: 1088 1089 * ARM Cortex-A76 erratum 3324349 1090 * ARM Cortex-A77 erratum 3324348 1091 * ARM Cortex-A78 erratum 3324344 1092 * ARM Cortex-A78C erratum 3324346 1093 * ARM Cortex-A78C erratum 3324347 1094 * ARM Cortex-A710 erratam 3324338 1095 * ARM Cortex-A715 errartum 3456084 1096 * ARM Cortex-A720 erratum 3456091 1097 * ARM Cortex-A725 erratum 3456106 1098 * ARM Cortex-X1 erratum 3324344 1099 * ARM Cortex-X1C erratum 3324346 1100 * ARM Cortex-X2 erratum 3324338 1101 * ARM Cortex-X3 erratum 3324335 1102 * ARM Cortex-X4 erratum 3194386 1103 * ARM Cortex-X925 erratum 3324334 1104 * ARM Neoverse-N1 erratum 3324349 1105 * ARM Neoverse N2 erratum 3324339 1106 * ARM Neoverse-N3 erratum 3456111 1107 * ARM Neoverse-V1 erratum 3324341 1108 * ARM Neoverse V2 erratum 3324336 1109 * ARM Neoverse-V3 erratum 3312417 1110 * ARM Neoverse-V3AE erratum 3312417 1111 1112 On affected cores "MSR SSBS, #0" instructions may not affect 1113 subsequent speculative instructions, which may permit unexepected 1114 speculative store bypassing. 1115 1116 Work around this problem by placing a Speculation Barrier (SB) or 1117 Instruction Synchronization Barrier (ISB) after kernel changes to 1118 SSBS. The presence of the SSBS special-purpose register is hidden 1119 from hwcaps and EL0 reads of ID_AA64PFR1_EL1, such that userspace 1120 will use the PR_SPEC_STORE_BYPASS prctl to change SSBS. 1121 1122 If unsure, say Y. 1123 1124config ARM64_ERRATUM_4311569 1125 bool "SI L1: 4311569: workaround for premature CMO completion erratum" 1126 default y 1127 help 1128 This option adds the workaround for ARM SI L1 erratum 4311569. 1129 1130 The erratum of SI L1 can cause an early response to a combined write 1131 and cache maintenance operation (WR+CMO) before the operation is fully 1132 completed to the Point of Serialization (POS). 1133 This can result in a non-I/O coherent agent observing stale data, 1134 potentially leading to system instability or incorrect behavior. 1135 1136 Enabling this option implements a software workaround by inserting a 1137 second loop of Cache Maintenance Operation (CMO) immediately following the 1138 end of function to do CMOs. This ensures that the data is correctly serialized 1139 before the buffer is handed off to a non-coherent agent. 1140 1141 If unsure, say Y. 1142 1143config ARM64_ERRATUM_4193714 1144 bool "C1-Pro: 4193714: SME DVMSync early acknowledgement" 1145 depends on ARM64_SME 1146 default y 1147 help 1148 Enable workaround for C1-Pro acknowledging the DVMSync before 1149 the SME memory accesses are complete. This will cause TLB 1150 maintenance for processes using SME to also issue an IPI to 1151 the affected CPUs. 1152 1153 If unsure, say Y. 1154 1155config ARM64_ERRATUM_4118414 1156 bool "Various: Completion of affected memory accesses might not be guaranteed by completion of a TLBI" 1157 default y 1158 select ARM64_WORKAROUND_REPEAT_TLBI 1159 help 1160 This option adds a workaround for the following errata: 1161 1162 * ARM C1-Premium erratum 4193780 1163 * ARM C1-Ultra erratum 4193780 1164 * ARM Cortex-A76 erratum 4193800 1165 * ARM Cortex-A76AE erratum 4193801 1166 * ARM Cortex-A77 erratum 4193798 1167 * ARM Cortex-A78 erratum 4193791 1168 * ARM Cortex-A78AE erratum 4193793 1169 * ARM Cortex-A78C erratum 4193794 1170 * ARM Cortex-A710 erratum 4193788 1171 * ARM Cortex-X1 erratum 4193791 1172 * ARM Cortex-X1C erratum 4193792 1173 * ARM Cortex-X2 erratum 4193788 1174 * ARM Cortex-X3 erratum 4193786 1175 * ARM Cortex-X4 erratum 4118414 1176 * ARM Cortex-X925 erratum 4193781 1177 * ARM Neoverse-N1 erratum 4193800 1178 * ARM Neoverse-N2 erratum 4193789 1179 * ARM Neoverse-V1 erratum 4193790 1180 * ARM Neoverse-V2 erratum 4193787 1181 * ARM Neoverse-V3 erratum 4193784 1182 * ARM Neoverse-V3AE erratum 4193784 1183 * Microsoft Azure Cobalt 100 4193789 1184 * NVIDIA Olympus erratum T410-OLY-1029 1185 1186 On affected cores, some memory accesses might not be completed by 1187 broadcast TLB invalidation. 1188 1189 This issue is also known as CVE-2025-10263. 1190 1191 If unsure, say Y. 1192 1193config CAVIUM_ERRATUM_22375 1194 bool "Cavium erratum 22375, 24313" 1195 default y 1196 help 1197 Enable workaround for errata 22375 and 24313. 1198 1199 This implements two gicv3-its errata workarounds for ThunderX. Both 1200 with a small impact affecting only ITS table allocation. 1201 1202 erratum 22375: only alloc 8MB table size 1203 erratum 24313: ignore memory access type 1204 1205 The fixes are in ITS initialization and basically ignore memory access 1206 type and table size provided by the TYPER and BASER registers. 1207 1208 If unsure, say Y. 1209 1210config CAVIUM_ERRATUM_23144 1211 bool "Cavium erratum 23144: ITS SYNC hang on dual socket system" 1212 depends on NUMA 1213 default y 1214 help 1215 ITS SYNC command hang for cross node io and collections/cpu mapping. 1216 1217 If unsure, say Y. 1218 1219config CAVIUM_ERRATUM_23154 1220 bool "Cavium errata 23154 and 38545: GICv3 lacks HW synchronisation" 1221 default y 1222 help 1223 The ThunderX GICv3 implementation requires a modified version for 1224 reading the IAR status to ensure data synchronization 1225 (access to icc_iar1_el1 is not sync'ed before and after). 1226 1227 It also suffers from erratum 38545 (also present on Marvell's 1228 OcteonTX and OcteonTX2), resulting in deactivated interrupts being 1229 spuriously presented to the CPU interface. 1230 1231 If unsure, say Y. 1232 1233config CAVIUM_ERRATUM_27456 1234 bool "Cavium erratum 27456: Broadcast TLBI instructions may cause icache corruption" 1235 default y 1236 help 1237 On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI 1238 instructions may cause the icache to become corrupted if it 1239 contains data for a non-current ASID. The fix is to 1240 invalidate the icache when changing the mm context. 1241 1242 If unsure, say Y. 1243 1244config CAVIUM_ERRATUM_30115 1245 bool "Cavium erratum 30115: Guest may disable interrupts in host" 1246 default y 1247 help 1248 On ThunderX T88 pass 1.x through 2.2, T81 pass 1.0 through 1249 1.2, and T83 Pass 1.0, KVM guest execution may disable 1250 interrupts in host. Trapping both GICv3 group-0 and group-1 1251 accesses sidesteps the issue. 1252 1253 If unsure, say Y. 1254 1255config CAVIUM_TX2_ERRATUM_219 1256 bool "Cavium ThunderX2 erratum 219: PRFM between TTBR change and ISB fails" 1257 default y 1258 help 1259 On Cavium ThunderX2, a load, store or prefetch instruction between a 1260 TTBR update and the corresponding context synchronizing operation can 1261 cause a spurious Data Abort to be delivered to any hardware thread in 1262 the CPU core. 1263 1264 Work around the issue by avoiding the problematic code sequence and 1265 trapping KVM guest TTBRx_EL1 writes to EL2 when SMT is enabled. The 1266 trap handler performs the corresponding register access, skips the 1267 instruction and ensures context synchronization by virtue of the 1268 exception return. 1269 1270 If unsure, say Y. 1271 1272config FUJITSU_ERRATUM_010001 1273 bool "Fujitsu-A64FX erratum E#010001: Undefined fault may occur wrongly" 1274 default y 1275 help 1276 This option adds a workaround for Fujitsu-A64FX erratum E#010001. 1277 On some variants of the Fujitsu-A64FX cores ver(1.0, 1.1), memory 1278 accesses may cause undefined fault (Data abort, DFSC=0b111111). 1279 This fault occurs under a specific hardware condition when a 1280 load/store instruction performs an address translation using: 1281 case-1 TTBR0_EL1 with TCR_EL1.NFD0 == 1. 1282 case-2 TTBR0_EL2 with TCR_EL2.NFD0 == 1. 1283 case-3 TTBR1_EL1 with TCR_EL1.NFD1 == 1. 1284 case-4 TTBR1_EL2 with TCR_EL2.NFD1 == 1. 1285 1286 The workaround is to ensure these bits are clear in TCR_ELx. 1287 The workaround only affects the Fujitsu-A64FX. 1288 1289 If unsure, say Y. 1290 1291config HISILICON_ERRATUM_161600802 1292 bool "Hip07 161600802: Erroneous redistributor VLPI base" 1293 default y 1294 help 1295 The HiSilicon Hip07 SoC uses the wrong redistributor base 1296 when issued ITS commands such as VMOVP and VMAPP, and requires 1297 a 128kB offset to be applied to the target address in this commands. 1298 1299 If unsure, say Y. 1300 1301config HISILICON_ERRATUM_162100801 1302 bool "Hip09 162100801 erratum support" 1303 default y 1304 help 1305 When enabling GICv4.1 in hip09, VMAPP will fail to clear some caches 1306 during unmapping operation, which will cause some vSGIs lost. 1307 To fix the issue, invalidate related vPE cache through GICR_INVALLR 1308 after VMOVP. 1309 1310 If unsure, say Y. 1311 1312config HISILICON_ERRATUM_162100125 1313 bool "Hisilicon erratum 162100125" 1314 default y 1315 select ARM64_WORKAROUND_DISABLE_CNP 1316 help 1317 On HiSilicon HIP09, TLB entry matching behavior when CNP 1318 (TTBRx.CNP=1) is enabled differs from the ARM architecture 1319 specification. 1320 1321 TLB entries may be incorrectly shared between CPUs, potentially 1322 causing TLB conflicts and stale mappings. 1323 1324 Disable CNP support for affected HiSilicon HIP09 cores. 1325 1326 If unsure, say Y. 1327 1328config QCOM_FALKOR_ERRATUM_1003 1329 bool "Falkor E1003: Incorrect translation due to ASID change" 1330 default y 1331 help 1332 On Falkor v1, an incorrect ASID may be cached in the TLB when ASID 1333 and BADDR are changed together in TTBRx_EL1. Since we keep the ASID 1334 in TTBR1_EL1, this situation only occurs in the entry trampoline and 1335 then only for entries in the walk cache, since the leaf translation 1336 is unchanged. Work around the erratum by invalidating the walk cache 1337 entries for the trampoline before entering the kernel proper. 1338 1339config QCOM_FALKOR_ERRATUM_1009 1340 bool "Falkor E1009: Prematurely complete a DSB after a TLBI" 1341 default y 1342 select ARM64_WORKAROUND_REPEAT_TLBI 1343 help 1344 On Falkor v1, the CPU may prematurely complete a DSB following a 1345 TLBI xxIS invalidate maintenance operation. Repeat the TLBI operation 1346 one more time to fix the issue. 1347 1348 If unsure, say Y. 1349 1350config QCOM_QDF2400_ERRATUM_0065 1351 bool "QDF2400 E0065: Incorrect GITS_TYPER.ITT_Entry_size" 1352 default y 1353 help 1354 On Qualcomm Datacenter Technologies QDF2400 SoC, ITS hardware reports 1355 ITE size incorrectly. The GITS_TYPER.ITT_Entry_size field should have 1356 been indicated as 16Bytes (0xf), not 8Bytes (0x7). 1357 1358 If unsure, say Y. 1359 1360config QCOM_FALKOR_ERRATUM_E1041 1361 bool "Falkor E1041: Speculative instruction fetches might cause errant memory access" 1362 default y 1363 help 1364 Falkor CPU may speculatively fetch instructions from an improper 1365 memory location when MMU translation is changed from SCTLR_ELn[M]=1 1366 to SCTLR_ELn[M]=0. Prefix an ISB instruction to fix the problem. 1367 1368 If unsure, say Y. 1369 1370config ARM64_WORKAROUND_DISABLE_CNP 1371 bool 1372 1373config NVIDIA_CARMEL_CNP_ERRATUM 1374 bool "NVIDIA Carmel CNP: CNP on Carmel semantically different than ARM cores" 1375 default y 1376 select ARM64_WORKAROUND_DISABLE_CNP 1377 help 1378 If CNP is enabled on Carmel cores, non-sharable TLBIs on a core will not 1379 invalidate shared TLB entries installed by a different core, as it would 1380 on standard ARM cores. 1381 1382 If unsure, say Y. 1383 1384config ROCKCHIP_ERRATUM_3568002 1385 bool "Rockchip 3568002: GIC600 can not access physical addresses higher than 4GB" 1386 default y 1387 help 1388 The Rockchip RK3566 and RK3568 GIC600 SoC integrations have AXI 1389 addressing limited to the first 32bit of physical address space. 1390 1391 If unsure, say Y. 1392 1393config ROCKCHIP_ERRATUM_3588001 1394 bool "Rockchip 3588001: GIC600 can not support shareability attributes" 1395 default y 1396 help 1397 The Rockchip RK3588 GIC600 SoC integration does not support ACE/ACE-lite. 1398 This means, that its sharability feature may not be used, even though it 1399 is supported by the IP itself. 1400 1401 If unsure, say Y. 1402 1403config SOCIONEXT_SYNQUACER_PREITS 1404 bool "Socionext Synquacer: Workaround for GICv3 pre-ITS" 1405 default y 1406 help 1407 Socionext Synquacer SoCs implement a separate h/w block to generate 1408 MSI doorbell writes with non-zero values for the device ID. 1409 1410 If unsure, say Y. 1411 1412endmenu # "ARM errata workarounds via the alternatives framework" 1413 1414choice 1415 prompt "Page size" 1416 default ARM64_4K_PAGES 1417 help 1418 Page size (translation granule) configuration. 1419 1420config ARM64_4K_PAGES 1421 bool "4KB" 1422 select HAVE_PAGE_SIZE_4KB 1423 help 1424 This feature enables 4KB pages support. 1425 1426config ARM64_16K_PAGES 1427 bool "16KB" 1428 select HAVE_PAGE_SIZE_16KB 1429 help 1430 The system will use 16KB pages support. AArch32 emulation 1431 requires applications compiled with 16K (or a multiple of 16K) 1432 aligned segments. 1433 1434config ARM64_64K_PAGES 1435 bool "64KB" 1436 select HAVE_PAGE_SIZE_64KB 1437 help 1438 This feature enables 64KB pages support (4KB by default) 1439 allowing only two levels of page tables and faster TLB 1440 look-up. AArch32 emulation requires applications compiled 1441 with 64K aligned segments. 1442 1443endchoice 1444 1445choice 1446 prompt "Virtual address space size" 1447 default ARM64_VA_BITS_52 1448 help 1449 Allows choosing one of multiple possible virtual address 1450 space sizes. The level of translation table is determined by 1451 a combination of page size and virtual address space size. 1452 1453config ARM64_VA_BITS_36 1454 bool "36-bit" if EXPERT 1455 depends on PAGE_SIZE_16KB 1456 1457config ARM64_VA_BITS_39 1458 bool "39-bit" 1459 depends on PAGE_SIZE_4KB 1460 1461config ARM64_VA_BITS_42 1462 bool "42-bit" 1463 depends on PAGE_SIZE_64KB 1464 1465config ARM64_VA_BITS_47 1466 bool "47-bit" 1467 depends on PAGE_SIZE_16KB 1468 1469config ARM64_VA_BITS_48 1470 bool "48-bit" 1471 1472config ARM64_VA_BITS_52 1473 bool "52-bit" 1474 help 1475 Enable 52-bit virtual addressing for userspace when explicitly 1476 requested via a hint to mmap(). The kernel will also use 52-bit 1477 virtual addresses for its own mappings (provided HW support for 1478 this feature is available, otherwise it reverts to 48-bit). 1479 1480 NOTE: Enabling 52-bit virtual addressing in conjunction with 1481 ARMv8.3 Pointer Authentication will result in the PAC being 1482 reduced from 7 bits to 3 bits, which may have a significant 1483 impact on its susceptibility to brute-force attacks. 1484 1485 If unsure, select 48-bit virtual addressing instead. 1486 1487endchoice 1488 1489config ARM64_FORCE_52BIT 1490 bool "Force 52-bit virtual addresses for userspace" 1491 depends on ARM64_VA_BITS_52 && EXPERT 1492 help 1493 For systems with 52-bit userspace VAs enabled, the kernel will attempt 1494 to maintain compatibility with older software by providing 48-bit VAs 1495 unless a hint is supplied to mmap. 1496 1497 This configuration option disables the 48-bit compatibility logic, and 1498 forces all userspace addresses to be 52-bit on HW that supports it. One 1499 should only enable this configuration option for stress testing userspace 1500 memory management code. If unsure say N here. 1501 1502config ARM64_VA_BITS 1503 int 1504 default 36 if ARM64_VA_BITS_36 1505 default 39 if ARM64_VA_BITS_39 1506 default 42 if ARM64_VA_BITS_42 1507 default 47 if ARM64_VA_BITS_47 1508 default 48 if ARM64_VA_BITS_48 1509 default 52 if ARM64_VA_BITS_52 1510 1511choice 1512 prompt "Physical address space size" 1513 default ARM64_PA_BITS_48 1514 help 1515 Choose the maximum physical address range that the kernel will 1516 support. 1517 1518config ARM64_PA_BITS_48 1519 bool "48-bit" 1520 depends on ARM64_64K_PAGES || !ARM64_VA_BITS_52 1521 1522config ARM64_PA_BITS_52 1523 bool "52-bit" 1524 depends on ARM64_64K_PAGES || ARM64_VA_BITS_52 1525 help 1526 Enable support for a 52-bit physical address space, introduced as 1527 part of the ARMv8.2-LPA extension. 1528 1529 With this enabled, the kernel will also continue to work on CPUs that 1530 do not support ARMv8.2-LPA, but with some added memory overhead (and 1531 minor performance overhead). 1532 1533endchoice 1534 1535config ARM64_PA_BITS 1536 int 1537 default 48 if ARM64_PA_BITS_48 1538 default 52 if ARM64_PA_BITS_52 1539 1540config ARM64_LPA2 1541 def_bool y 1542 depends on ARM64_PA_BITS_52 && !ARM64_64K_PAGES 1543 1544choice 1545 prompt "Endianness" 1546 default CPU_LITTLE_ENDIAN 1547 help 1548 Select the endianness of data accesses performed by the CPU. Userspace 1549 applications will need to be compiled and linked for the endianness 1550 that is selected here. 1551 1552config CPU_BIG_ENDIAN 1553 bool "Build big-endian kernel" 1554 depends on BROKEN 1555 help 1556 Say Y if you plan on running a kernel with a big-endian userspace. 1557 1558config CPU_LITTLE_ENDIAN 1559 bool "Build little-endian kernel" 1560 help 1561 Say Y if you plan on running a kernel with a little-endian userspace. 1562 This is usually the case for distributions targeting arm64. 1563 1564endchoice 1565 1566config NR_CPUS 1567 int "Maximum number of CPUs (2-4096)" 1568 range 2 4096 1569 default "512" 1570 1571config HOTPLUG_CPU 1572 bool "Support for hot-pluggable CPUs" 1573 select GENERIC_IRQ_MIGRATION 1574 help 1575 Say Y here to experiment with turning CPUs off and on. CPUs 1576 can be controlled through /sys/devices/system/cpu. 1577 1578# Common NUMA Features 1579config NUMA 1580 bool "NUMA Memory Allocation and Scheduler Support" 1581 select GENERIC_ARCH_NUMA 1582 select OF_NUMA 1583 select HAVE_SETUP_PER_CPU_AREA 1584 select NEED_PER_CPU_EMBED_FIRST_CHUNK 1585 select NEED_PER_CPU_PAGE_FIRST_CHUNK 1586 select USE_PERCPU_NUMA_NODE_ID 1587 help 1588 Enable NUMA (Non-Uniform Memory Access) support. 1589 1590 The kernel will try to allocate memory used by a CPU on the 1591 local memory of the CPU and add some more 1592 NUMA awareness to the kernel. 1593 1594config NODES_SHIFT 1595 int "Maximum NUMA Nodes (as a power of 2)" 1596 range 1 10 1597 default "4" 1598 depends on NUMA 1599 help 1600 Specify the maximum number of NUMA Nodes available on the target 1601 system. Increases memory reserved to accommodate various tables. 1602 1603source "kernel/Kconfig.hz" 1604 1605config ARCH_SPARSEMEM_ENABLE 1606 def_bool y 1607 select SPARSEMEM_VMEMMAP_ENABLE 1608 1609config HW_PERF_EVENTS 1610 def_bool y 1611 depends on ARM_PMU 1612 1613# Supported by clang >= 7.0 or GCC >= 12.0.0 1614config CC_HAVE_SHADOW_CALL_STACK 1615 def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18) 1616 1617config PARAVIRT 1618 bool "Enable paravirtualization code" 1619 select HAVE_PV_STEAL_CLOCK_GEN 1620 help 1621 This changes the kernel so it can modify itself when it is run 1622 under a hypervisor, potentially improving performance significantly 1623 over full virtualization. 1624 1625config PARAVIRT_TIME_ACCOUNTING 1626 bool "Paravirtual steal time accounting" 1627 select PARAVIRT 1628 help 1629 Select this option to enable fine granularity task steal time 1630 accounting. Time spent executing other tasks in parallel with 1631 the current vCPU is discounted from the vCPU power. To account for 1632 that, there can be a small performance impact. 1633 1634 If in doubt, say N here. 1635 1636config ARCH_SUPPORTS_KEXEC 1637 def_bool PM_SLEEP_SMP 1638 1639config ARCH_SUPPORTS_KEXEC_FILE 1640 def_bool y 1641 1642config ARCH_SELECTS_KEXEC_FILE 1643 def_bool y 1644 depends on KEXEC_FILE 1645 select HAVE_IMA_KEXEC if IMA 1646 1647config ARCH_SUPPORTS_KEXEC_SIG 1648 def_bool y 1649 1650config ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG 1651 def_bool y 1652 1653config ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG 1654 def_bool y 1655 1656config ARCH_SUPPORTS_KEXEC_HANDOVER 1657 def_bool y 1658 1659config ARCH_SUPPORTS_CRASH_DUMP 1660 def_bool y 1661 1662config ARCH_DEFAULT_CRASH_DUMP 1663 def_bool y 1664 1665config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION 1666 def_bool CRASH_RESERVE 1667 1668config TRANS_TABLE 1669 def_bool y 1670 depends on HIBERNATION || KEXEC_CORE 1671 1672config XEN_DOM0 1673 def_bool y 1674 depends on XEN 1675 1676config XEN 1677 bool "Xen guest support on ARM64" 1678 depends on ARM64 && OF 1679 select SWIOTLB_XEN 1680 select PARAVIRT 1681 help 1682 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64. 1683 1684# include/linux/mmzone.h requires the following to be true: 1685# 1686# MAX_PAGE_ORDER + PAGE_SHIFT <= SECTION_SIZE_BITS 1687# 1688# so the maximum value of MAX_PAGE_ORDER is SECTION_SIZE_BITS - PAGE_SHIFT: 1689# 1690# | SECTION_SIZE_BITS | PAGE_SHIFT | max MAX_PAGE_ORDER | default MAX_PAGE_ORDER | 1691# ----+-------------------+--------------+----------------------+-------------------------+ 1692# 4K | 27 | 12 | 15 | 10 | 1693# 16K | 27 | 14 | 13 | 11 | 1694# 64K | 29 | 16 | 13 | 13 | 1695config ARCH_FORCE_MAX_ORDER 1696 int 1697 default "13" if ARM64_64K_PAGES 1698 default "11" if ARM64_16K_PAGES 1699 default "10" 1700 help 1701 The kernel page allocator limits the size of maximal physically 1702 contiguous allocations. The limit is called MAX_PAGE_ORDER and it 1703 defines the maximal power of two of number of pages that can be 1704 allocated as a single contiguous block. This option allows 1705 overriding the default setting when ability to allocate very 1706 large blocks of physically contiguous memory is required. 1707 1708 The maximal size of allocation cannot exceed the size of the 1709 section, so the value of MAX_PAGE_ORDER should satisfy 1710 1711 MAX_PAGE_ORDER + PAGE_SHIFT <= SECTION_SIZE_BITS 1712 1713 Don't change if unsure. 1714 1715config UNMAP_KERNEL_AT_EL0 1716 bool "Unmap kernel when running in userspace (KPTI)" if EXPERT 1717 default y 1718 help 1719 Speculation attacks against some high-performance processors can 1720 be used to bypass MMU permission checks and leak kernel data to 1721 userspace. This can be defended against by unmapping the kernel 1722 when running in userspace, mapping it back in on exception entry 1723 via a trampoline page in the vector table. 1724 1725 If unsure, say Y. 1726 1727config MITIGATE_SPECTRE_BRANCH_HISTORY 1728 bool "Mitigate Spectre style attacks against branch history" if EXPERT 1729 default y 1730 help 1731 Speculation attacks against some high-performance processors can 1732 make use of branch history to influence future speculation. 1733 When taking an exception from user-space, a sequence of branches 1734 or a firmware call overwrites the branch history. 1735 1736config ARM64_SW_TTBR0_PAN 1737 bool "Emulate Privileged Access Never using TTBR0_EL1 switching" 1738 depends on !KCSAN 1739 help 1740 Enabling this option prevents the kernel from accessing 1741 user-space memory directly by pointing TTBR0_EL1 to a reserved 1742 zeroed area and reserved ASID. The user access routines 1743 restore the valid TTBR0_EL1 temporarily. 1744 1745config ARM64_TAGGED_ADDR_ABI 1746 bool "Enable the tagged user addresses syscall ABI" 1747 default y 1748 help 1749 When this option is enabled, user applications can opt in to a 1750 relaxed ABI via prctl() allowing tagged addresses to be passed 1751 to system calls as pointer arguments. For details, see 1752 Documentation/arch/arm64/tagged-address-abi.rst. 1753 1754menuconfig COMPAT 1755 bool "Kernel support for 32-bit EL0" 1756 depends on ARM64_4K_PAGES || EXPERT 1757 select HAVE_UID16 1758 select OLD_SIGSUSPEND3 1759 select COMPAT_OLD_SIGACTION 1760 help 1761 This option enables support for a 32-bit EL0 running under a 64-bit 1762 kernel at EL1. AArch32-specific components such as system calls, 1763 the user helper functions, VFP support and the ptrace interface are 1764 handled appropriately by the kernel. 1765 1766 If you use a page size other than 4KB (i.e, 16KB or 64KB), please be aware 1767 that you will only be able to execute AArch32 binaries that were compiled 1768 with page size aligned segments. 1769 1770 If you want to execute 32-bit userspace applications, say Y. 1771 1772if COMPAT 1773 1774config KUSER_HELPERS 1775 bool "Enable kuser helpers page for 32-bit applications" 1776 default y 1777 help 1778 Warning: disabling this option may break 32-bit user programs. 1779 1780 Provide kuser helpers to compat tasks. The kernel provides 1781 helper code to userspace in read only form at a fixed location 1782 to allow userspace to be independent of the CPU type fitted to 1783 the system. This permits binaries to be run on ARMv4 through 1784 to ARMv8 without modification. 1785 1786 See Documentation/arch/arm/kernel_user_helpers.rst for details. 1787 1788 However, the fixed address nature of these helpers can be used 1789 by ROP (return orientated programming) authors when creating 1790 exploits. 1791 1792 If all of the binaries and libraries which run on your platform 1793 are built specifically for your platform, and make no use of 1794 these helpers, then you can turn this option off to hinder 1795 such exploits. However, in that case, if a binary or library 1796 relying on those helpers is run, it will not function correctly. 1797 1798 Say N here only if you are absolutely certain that you do not 1799 need these helpers; otherwise, the safe option is to say Y. 1800 1801config COMPAT_VDSO 1802 bool "Enable vDSO for 32-bit applications" 1803 depends on !CPU_BIG_ENDIAN 1804 depends on (CC_IS_CLANG && LD_IS_LLD) || "$(CROSS_COMPILE_COMPAT)" != "" 1805 default y 1806 help 1807 Place in the process address space of 32-bit applications an 1808 ELF shared object providing fast implementations of gettimeofday 1809 and clock_gettime. 1810 1811 You must have a 32-bit build of glibc 2.22 or later for programs 1812 to seamlessly take advantage of this. 1813 1814config THUMB2_COMPAT_VDSO 1815 bool "Compile the 32-bit vDSO for Thumb-2 mode" if EXPERT 1816 depends on COMPAT_VDSO 1817 default y 1818 help 1819 Compile the compat vDSO with '-mthumb -fomit-frame-pointer' if y, 1820 otherwise with '-marm'. 1821 1822config COMPAT_ALIGNMENT_FIXUPS 1823 bool "Fix up misaligned multi-word loads and stores in user space" 1824 1825menuconfig ARMV8_DEPRECATED 1826 bool "Emulate deprecated/obsolete ARMv8 instructions" 1827 depends on SYSCTL 1828 help 1829 Legacy software support may require certain instructions 1830 that have been deprecated or obsoleted in the architecture. 1831 1832 Enable this config to enable selective emulation of these 1833 features. 1834 1835 If unsure, say Y 1836 1837if ARMV8_DEPRECATED 1838 1839config SWP_EMULATION 1840 bool "Emulate SWP/SWPB instructions" 1841 help 1842 ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that 1843 they are always undefined. Say Y here to enable software 1844 emulation of these instructions for userspace using LDXR/STXR. 1845 This feature can be controlled at runtime with the abi.swp 1846 sysctl which is disabled by default. 1847 1848 In some older versions of glibc [<=2.8] SWP is used during futex 1849 trylock() operations with the assumption that the code will not 1850 be preempted. This invalid assumption may be more likely to fail 1851 with SWP emulation enabled, leading to deadlock of the user 1852 application. 1853 1854 NOTE: when accessing uncached shared regions, LDXR/STXR rely 1855 on an external transaction monitoring block called a global 1856 monitor to maintain update atomicity. If your system does not 1857 implement a global monitor, this option can cause programs that 1858 perform SWP operations to uncached memory to deadlock. 1859 1860 If unsure, say Y 1861 1862config CP15_BARRIER_EMULATION 1863 bool "Emulate CP15 Barrier instructions" 1864 help 1865 The CP15 barrier instructions - CP15ISB, CP15DSB, and 1866 CP15DMB - are deprecated in ARMv8 (and ARMv7). It is 1867 strongly recommended to use the ISB, DSB, and DMB 1868 instructions instead. 1869 1870 Say Y here to enable software emulation of these 1871 instructions for AArch32 userspace code. When this option is 1872 enabled, CP15 barrier usage is traced which can help 1873 identify software that needs updating. This feature can be 1874 controlled at runtime with the abi.cp15_barrier sysctl. 1875 1876 If unsure, say Y 1877 1878config SETEND_EMULATION 1879 bool "Emulate SETEND instruction" 1880 help 1881 The SETEND instruction alters the data-endianness of the 1882 AArch32 EL0, and is deprecated in ARMv8. 1883 1884 Say Y here to enable software emulation of the instruction 1885 for AArch32 userspace code. This feature can be controlled 1886 at runtime with the abi.setend sysctl. 1887 1888 Note: All the cpus on the system must have mixed endian support at EL0 1889 for this feature to be enabled. If a new CPU - which doesn't support mixed 1890 endian - is hotplugged in after this feature has been enabled, there could 1891 be unexpected results in the applications. 1892 1893 If unsure, say Y 1894endif # ARMV8_DEPRECATED 1895 1896endif # COMPAT 1897 1898menu "ARMv8.1 architectural features" 1899 1900config ARM64_HW_AFDBM 1901 bool "Support for hardware updates of the Access and Dirty page flags" 1902 default y 1903 help 1904 The ARMv8.1 architecture extensions introduce support for 1905 hardware updates of the access and dirty information in page 1906 table entries. When enabled in TCR_EL1 (HA and HD bits) on 1907 capable processors, accesses to pages with PTE_AF cleared will 1908 set this bit instead of raising an access flag fault. 1909 Similarly, writes to read-only pages with the DBM bit set will 1910 clear the read-only bit (AP[2]) instead of raising a 1911 permission fault. 1912 1913 Kernels built with this configuration option enabled continue 1914 to work on pre-ARMv8.1 hardware and the performance impact is 1915 minimal. If unsure, say Y. 1916 1917endmenu # "ARMv8.1 architectural features" 1918 1919menu "ARMv8.2 architectural features" 1920 1921config ARM64_PMEM 1922 bool "Enable support for persistent memory" 1923 select ARCH_HAS_PMEM_API 1924 select ARCH_HAS_UACCESS_FLUSHCACHE 1925 help 1926 Say Y to enable support for the persistent memory API based on the 1927 ARMv8.2 DCPoP feature. 1928 1929 The feature is detected at runtime, and the kernel will use DC CVAC 1930 operations if DC CVAP is not supported (following the behaviour of 1931 DC CVAP itself if the system does not define a point of persistence). 1932 1933config ARM64_RAS_EXTN 1934 bool "Enable support for RAS CPU Extensions" 1935 default y 1936 help 1937 CPUs that support the Reliability, Availability and Serviceability 1938 (RAS) Extensions, part of ARMv8.2 are able to track faults and 1939 errors, classify them and report them to software. 1940 1941 On CPUs with these extensions system software can use additional 1942 barriers to determine if faults are pending and read the 1943 classification from a new set of registers. 1944 1945 Selecting this feature will allow the kernel to use these barriers 1946 and access the new registers if the system supports the extension. 1947 Platform RAS features may additionally depend on firmware support. 1948 1949config ARM64_CNP 1950 bool "Enable support for Common Not Private (CNP) translations" 1951 default y 1952 help 1953 Common Not Private (CNP) allows translation table entries to 1954 be shared between different PEs in the same inner shareable 1955 domain, so the hardware can use this fact to optimise the 1956 caching of such entries in the TLB. 1957 1958 Selecting this option allows the CNP feature to be detected 1959 at runtime, and does not affect PEs that do not implement 1960 this feature. 1961 1962endmenu # "ARMv8.2 architectural features" 1963 1964menu "ARMv8.3 architectural features" 1965 1966config ARM64_PTR_AUTH 1967 bool "Enable support for pointer authentication" 1968 default y 1969 help 1970 Pointer authentication (part of the ARMv8.3 Extensions) provides 1971 instructions for signing and authenticating pointers against secret 1972 keys, which can be used to mitigate Return Oriented Programming (ROP) 1973 and other attacks. 1974 1975 This option enables these instructions at EL0 (i.e. for userspace). 1976 Choosing this option will cause the kernel to initialise secret keys 1977 for each process at exec() time, with these keys being 1978 context-switched along with the process. 1979 1980 The feature is detected at runtime. If the feature is not present in 1981 hardware it will not be advertised to userspace/KVM guest nor will it 1982 be enabled. 1983 1984 If the feature is present on the boot CPU but not on a late CPU, then 1985 the late CPU will be parked. Also, if the boot CPU does not have 1986 address auth and the late CPU has then the late CPU will still boot 1987 but with the feature disabled. On such a system, this option should 1988 not be selected. 1989 1990config ARM64_PTR_AUTH_KERNEL 1991 bool "Use pointer authentication for kernel" 1992 default y 1993 depends on ARM64_PTR_AUTH 1994 # Modern compilers insert a .note.gnu.property section note for PAC 1995 # which is only understood by binutils starting with version 2.33.1. 1996 depends on LD_IS_LLD || LD_VERSION >= 23301 || (CC_IS_GCC && GCC_VERSION < 90100) 1997 depends on !CC_IS_CLANG || AS_HAS_CFI_NEGATE_RA_STATE 1998 depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_ARGS) 1999 help 2000 If the compiler supports the -mbranch-protection or 2001 -msign-return-address flag (e.g. GCC 7 or later), then this option 2002 will cause the kernel itself to be compiled with return address 2003 protection. In this case, and if the target hardware is known to 2004 support pointer authentication, then CONFIG_STACKPROTECTOR can be 2005 disabled with minimal loss of protection. 2006 2007 This feature works with FUNCTION_GRAPH_TRACER option only if 2008 DYNAMIC_FTRACE_WITH_ARGS is enabled. 2009 2010config CC_HAS_BRANCH_PROT_PAC_RET 2011 # GCC 9 or later, clang 8 or later 2012 def_bool $(cc-option,-mbranch-protection=pac-ret+leaf) 2013 2014config AS_HAS_CFI_NEGATE_RA_STATE 2015 # binutils 2.34+ 2016 def_bool $(as-instr,.cfi_startproc\n.cfi_negate_ra_state\n.cfi_endproc\n) 2017 2018endmenu # "ARMv8.3 architectural features" 2019 2020menu "ARMv8.4 architectural features" 2021 2022config ARM64_AMU_EXTN 2023 bool "Enable support for the Activity Monitors Unit CPU extension" 2024 default y 2025 help 2026 The activity monitors extension is an optional extension introduced 2027 by the ARMv8.4 CPU architecture. This enables support for version 1 2028 of the activity monitors architecture, AMUv1. 2029 2030 To enable the use of this extension on CPUs that implement it, say Y. 2031 2032 Note that for architectural reasons, firmware _must_ implement AMU 2033 support when running on CPUs that present the activity monitors 2034 extension. The required support is present in: 2035 * Version 1.5 and later of the ARM Trusted Firmware 2036 2037 For kernels that have this configuration enabled but boot with broken 2038 firmware, you may need to say N here until the firmware is fixed. 2039 Otherwise you may experience firmware panics or lockups when 2040 accessing the counter registers. Even if you are not observing these 2041 symptoms, the values returned by the register reads might not 2042 correctly reflect reality. Most commonly, the value read will be 0, 2043 indicating that the counter is not enabled. 2044 2045config ARM64_TLB_RANGE 2046 bool "Enable support for tlbi range feature" 2047 default y 2048 help 2049 ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a 2050 range of input addresses. 2051 2052config ARM64_MPAM 2053 bool "Enable support for MPAM" 2054 select ARM64_MPAM_DRIVER 2055 select ARCH_HAS_CPU_RESCTRL 2056 help 2057 Memory System Resource Partitioning and Monitoring (MPAM) is an 2058 optional extension to the Arm architecture that allows each 2059 transaction issued to the memory system to be labelled with a 2060 Partition identifier (PARTID) and Performance Monitoring Group 2061 identifier (PMG). 2062 2063 Memory system components, such as the caches, can be configured with 2064 policies to control how much of various physical resources (such as 2065 memory bandwidth or cache memory) the transactions labelled with each 2066 PARTID can consume. Depending on the capabilities of the hardware, 2067 the PARTID and PMG can also be used as filtering criteria to measure 2068 the memory system resource consumption of different parts of a 2069 workload. 2070 2071 Use of this extension requires CPU support, support in the 2072 Memory System Components (MSC), and a description from firmware 2073 of where the MSCs are in the address space. 2074 2075 MPAM is exposed to user-space via the resctrl pseudo filesystem. 2076 2077 This option enables the extra context switch code. 2078 2079endmenu # "ARMv8.4 architectural features" 2080 2081menu "ARMv8.5 architectural features" 2082 2083config AS_HAS_ARMV8_5 2084 def_bool $(cc-option,-Wa$(comma)-march=armv8.5-a) 2085 2086config ARM64_BTI 2087 bool "Branch Target Identification support" 2088 default y 2089 help 2090 Branch Target Identification (part of the ARMv8.5 Extensions) 2091 provides a mechanism to limit the set of locations to which computed 2092 branch instructions such as BR or BLR can jump. 2093 2094 To make use of BTI on CPUs that support it, say Y. 2095 2096 BTI is intended to provide complementary protection to other control 2097 flow integrity protection mechanisms, such as the Pointer 2098 authentication mechanism provided as part of the ARMv8.3 Extensions. 2099 For this reason, it does not make sense to enable this option without 2100 also enabling support for pointer authentication. Thus, when 2101 enabling this option you should also select ARM64_PTR_AUTH=y. 2102 2103 Userspace binaries must also be specifically compiled to make use of 2104 this mechanism. If you say N here or the hardware does not support 2105 BTI, such binaries can still run, but you get no additional 2106 enforcement of branch destinations. 2107 2108config ARM64_BTI_KERNEL 2109 bool "Use Branch Target Identification for kernel" 2110 default y 2111 depends on ARM64_BTI 2112 depends on ARM64_PTR_AUTH_KERNEL 2113 depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI 2114 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697 2115 depends on !CC_IS_GCC || GCC_VERSION >= 100100 2116 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671 2117 depends on !CC_IS_GCC 2118 depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_ARGS) 2119 help 2120 Build the kernel with Branch Target Identification annotations 2121 and enable enforcement of this for kernel code. When this option 2122 is enabled and the system supports BTI all kernel code including 2123 modular code must have BTI enabled. 2124 2125config CC_HAS_BRANCH_PROT_PAC_RET_BTI 2126 # GCC 9 or later, clang 8 or later 2127 def_bool $(cc-option,-mbranch-protection=pac-ret+leaf+bti) 2128 2129config ARM64_E0PD 2130 bool "Enable support for E0PD" 2131 default y 2132 help 2133 E0PD (part of the ARMv8.5 extensions) allows us to ensure 2134 that EL0 accesses made via TTBR1 always fault in constant time, 2135 providing similar benefits to KASLR as those provided by KPTI, but 2136 with lower overhead and without disrupting legitimate access to 2137 kernel memory such as SPE. 2138 2139 This option enables E0PD for TTBR1 where available. 2140 2141config ARM64_AS_HAS_MTE 2142 # Initial support for MTE went in binutils 2.32.0, checked with 2143 # ".arch armv8.5-a+memtag" below. However, this was incomplete 2144 # as a late addition to the final architecture spec (LDGM/STGM) 2145 # is only supported in the newer 2.32.x and 2.33 binutils 2146 # versions, hence the extra "stgm" instruction check below. 2147 def_bool $(as-instr,.arch armv8.5-a+memtag\nstgm xzr$(comma)[x0]) 2148 2149config ARM64_MTE 2150 bool "Memory Tagging Extension support" 2151 default y 2152 depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI 2153 depends on AS_HAS_ARMV8_5 2154 # Required for tag checking in the uaccess routines 2155 select ARCH_HAS_SUBPAGE_FAULTS 2156 select ARCH_USES_HIGH_VMA_FLAGS 2157 select ARCH_USES_PG_ARCH_2 2158 select ARCH_USES_PG_ARCH_3 2159 help 2160 Memory Tagging (part of the ARMv8.5 Extensions) provides 2161 architectural support for run-time, always-on detection of 2162 various classes of memory error to aid with software debugging 2163 to eliminate vulnerabilities arising from memory-unsafe 2164 languages. 2165 2166 This option enables the support for the Memory Tagging 2167 Extension at EL0 (i.e. for userspace). 2168 2169 Selecting this option allows the feature to be detected at 2170 runtime. Any secondary CPU not implementing this feature will 2171 not be allowed a late bring-up. 2172 2173 Userspace binaries that want to use this feature must 2174 explicitly opt in. The mechanism for the userspace is 2175 described in: 2176 2177 Documentation/arch/arm64/memory-tagging-extension.rst. 2178 2179endmenu # "ARMv8.5 architectural features" 2180 2181menu "ARMv8.7 architectural features" 2182 2183config ARM64_EPAN 2184 bool "Enable support for Enhanced Privileged Access Never (EPAN)" 2185 default y 2186 help 2187 Enhanced Privileged Access Never (EPAN) allows Privileged 2188 Access Never to be used with Execute-only mappings. 2189 2190 The feature is detected at runtime, and will remain disabled 2191 if the cpu does not implement the feature. 2192endmenu # "ARMv8.7 architectural features" 2193 2194config AS_HAS_MOPS 2195 def_bool $(as-instr,.arch_extension mops) 2196 2197menu "ARMv8.9 architectural features" 2198 2199config ARM64_POE 2200 prompt "Permission Overlay Extension" 2201 def_bool y 2202 select ARCH_USES_HIGH_VMA_FLAGS 2203 select ARCH_HAS_PKEYS 2204 help 2205 The Permission Overlay Extension is used to implement Memory 2206 Protection Keys. Memory Protection Keys provides a mechanism for 2207 enforcing page-based protections, but without requiring modification 2208 of the page tables when an application changes protection domains. 2209 2210 For details, see Documentation/core-api/protection-keys.rst 2211 2212 If unsure, say y. 2213 2214config ARCH_PKEY_BITS 2215 int 2216 default 3 2217 2218config ARM64_HAFT 2219 bool "Support for Hardware managed Access Flag for Table Descriptors" 2220 depends on ARM64_HW_AFDBM 2221 default y 2222 help 2223 The ARMv8.9/ARMv9.5 introduces the feature Hardware managed Access 2224 Flag for Table descriptors. When enabled an architectural executed 2225 memory access will update the Access Flag in each Table descriptor 2226 which is accessed during the translation table walk and for which 2227 the Access Flag is 0. The Access Flag of the Table descriptor use 2228 the same bit of PTE_AF. 2229 2230 The feature will only be enabled if all the CPUs in the system 2231 support this feature. If unsure, say Y. 2232 2233endmenu # "ARMv8.9 architectural features" 2234 2235menu "ARMv9.4 architectural features" 2236 2237config ARM64_GCS 2238 bool "Enable support for Guarded Control Stack (GCS)" 2239 default y 2240 select ARCH_HAS_USER_SHADOW_STACK 2241 select ARCH_USES_HIGH_VMA_FLAGS 2242 help 2243 Guarded Control Stack (GCS) provides support for a separate 2244 stack with restricted access which contains only return 2245 addresses. This can be used to harden against some attacks 2246 by comparing return address used by the program with what is 2247 stored in the GCS, and may also be used to efficiently obtain 2248 the call stack for applications such as profiling. 2249 2250 The feature is detected at runtime, and will remain disabled 2251 if the system does not implement the feature. 2252 2253endmenu # "ARMv9.4 architectural features" 2254 2255config AS_HAS_LSUI 2256 def_bool $(as-instr,.arch_extension lsui) 2257 help 2258 Supported by LLVM 20+ and binutils 2.45+. 2259 2260menu "ARMv9.6 architectural features" 2261 2262config ARM64_LSUI 2263 bool "Support Unprivileged Load Store Instructions (LSUI)" 2264 default y 2265 depends on AS_HAS_LSUI && !CPU_BIG_ENDIAN 2266 help 2267 The Unprivileged Load Store Instructions (LSUI) provides 2268 variants load/store instructions that access user-space memory 2269 from the kernel without clearing PSTATE.PAN bit. 2270 2271 This feature is supported by LLVM 20+ and binutils 2.45+. 2272 2273endmenu # "ARMv9.6 architectural feature" 2274 2275config ARM64_SVE 2276 bool "ARM Scalable Vector Extension support" 2277 default y 2278 help 2279 The Scalable Vector Extension (SVE) is an extension to the AArch64 2280 execution state which complements and extends the SIMD functionality 2281 of the base architecture to support much larger vectors and to enable 2282 additional vectorisation opportunities. 2283 2284 To enable use of this extension on CPUs that implement it, say Y. 2285 2286 On CPUs that support the SVE2 extensions, this option will enable 2287 those too. 2288 2289 Note that for architectural reasons, firmware _must_ implement SVE 2290 support when running on SVE capable hardware. The required support 2291 is present in: 2292 2293 * version 1.5 and later of the ARM Trusted Firmware 2294 * the AArch64 boot wrapper since commit 5e1261e08abf 2295 ("bootwrapper: SVE: Enable SVE for EL2 and below"). 2296 2297 For other firmware implementations, consult the firmware documentation 2298 or vendor. 2299 2300 If you need the kernel to boot on SVE-capable hardware with broken 2301 firmware, you may need to say N here until you get your firmware 2302 fixed. Otherwise, you may experience firmware panics or lockups when 2303 booting the kernel. If unsure and you are not observing these 2304 symptoms, you should assume that it is safe to say Y. 2305 2306config AS_HAS_SME 2307 # Supported by LLVM 13+ and binutils 2.38+ 2308 def_bool $(as-instr,.arch_extension sme) 2309 2310config ARM64_SME 2311 bool "ARM Scalable Matrix Extension support" 2312 default y 2313 depends on ARM64_SVE 2314 depends on AS_HAS_SME 2315 help 2316 The Scalable Matrix Extension (SME) is an extension to the AArch64 2317 execution state which utilises a substantial subset of the SVE 2318 instruction set, together with the addition of new architectural 2319 register state capable of holding two dimensional matrix tiles to 2320 enable various matrix operations. 2321 2322config ARM64_PSEUDO_NMI 2323 bool "Support for NMI-like interrupts" 2324 select ARM_GIC_V3 2325 help 2326 Adds support for mimicking Non-Maskable Interrupts through the use of 2327 GIC interrupt priority. This support requires version 3 or later of 2328 ARM GIC. 2329 2330 This high priority configuration for interrupts needs to be 2331 explicitly enabled by setting the kernel parameter 2332 "irqchip.gicv3_pseudo_nmi" to 1. 2333 2334 If unsure, say N 2335 2336if ARM64_PSEUDO_NMI 2337config ARM64_DEBUG_PRIORITY_MASKING 2338 bool "Debug interrupt priority masking" 2339 help 2340 This adds runtime checks to functions enabling/disabling 2341 interrupts when using priority masking. The additional checks verify 2342 the validity of ICC_PMR_EL1 when calling concerned functions. 2343 2344 If unsure, say N 2345endif # ARM64_PSEUDO_NMI 2346 2347config RELOCATABLE 2348 bool "Build a relocatable kernel image" if EXPERT 2349 select ARCH_HAS_RELR 2350 default y 2351 help 2352 This builds the kernel as a Position Independent Executable (PIE), 2353 which retains all relocation metadata required to relocate the 2354 kernel binary at runtime to a different virtual address than the 2355 address it was linked at. 2356 Since AArch64 uses the RELA relocation format, this requires a 2357 relocation pass at runtime even if the kernel is loaded at the 2358 same address it was linked at. 2359 2360config RANDOMIZE_BASE 2361 bool "Randomize the address of the kernel image" 2362 select RELOCATABLE 2363 help 2364 Randomizes the virtual address at which the kernel image is 2365 loaded, as a security feature that deters exploit attempts 2366 relying on knowledge of the location of kernel internals. 2367 2368 It is the bootloader's job to provide entropy, by passing a 2369 random u64 value in /chosen/kaslr-seed at kernel entry. 2370 2371 When booting via the UEFI stub, it will invoke the firmware's 2372 EFI_RNG_PROTOCOL implementation (if available) to supply entropy 2373 to the kernel proper. In addition, it will randomise the physical 2374 location of the kernel Image as well. 2375 2376 If unsure, say N. 2377 2378config RANDOMIZE_MODULE_REGION_FULL 2379 bool "Randomize the module region over a 2 GB range" 2380 depends on RANDOMIZE_BASE 2381 default y 2382 help 2383 Randomizes the location of the module region inside a 2 GB window 2384 covering the core kernel. This way, it is less likely for modules 2385 to leak information about the location of core kernel data structures 2386 but it does imply that function calls between modules and the core 2387 kernel will need to be resolved via veneers in the module PLT. 2388 2389 When this option is not set, the module region will be randomized over 2390 a limited range that contains the [_stext, _etext] interval of the 2391 core kernel, so branch relocations are almost always in range unless 2392 the region is exhausted. In this particular case of region 2393 exhaustion, modules might be able to fall back to a larger 2GB area. 2394 2395config CC_HAVE_STACKPROTECTOR_SYSREG 2396 def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0) 2397 2398config STACKPROTECTOR_PER_TASK 2399 def_bool y 2400 depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_SYSREG 2401 2402config UNWIND_PATCH_PAC_INTO_SCS 2403 bool "Enable shadow call stack dynamically using code patching" 2404 depends on CC_IS_CLANG 2405 depends on ARM64_PTR_AUTH_KERNEL && CC_HAS_BRANCH_PROT_PAC_RET 2406 depends on SHADOW_CALL_STACK 2407 select UNWIND_TABLES 2408 select DYNAMIC_SCS 2409 2410config ARM64_CONTPTE 2411 bool "Contiguous PTE mappings for user memory" if EXPERT 2412 depends on TRANSPARENT_HUGEPAGE 2413 default y 2414 help 2415 When enabled, user mappings are configured using the PTE contiguous 2416 bit, for any mappings that meet the size and alignment requirements. 2417 This reduces TLB pressure and improves performance. 2418 2419endmenu # "Kernel Features" 2420 2421menu "Boot options" 2422 2423config ARM64_ACPI_PARKING_PROTOCOL 2424 bool "Enable support for the ARM64 ACPI parking protocol" 2425 depends on ACPI 2426 help 2427 Enable support for the ARM64 ACPI parking protocol. If disabled 2428 the kernel will not allow booting through the ARM64 ACPI parking 2429 protocol even if the corresponding data is present in the ACPI 2430 MADT table. 2431 2432config CMDLINE 2433 string "Default kernel command string" 2434 default "" 2435 help 2436 Provide a set of default command-line options at build time by 2437 entering them here. As a minimum, you should specify the 2438 root device (e.g. root=/dev/nfs). 2439 2440choice 2441 prompt "Kernel command line type" 2442 depends on CMDLINE != "" 2443 default CMDLINE_FROM_BOOTLOADER 2444 help 2445 Choose how the kernel will handle the provided default kernel 2446 command line string. 2447 2448config CMDLINE_FROM_BOOTLOADER 2449 bool "Use bootloader kernel arguments if available" 2450 help 2451 Uses the command-line options passed by the boot loader. If 2452 the boot loader doesn't provide any, the default kernel command 2453 string provided in CMDLINE will be used. 2454 2455config CMDLINE_FORCE 2456 bool "Always use the default kernel command string" 2457 help 2458 Always use the default kernel command string, even if the boot 2459 loader passes other arguments to the kernel. 2460 This is useful if you cannot or don't want to change the 2461 command-line options your boot loader passes to the kernel. 2462 2463endchoice 2464 2465config EFI_STUB 2466 bool 2467 2468config EFI 2469 bool "UEFI runtime support" 2470 depends on OF && !CPU_BIG_ENDIAN 2471 depends on KERNEL_MODE_NEON 2472 select ARCH_SUPPORTS_ACPI 2473 select LIBFDT 2474 select UCS2_STRING 2475 select EFI_PARAMS_FROM_FDT 2476 select EFI_RUNTIME_WRAPPERS 2477 select EFI_STUB 2478 select EFI_GENERIC_STUB 2479 imply IMA_SECURE_AND_OR_TRUSTED_BOOT 2480 default y 2481 help 2482 This option provides support for runtime services provided 2483 by UEFI firmware (such as non-volatile variables, realtime 2484 clock, and platform reset). A UEFI stub is also provided to 2485 allow the kernel to be booted as an EFI application. This 2486 is only useful on systems that have UEFI firmware. 2487 2488config COMPRESSED_INSTALL 2489 bool "Install compressed image by default" 2490 help 2491 This makes the regular "make install" install the compressed 2492 image we built, not the legacy uncompressed one. 2493 2494 You can check that a compressed image works for you by doing 2495 "make zinstall" first, and verifying that everything is fine 2496 in your environment before making "make install" do this for 2497 you. 2498 2499config DMI 2500 bool "Enable support for SMBIOS (DMI) tables" 2501 depends on EFI 2502 default y 2503 help 2504 This enables SMBIOS/DMI feature for systems. 2505 2506 This option is only useful on systems that have UEFI firmware. 2507 However, even with this option, the resultant kernel should 2508 continue to boot on existing non-UEFI platforms. 2509 2510endmenu # "Boot options" 2511 2512menu "Power management options" 2513 2514source "kernel/power/Kconfig" 2515 2516config ARCH_HIBERNATION_POSSIBLE 2517 def_bool y 2518 depends on CPU_PM 2519 2520config ARCH_HIBERNATION_HEADER 2521 def_bool y 2522 depends on HIBERNATION 2523 2524config ARCH_SUSPEND_POSSIBLE 2525 def_bool y 2526 2527endmenu # "Power management options" 2528 2529menu "CPU Power Management" 2530 2531source "drivers/cpuidle/Kconfig" 2532 2533source "drivers/cpufreq/Kconfig" 2534 2535endmenu # "CPU Power Management" 2536 2537source "drivers/acpi/Kconfig" 2538 2539source "arch/arm64/kvm/Kconfig" 2540 2541source "kernel/livepatch/Kconfig" 2542