Kconfig 81 KB

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