Kconfig 84 KB

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