Kconfig 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323
  1. # SPDX-License-Identifier: GPL-2.0
  2. source "arch/powerpc/platforms/Kconfig.cputype"
  3. config CC_HAS_ELFV2
  4. def_bool PPC64 && $(cc-option, -mabi=elfv2)
  5. config CC_HAS_PREFIXED
  6. def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed)
  7. config CC_HAS_PCREL
  8. # Clang has a bug (https://github.com/llvm/llvm-project/issues/62372)
  9. # where pcrel code is not generated if -msoft-float, -mno-altivec, or
  10. # -mno-vsx options are also given. Without these options, fp/vec
  11. # instructions are generated from regular kernel code. So Clang can't
  12. # do pcrel yet.
  13. def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel)
  14. config 32BIT
  15. bool
  16. default y if PPC32
  17. config 64BIT
  18. bool
  19. default y if PPC64
  20. config LIVEPATCH_64
  21. def_bool PPC64
  22. depends on LIVEPATCH
  23. config MMU
  24. bool
  25. default y
  26. config ARCH_MMAP_RND_BITS_MAX
  27. # On Book3S 64, the default virtual address space for 64-bit processes
  28. # is 2^47 (128TB). As a maximum, allow randomisation to consume up to
  29. # 32T of address space (2^45), which should ensure a reasonable gap
  30. # between bottom-up and top-down allocations for applications that
  31. # consume "normal" amounts of address space. Book3S 64 only supports 64K
  32. # and 4K page sizes.
  33. default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
  34. default 33 if PPC_BOOK3S_64 # 33 = 45 (32T) - 12 (4K)
  35. #
  36. # On all other 64-bit platforms (currently only Book3E), the virtual
  37. # address space is 2^46 (64TB). Allow randomisation to consume up to 16T
  38. # of address space (2^44). Only 4K page sizes are supported.
  39. default 32 if 64BIT # 32 = 44 (16T) - 12 (4K)
  40. #
  41. # For 32-bit, use the compat values, as they're the same.
  42. default ARCH_MMAP_RND_COMPAT_BITS_MAX
  43. config ARCH_MMAP_RND_BITS_MIN
  44. # Allow randomisation to consume up to 1GB of address space (2^30).
  45. default 14 if 64BIT && PPC_64K_PAGES # 14 = 30 (1GB) - 16 (64K)
  46. default 18 if 64BIT # 18 = 30 (1GB) - 12 (4K)
  47. #
  48. # For 32-bit, use the compat values, as they're the same.
  49. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  50. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  51. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  52. # Allow randomisation to consume up to 512MB of address space (2^29).
  53. default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
  54. default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
  55. default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
  56. default 17 # 17 = 29 (512MB) - 12 (4K)
  57. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  58. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  59. # Allow randomisation to consume up to 8MB of address space (2^23).
  60. default 5 if PPC_256K_PAGES # 5 = 23 (8MB) - 18 (256K)
  61. default 7 if PPC_64K_PAGES # 7 = 23 (8MB) - 16 (64K)
  62. default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
  63. default 11 # 11 = 23 (8MB) - 12 (4K)
  64. config NR_IRQS
  65. int "Number of virtual interrupt numbers"
  66. range 32 1048576
  67. default "512"
  68. help
  69. This defines the number of virtual interrupt numbers the kernel
  70. can manage. Virtual interrupt numbers are what you see in
  71. /proc/interrupts. If you configure your system to have too few,
  72. drivers will fail to load or worse - handle with care.
  73. config NMI_IPI
  74. bool
  75. depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
  76. default y
  77. config PPC_WATCHDOG
  78. bool
  79. depends on HARDLOCKUP_DETECTOR_ARCH
  80. default y
  81. help
  82. This is a placeholder when the powerpc hardlockup detector
  83. watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
  84. selected via the generic lockup detector menu which is why we
  85. have no standalone config option for it here.
  86. config STACKTRACE_SUPPORT
  87. bool
  88. default y
  89. config LOCKDEP_SUPPORT
  90. bool
  91. default y
  92. config GENERIC_LOCKBREAK
  93. bool
  94. default y
  95. depends on SMP && PREEMPTION && !PPC_QUEUED_SPINLOCKS
  96. config GENERIC_HWEIGHT
  97. bool
  98. default y
  99. config PPC
  100. bool
  101. default y
  102. #
  103. # Please keep this list sorted alphabetically.
  104. #
  105. select ARCH_32BIT_OFF_T if PPC32
  106. select ARCH_DISABLE_KASAN_INLINE if PPC_RADIX_MMU
  107. select ARCH_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE
  108. select ARCH_ENABLE_MEMORY_HOTPLUG
  109. select ARCH_ENABLE_MEMORY_HOTREMOVE
  110. select ARCH_HAS_COPY_MC if PPC64
  111. select ARCH_HAS_CURRENT_STACK_POINTER
  112. select ARCH_HAS_DEBUG_VIRTUAL
  113. select ARCH_HAS_DEBUG_VM_PGTABLE
  114. select ARCH_HAS_DEBUG_WX if STRICT_KERNEL_RWX
  115. select ARCH_HAS_DEVMEM_IS_ALLOWED
  116. select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
  117. select ARCH_HAS_DMA_OPS if PPC64
  118. select ARCH_HAS_FORTIFY_SOURCE
  119. select ARCH_HAS_GCOV_PROFILE_ALL
  120. select ARCH_HAS_KCOV
  121. select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC64 && PPC_FPU
  122. select ARCH_HAS_MEMBARRIER_CALLBACKS
  123. select ARCH_HAS_MEMBARRIER_SYNC_CORE
  124. select ARCH_HAS_MEMREMAP_COMPAT_ALIGN if PPC_64S_HASH_MMU
  125. select ARCH_HAS_MMIOWB if PPC64
  126. select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  127. select ARCH_HAS_PHYS_TO_DMA
  128. select ARCH_HAS_PMEM_API
  129. select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
  130. select ARCH_HAS_PTE_SPECIAL
  131. select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
  132. select ARCH_HAS_SET_MEMORY
  133. select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx) && !HIBERNATION
  134. select ARCH_HAS_STRICT_KERNEL_RWX if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
  135. select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX
  136. select ARCH_HAS_SYSCALL_WRAPPER if !SPU_BASE && !COMPAT
  137. select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
  138. select ARCH_HAS_UACCESS_FLUSHCACHE
  139. select ARCH_HAS_UBSAN
  140. select ARCH_HAVE_NMI_SAFE_CMPXCHG
  141. select ARCH_HAVE_EXTRA_ELF_NOTES if SPU_BASE
  142. select ARCH_KEEP_MEMBLOCK
  143. select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if PPC_RADIX_MMU
  144. select ARCH_MIGHT_HAVE_PC_PARPORT
  145. select ARCH_MIGHT_HAVE_PC_SERIO
  146. select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
  147. select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  148. select ARCH_SPLIT_ARG64 if PPC32
  149. select ARCH_STACKWALK
  150. select ARCH_SUPPORTS_ATOMIC_RMW
  151. select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx
  152. select ARCH_USE_BUILTIN_BSWAP
  153. select ARCH_USE_CMPXCHG_LOCKREF if PPC64
  154. select ARCH_USE_MEMTEST
  155. select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
  156. select ARCH_WANT_DEFAULT_BPF_JIT
  157. select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  158. select ARCH_WANT_IPC_PARSE_VERSION
  159. select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
  160. select ARCH_WANT_LD_ORPHAN_WARN
  161. select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if PPC_RADIX_MMU
  162. select ARCH_WANTS_MODULES_DATA_IN_VMALLOC if PPC_BOOK3S_32 || PPC_8xx
  163. select ARCH_WEAK_RELEASE_ACQUIRE
  164. select BINFMT_ELF
  165. select BUILDTIME_TABLE_SORT
  166. select CLONE_BACKWARDS
  167. select CPUMASK_OFFSTACK if NR_CPUS >= 8192
  168. select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
  169. select DMA_OPS_BYPASS if PPC64
  170. select DYNAMIC_FTRACE if FUNCTION_TRACER
  171. select EDAC_ATOMIC_SCRUB
  172. select EDAC_SUPPORT
  173. select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
  174. select FUNCTION_ALIGNMENT_4B
  175. select GENERIC_ATOMIC64 if PPC32
  176. select GENERIC_CLOCKEVENTS_BROADCAST if SMP
  177. select GENERIC_CMOS_UPDATE
  178. select GENERIC_CPU_AUTOPROBE
  179. select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
  180. select GENERIC_EARLY_IOREMAP
  181. select GENERIC_GETTIMEOFDAY
  182. select GENERIC_IDLE_POLL_SETUP
  183. select GENERIC_IOREMAP
  184. select GENERIC_IRQ_SHOW
  185. select GENERIC_IRQ_SHOW_LEVEL
  186. select GENERIC_PCI_IOMAP if PCI
  187. select GENERIC_PTDUMP
  188. select GENERIC_SMP_IDLE_THREAD
  189. select GENERIC_TIME_VSYSCALL
  190. select GENERIC_VDSO_TIME_NS
  191. select HAS_IOPORT if PCI
  192. select HAVE_ARCH_AUDITSYSCALL
  193. select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
  194. select HAVE_ARCH_HUGE_VMAP if PPC_RADIX_MMU || PPC_8xx
  195. select HAVE_ARCH_JUMP_LABEL
  196. select HAVE_ARCH_JUMP_LABEL_RELATIVE
  197. select HAVE_ARCH_KASAN if PPC32 && PAGE_SHIFT <= 14
  198. select HAVE_ARCH_KASAN if PPC_RADIX_MMU
  199. select HAVE_ARCH_KASAN if PPC_BOOK3E_64
  200. select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
  201. select HAVE_ARCH_KCSAN
  202. select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
  203. select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
  204. select HAVE_ARCH_WITHIN_STACK_FRAMES
  205. select HAVE_ARCH_KGDB
  206. select HAVE_ARCH_MMAP_RND_BITS
  207. select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
  208. select HAVE_ARCH_NVRAM_OPS
  209. select HAVE_ARCH_SECCOMP_FILTER
  210. select HAVE_ARCH_TRACEHOOK
  211. select HAVE_ASM_MODVERSIONS
  212. select HAVE_CONTEXT_TRACKING_USER
  213. select HAVE_C_RECORDMCOUNT
  214. select HAVE_DEBUG_KMEMLEAK
  215. select HAVE_DEBUG_STACKOVERFLOW
  216. select HAVE_DYNAMIC_FTRACE
  217. select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  218. select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  219. select HAVE_EBPF_JIT
  220. select HAVE_EFFICIENT_UNALIGNED_ACCESS
  221. select HAVE_GUP_FAST
  222. select HAVE_FTRACE_MCOUNT_RECORD
  223. select HAVE_FUNCTION_ARG_ACCESS_API
  224. select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
  225. select HAVE_FUNCTION_ERROR_INJECTION
  226. select HAVE_FUNCTION_GRAPH_TRACER
  227. select HAVE_FUNCTION_TRACER if PPC64 || (PPC32 && CC_IS_GCC)
  228. select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
  229. select HAVE_GENERIC_VDSO
  230. select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP
  231. select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
  232. select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
  233. select HAVE_IOREMAP_PROT
  234. select HAVE_IRQ_TIME_ACCOUNTING
  235. select HAVE_KERNEL_GZIP
  236. select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
  237. select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
  238. select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
  239. select HAVE_KPROBES
  240. select HAVE_KPROBES_ON_FTRACE
  241. select HAVE_KRETPROBES
  242. select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if HAVE_OBJTOOL_MCOUNT && (!ARCH_USING_PATCHABLE_FUNCTION_ENTRY || (!CC_IS_GCC || GCC_VERSION >= 110100))
  243. select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
  244. select HAVE_MOD_ARCH_SPECIFIC
  245. select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
  246. select HAVE_OPTPROBES
  247. select HAVE_OBJTOOL if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  248. select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL
  249. select HAVE_PERF_EVENTS
  250. select HAVE_PERF_EVENTS_NMI if PPC64
  251. select HAVE_PERF_REGS
  252. select HAVE_PERF_USER_STACK_DUMP
  253. select HAVE_RETHOOK if KPROBES
  254. select HAVE_REGS_AND_STACK_ACCESS_API
  255. select HAVE_RELIABLE_STACKTRACE
  256. select HAVE_RSEQ
  257. select HAVE_SETUP_PER_CPU_AREA if PPC64
  258. select HAVE_SOFTIRQ_ON_OWN_STACK
  259. select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
  260. select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,$(m64-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=0)
  261. select HAVE_STATIC_CALL if PPC32
  262. select HAVE_SYSCALL_TRACEPOINTS
  263. select HAVE_VIRT_CPU_ACCOUNTING
  264. select HAVE_VIRT_CPU_ACCOUNTING_GEN
  265. select HOTPLUG_SMT if HOTPLUG_CPU
  266. select SMT_NUM_THREADS_DYNAMIC
  267. select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
  268. select IOMMU_HELPER if PPC64
  269. select IRQ_DOMAIN
  270. select IRQ_FORCED_THREADING
  271. select KASAN_VMALLOC if KASAN && EXECMEM
  272. select LOCK_MM_AND_FIND_VMA
  273. select MMU_GATHER_PAGE_SIZE
  274. select MMU_GATHER_RCU_TABLE_FREE
  275. select MMU_GATHER_MERGE_VMAS
  276. select MMU_LAZY_TLB_SHOOTDOWN if PPC_BOOK3S_64
  277. select MODULES_USE_ELF_RELA
  278. select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
  279. select NEED_PER_CPU_EMBED_FIRST_CHUNK if PPC64
  280. select NEED_PER_CPU_PAGE_FIRST_CHUNK if PPC64
  281. select NEED_SG_DMA_LENGTH
  282. select OF
  283. select OF_EARLY_FLATTREE
  284. select OLD_SIGACTION if PPC32
  285. select OLD_SIGSUSPEND
  286. select PCI_DOMAINS if PCI
  287. select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
  288. select PCI_SYSCALL if PCI
  289. select PPC_DAWR if PPC64
  290. select RTC_LIB
  291. select SPARSE_IRQ
  292. select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
  293. select SYSCTL_EXCEPTION_TRACE
  294. select THREAD_INFO_IN_TASK
  295. select TRACE_IRQFLAGS_SUPPORT
  296. select VDSO_GETRANDOM
  297. #
  298. # Please keep this list sorted alphabetically.
  299. #
  300. config PPC_BARRIER_NOSPEC
  301. bool
  302. default y
  303. depends on PPC_BOOK3S_64 || PPC_E500
  304. config PPC_HAS_LBARX_LHARX
  305. bool
  306. config EARLY_PRINTK
  307. bool
  308. default y
  309. config PANIC_TIMEOUT
  310. int
  311. default 180
  312. config COMPAT
  313. bool "Enable support for 32bit binaries"
  314. depends on PPC64
  315. default y if !CPU_LITTLE_ENDIAN
  316. select ARCH_WANT_OLD_COMPAT_IPC
  317. select COMPAT_OLD_SIGACTION
  318. config SCHED_OMIT_FRAME_POINTER
  319. bool
  320. default y
  321. config ARCH_MAY_HAVE_PC_FDC
  322. bool
  323. default PCI
  324. config PPC_UDBG_16550
  325. bool
  326. config GENERIC_TBSYNC
  327. bool
  328. default y if PPC32 && SMP
  329. config AUDIT_ARCH
  330. bool
  331. default y
  332. config GENERIC_BUG
  333. bool
  334. default y
  335. depends on BUG
  336. config GENERIC_BUG_RELATIVE_POINTERS
  337. def_bool y
  338. depends on GENERIC_BUG
  339. config SYS_SUPPORTS_APM_EMULATION
  340. default y if PMAC_APM_EMU
  341. bool
  342. config EPAPR_BOOT
  343. bool
  344. help
  345. Used to allow a board to specify it wants an ePAPR compliant wrapper.
  346. config DEFAULT_UIMAGE
  347. bool
  348. help
  349. Used to allow a board to specify it wants a uImage built by default
  350. config ARCH_HIBERNATION_POSSIBLE
  351. bool
  352. default y
  353. config ARCH_SUSPEND_POSSIBLE
  354. def_bool y
  355. depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
  356. (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
  357. || 44x
  358. config ARCH_SUSPEND_NONZERO_CPU
  359. def_bool y
  360. depends on PPC_POWERNV || PPC_PSERIES
  361. config ARCH_HAS_ADD_PAGES
  362. def_bool y
  363. depends on ARCH_ENABLE_MEMORY_HOTPLUG
  364. config PPC_DCR_NATIVE
  365. bool
  366. config PPC_DCR_MMIO
  367. bool
  368. config PPC_DCR
  369. bool
  370. depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
  371. default y
  372. config PPC_PCI_OF_BUS_MAP
  373. bool "Use pci_to_OF_bus_map (deprecated)"
  374. depends on PPC32
  375. depends on PPC_PMAC || PPC_CHRP
  376. help
  377. This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
  378. restricts the system to only having 256 PCI buses. On CHRP it also causes
  379. the "pci-OF-bus-map" property to be created in the device tree.
  380. If unsure, say "N".
  381. config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
  382. depends on PPC32
  383. depends on !PPC_PCI_OF_BUS_MAP
  384. bool "Assign PCI bus numbers from zero individually for each PCI domain"
  385. default y
  386. help
  387. By default on PPC32 were PCI bus numbers unique across all PCI domains.
  388. So system could have only 256 PCI buses independently of available
  389. PCI domains. When this option is enabled then PCI bus numbers are
  390. PCI domain dependent and each PCI controller on own domain can have
  391. 256 PCI buses, like it is on other Linux architectures.
  392. config PPC_OF_PLATFORM_PCI
  393. bool
  394. depends on PCI
  395. depends on PPC64 # not supported on 32 bits yet
  396. config ARCH_SUPPORTS_UPROBES
  397. def_bool y
  398. config PPC_ADV_DEBUG_REGS
  399. bool
  400. depends on BOOKE
  401. default y
  402. config PPC_ADV_DEBUG_IACS
  403. int
  404. depends on PPC_ADV_DEBUG_REGS
  405. default 4 if 44x
  406. default 2
  407. config PPC_ADV_DEBUG_DACS
  408. int
  409. depends on PPC_ADV_DEBUG_REGS
  410. default 2
  411. config PPC_ADV_DEBUG_DVCS
  412. int
  413. depends on PPC_ADV_DEBUG_REGS
  414. default 2 if 44x
  415. default 0
  416. config PPC_ADV_DEBUG_DAC_RANGE
  417. bool
  418. depends on PPC_ADV_DEBUG_REGS && 44x
  419. default y
  420. config PPC_DAWR
  421. bool
  422. config PGTABLE_LEVELS
  423. int
  424. default 2 if !PPC64
  425. default 4
  426. source "arch/powerpc/sysdev/Kconfig"
  427. source "arch/powerpc/platforms/Kconfig"
  428. menu "Kernel options"
  429. config HIGHMEM
  430. bool "High memory support"
  431. depends on PPC32
  432. select KMAP_LOCAL
  433. source "kernel/Kconfig.hz"
  434. config MATH_EMULATION
  435. bool "Math emulation"
  436. depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
  437. select PPC_FPU_REGS
  438. help
  439. Some PowerPC chips designed for embedded applications do not have
  440. a floating-point unit and therefore do not implement the
  441. floating-point instructions in the PowerPC instruction set. If you
  442. say Y here, the kernel will include code to emulate a floating-point
  443. unit, which will allow programs that use floating-point
  444. instructions to run.
  445. This is also useful to emulate missing (optional) instructions
  446. such as fsqrt on cores that do have an FPU but do not implement
  447. them (such as Freescale BookE).
  448. choice
  449. prompt "Math emulation options"
  450. default MATH_EMULATION_FULL
  451. depends on MATH_EMULATION
  452. config MATH_EMULATION_FULL
  453. bool "Emulate all the floating point instructions"
  454. help
  455. Select this option will enable the kernel to support to emulate
  456. all the floating point instructions. If your SoC doesn't have
  457. a FPU, you should select this.
  458. config MATH_EMULATION_HW_UNIMPLEMENTED
  459. bool "Just emulate the FPU unimplemented instructions"
  460. help
  461. Select this if you know there does have a hardware FPU on your
  462. SoC, but some floating point instructions are not implemented by that.
  463. endchoice
  464. config PPC_TRANSACTIONAL_MEM
  465. bool "Transactional Memory support for POWERPC"
  466. depends on PPC_BOOK3S_64
  467. depends on SMP
  468. select ALTIVEC
  469. select VSX
  470. help
  471. Support user-mode Transactional Memory on POWERPC.
  472. config PPC_UV
  473. bool "Ultravisor support"
  474. depends on KVM_BOOK3S_HV_POSSIBLE
  475. depends on DEVICE_PRIVATE
  476. default n
  477. help
  478. This option paravirtualizes the kernel to run in POWER platforms that
  479. supports the Protected Execution Facility (PEF). On such platforms,
  480. the ultravisor firmware runs at a privilege level above the
  481. hypervisor.
  482. If unsure, say "N".
  483. config LD_HEAD_STUB_CATCH
  484. bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
  485. depends on PPC64
  486. help
  487. Very large kernels can cause linker branch stubs to be generated by
  488. code in head_64.S, which moves the head text sections out of their
  489. specified location. This option can work around the problem.
  490. If unsure, say "N".
  491. config MPROFILE_KERNEL
  492. depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
  493. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
  494. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
  495. config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
  496. depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
  497. depends on $(cc-option,-fpatchable-function-entry=2)
  498. def_bool y if PPC32
  499. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
  500. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
  501. config HOTPLUG_CPU
  502. bool "Support for enabling/disabling CPUs"
  503. depends on SMP && (PPC_PSERIES || \
  504. PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
  505. help
  506. Say Y here to be able to disable and re-enable individual
  507. CPUs at runtime on SMP machines.
  508. Say N if you are unsure.
  509. config INTERRUPT_SANITIZE_REGISTERS
  510. bool "Clear gprs on interrupt arrival"
  511. depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER
  512. default PPC_BOOK3E_64 || PPC_PSERIES || PPC_POWERNV
  513. help
  514. Reduce the influence of user register state on interrupt handlers and
  515. syscalls through clearing user state from registers before handling
  516. the exception.
  517. config PPC_QUEUED_SPINLOCKS
  518. bool "Queued spinlocks" if EXPERT
  519. depends on SMP
  520. default PPC_BOOK3S_64
  521. help
  522. Say Y here to use queued spinlocks which give better scalability and
  523. fairness on large SMP and NUMA systems without harming single threaded
  524. performance.
  525. config ARCH_CPU_PROBE_RELEASE
  526. def_bool y
  527. depends on HOTPLUG_CPU
  528. config PPC64_SUPPORTS_MEMORY_FAILURE
  529. bool "Add support for memory hwpoison"
  530. depends on PPC_BOOK3S_64
  531. default "y" if PPC_POWERNV
  532. select ARCH_SUPPORTS_MEMORY_FAILURE
  533. config ARCH_SUPPORTS_KEXEC
  534. def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)
  535. config ARCH_SUPPORTS_KEXEC_FILE
  536. def_bool PPC64
  537. config ARCH_SUPPORTS_KEXEC_PURGATORY
  538. def_bool y
  539. config ARCH_SELECTS_KEXEC_FILE
  540. def_bool y
  541. depends on KEXEC_FILE
  542. select KEXEC_ELF
  543. select HAVE_IMA_KEXEC if IMA
  544. config PPC64_BIG_ENDIAN_ELF_ABI_V2
  545. # Option is available to BFD, but LLD does not support ELFv1 so this is
  546. # always true there.
  547. prompt "Build big-endian kernel using ELF ABI V2" if LD_IS_BFD && EXPERT
  548. def_bool y
  549. depends on PPC64 && CPU_BIG_ENDIAN
  550. depends on CC_HAS_ELFV2
  551. help
  552. This builds the kernel image using the "Power Architecture 64-Bit ELF
  553. V2 ABI Specification", which has a reduced stack overhead and faster
  554. function calls. This internal kernel ABI option does not affect
  555. userspace compatibility.
  556. The V2 ABI is standard for 64-bit little-endian, but for big-endian
  557. it is less well tested by kernel and toolchain. However some distros
  558. build userspace this way, and it can produce a functioning kernel.
  559. config RELOCATABLE
  560. bool "Build a relocatable kernel"
  561. depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
  562. select NONSTATIC_KERNEL
  563. help
  564. This builds a kernel image that is capable of running at the
  565. location the kernel is loaded at. For ppc32, there is no any
  566. alignment restrictions, and this feature is a superset of
  567. DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
  568. 16k-aligned base address. The kernel is linked as a
  569. position-independent executable (PIE) and contains dynamic relocations
  570. which are processed early in the bootup process.
  571. One use is for the kexec on panic case where the recovery kernel
  572. must live at a different physical address than the primary
  573. kernel.
  574. Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
  575. it has been loaded at and the compile time physical addresses
  576. CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
  577. setting can still be useful to bootwrappers that need to know the
  578. load address of the kernel (eg. u-boot/mkimage).
  579. config RANDOMIZE_BASE
  580. bool "Randomize the address of the kernel image"
  581. depends on PPC_85xx && FLATMEM
  582. depends on RELOCATABLE
  583. help
  584. Randomizes the virtual address at which the kernel image is
  585. loaded, as a security feature that deters exploit attempts
  586. relying on knowledge of the location of kernel internals.
  587. If unsure, say Y.
  588. config RELOCATABLE_TEST
  589. bool "Test relocatable kernel"
  590. depends on (PPC64 && RELOCATABLE)
  591. help
  592. This runs the relocatable kernel at the address it was initially
  593. loaded at, which tends to be non-zero and therefore test the
  594. relocation code.
  595. config ARCH_SUPPORTS_CRASH_DUMP
  596. def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
  597. config ARCH_DEFAULT_CRASH_DUMP
  598. bool
  599. default y if !PPC_BOOK3S_32
  600. config ARCH_SELECTS_CRASH_DUMP
  601. def_bool y
  602. depends on CRASH_DUMP
  603. select RELOCATABLE if PPC64 || 44x || PPC_85xx
  604. config ARCH_SUPPORTS_CRASH_HOTPLUG
  605. def_bool y
  606. depends on PPC64
  607. config FA_DUMP
  608. bool "Firmware-assisted dump"
  609. depends on CRASH_DUMP && PPC64 && (PPC_RTAS || PPC_POWERNV)
  610. help
  611. A robust mechanism to get reliable kernel crash dump with
  612. assistance from firmware. This approach does not use kexec,
  613. instead firmware assists in booting the capture kernel
  614. while preserving memory contents. Firmware-assisted dump
  615. is meant to be a kdump replacement offering robustness and
  616. speed not possible without system firmware assistance.
  617. If unsure, say "y". Only special kernels like petitboot may
  618. need to say "N" here.
  619. config PRESERVE_FA_DUMP
  620. bool "Preserve Firmware-assisted dump"
  621. depends on PPC64 && PPC_POWERNV && !FA_DUMP
  622. help
  623. On a kernel with FA_DUMP disabled, this option helps to preserve
  624. crash data from a previously crash'ed kernel. Useful when the next
  625. memory preserving kernel boot would process this crash data.
  626. Petitboot kernel is the typical usecase for this option.
  627. config OPAL_CORE
  628. bool "Export OPAL memory as /sys/firmware/opal/core"
  629. depends on PPC64 && PPC_POWERNV
  630. help
  631. This option uses the MPIPL support in firmware to provide an
  632. ELF core of OPAL memory after a crash. The ELF core is exported
  633. as /sys/firmware/opal/core file which is helpful in debugging
  634. OPAL crashes using GDB.
  635. config IRQ_ALL_CPUS
  636. bool "Distribute interrupts on all CPUs by default"
  637. depends on SMP
  638. help
  639. This option gives the kernel permission to distribute IRQs across
  640. multiple CPUs. Saying N here will route all IRQs to the first
  641. CPU. Generally saying Y is safe, although some problems have been
  642. reported with SMP Power Macintoshes with this option enabled.
  643. config NUMA
  644. bool "NUMA Memory Allocation and Scheduler Support"
  645. depends on PPC64 && SMP
  646. default y if PPC_PSERIES || PPC_POWERNV
  647. select USE_PERCPU_NUMA_NODE_ID
  648. help
  649. Enable NUMA (Non-Uniform Memory Access) support.
  650. The kernel will try to allocate memory used by a CPU on the
  651. local memory controller of the CPU and add some more
  652. NUMA awareness to the kernel.
  653. config NODES_SHIFT
  654. int
  655. default "8" if PPC64
  656. default "4"
  657. depends on NUMA
  658. config HAVE_MEMORYLESS_NODES
  659. def_bool y
  660. depends on NUMA
  661. config ARCH_SELECT_MEMORY_MODEL
  662. def_bool y
  663. depends on PPC64
  664. config ARCH_FLATMEM_ENABLE
  665. def_bool y
  666. depends on (PPC64 && !NUMA) || PPC32
  667. config ARCH_SPARSEMEM_ENABLE
  668. def_bool y
  669. depends on PPC64
  670. select SPARSEMEM_VMEMMAP_ENABLE
  671. config ARCH_SPARSEMEM_DEFAULT
  672. def_bool y
  673. depends on PPC_BOOK3S_64
  674. config ILLEGAL_POINTER_VALUE
  675. hex
  676. # This is roughly half way between the top of user space and the bottom
  677. # of kernel space, which seems about as good as we can get.
  678. default 0x5deadbeef0000000 if PPC64
  679. default 0
  680. config ARCH_MEMORY_PROBE
  681. def_bool y
  682. depends on MEMORY_HOTPLUG
  683. choice
  684. prompt "Page size"
  685. default PPC_64K_PAGES if PPC_BOOK3S_64
  686. default PPC_4K_PAGES
  687. help
  688. Select the kernel logical page size. Increasing the page size
  689. will reduce software overhead at each page boundary, allow
  690. hardware prefetch mechanisms to be more effective, and allow
  691. larger dma transfers increasing IO efficiency and reducing
  692. overhead. However the utilization of memory will increase.
  693. For example, each cached file will using a multiple of the
  694. page size to hold its contents and the difference between the
  695. end of file and the end of page is wasted.
  696. Some dedicated systems, such as software raid serving with
  697. accelerated calculations, have shown significant increases.
  698. If you configure a 64 bit kernel for 64k pages but the
  699. processor does not support them, then the kernel will simulate
  700. them with 4k pages, loading them on demand, but with the
  701. reduced software overhead and larger internal fragmentation.
  702. For the 32 bit kernel, a large page option will not be offered
  703. unless it is supported by the configured processor.
  704. If unsure, choose 4K_PAGES.
  705. config PPC_4K_PAGES
  706. bool "4k page size"
  707. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  708. select HAVE_PAGE_SIZE_4KB
  709. config PPC_16K_PAGES
  710. bool "16k page size"
  711. depends on 44x || PPC_8xx
  712. select HAVE_PAGE_SIZE_16KB
  713. config PPC_64K_PAGES
  714. bool "64k page size"
  715. depends on 44x || PPC_BOOK3S_64
  716. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  717. select HAVE_PAGE_SIZE_64KB
  718. config PPC_256K_PAGES
  719. bool "256k page size (Requires non-standard binutils settings)"
  720. depends on 44x && !PPC_47x
  721. select HAVE_PAGE_SIZE_256KB
  722. help
  723. Make the page size 256k.
  724. The kernel will only be able to run applications that have been
  725. compiled with '-zmax-page-size' set to 256K (the default is 64K) using
  726. binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
  727. definition from 0x10000 to 0x40000 in older versions.
  728. endchoice
  729. config THREAD_SHIFT
  730. int "Thread shift" if EXPERT
  731. range 13 15
  732. default "15" if PPC_256K_PAGES
  733. default "15" if PPC_PSERIES || PPC_POWERNV
  734. default "14" if PPC64
  735. default "13"
  736. help
  737. Used to define the stack size. The default is almost always what you
  738. want. Only change this if you know what you are doing.
  739. config DATA_SHIFT_BOOL
  740. bool "Set custom data alignment"
  741. depends on ADVANCED_OPTIONS
  742. depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
  743. depends on (PPC_8xx && !PIN_TLB_DATA && (!STRICT_KERNEL_RWX || !PIN_TLB_TEXT)) || \
  744. PPC_BOOK3S_32 || PPC_85xx
  745. help
  746. This option allows you to set the kernel data alignment. When
  747. RAM is mapped by blocks, the alignment needs to fit the size and
  748. number of possible blocks. The default should be OK for most configs.
  749. Say N here unless you know what you are doing.
  750. config DATA_SHIFT
  751. int "Data shift" if DATA_SHIFT_BOOL
  752. default 24 if STRICT_KERNEL_RWX && PPC64
  753. range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
  754. range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
  755. range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
  756. default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
  757. default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
  758. default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && \
  759. (PIN_TLB_DATA || PIN_TLB_TEXT)
  760. default 19 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
  761. default 24 if STRICT_KERNEL_RWX && PPC_85xx
  762. default PAGE_SHIFT
  763. help
  764. On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
  765. Smaller is the alignment, greater is the number of necessary DBATs.
  766. On 8xx, large pages (512kb or 8M) are used to map kernel linear
  767. memory. Aligning to 8M reduces TLB misses as only 8M pages are used
  768. in that case. If PIN_TLB is selected, it must be aligned to 8M as
  769. 8M pages will be pinned.
  770. config ARCH_FORCE_MAX_ORDER
  771. int "Order of maximal physically contiguous allocations"
  772. range 7 8 if PPC64 && PPC_64K_PAGES
  773. default "8" if PPC64 && PPC_64K_PAGES
  774. range 12 12 if PPC64 && !PPC_64K_PAGES
  775. default "12" if PPC64 && !PPC_64K_PAGES
  776. range 8 10 if PPC32 && PPC_16K_PAGES
  777. default "8" if PPC32 && PPC_16K_PAGES
  778. range 6 10 if PPC32 && PPC_64K_PAGES
  779. default "6" if PPC32 && PPC_64K_PAGES
  780. range 4 10 if PPC32 && PPC_256K_PAGES
  781. default "4" if PPC32 && PPC_256K_PAGES
  782. range 10 12
  783. default "10"
  784. help
  785. The kernel page allocator limits the size of maximal physically
  786. contiguous allocations. The limit is called MAX_PAGE_ORDER and it
  787. defines the maximal power of two of number of pages that can be
  788. allocated as a single contiguous block. This option allows
  789. overriding the default setting when ability to allocate very
  790. large blocks of physically contiguous memory is required.
  791. The page size is not necessarily 4KB. For example, on 64-bit
  792. systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
  793. this in mind when choosing a value for this option.
  794. Don't change if unsure.
  795. config PPC_SUBPAGE_PROT
  796. bool "Support setting protections for 4k subpages (subpage_prot syscall)"
  797. default n
  798. depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
  799. help
  800. This option adds support for system call to allow user programs
  801. to set access permissions (read/write, readonly, or no access)
  802. on the 4k subpages of each 64k page.
  803. If unsure, say N here.
  804. config PPC_PROT_SAO_LPAR
  805. bool "Support PROT_SAO mappings in LPARs"
  806. depends on PPC_BOOK3S_64
  807. help
  808. This option adds support for PROT_SAO mappings from userspace
  809. inside LPARs on supported CPUs.
  810. This may cause issues when performing guest migration from
  811. a CPU that supports SAO to one that does not.
  812. If unsure, say N here.
  813. config PPC_COPRO_BASE
  814. bool
  815. config SCHED_SMT
  816. bool "SMT (Hyperthreading) scheduler support"
  817. depends on PPC64 && SMP
  818. help
  819. SMT scheduler support improves the CPU scheduler's decision making
  820. when dealing with POWER5 cpus at a cost of slightly increased
  821. overhead in some places. If unsure say N here.
  822. config PPC_DENORMALISATION
  823. bool "PowerPC denormalisation exception handling"
  824. depends on PPC_BOOK3S_64
  825. default "y" if PPC_POWERNV
  826. help
  827. Add support for handling denormalisation of single precision
  828. values. Useful for bare metal only. If unsure say Y here.
  829. config CMDLINE
  830. string "Initial kernel command string"
  831. default ""
  832. help
  833. On some platforms, there is currently no way for the boot loader to
  834. pass arguments to the kernel. For these platforms, you can supply
  835. some command-line options at build time by entering them here. In
  836. most cases you will need to specify the root device here.
  837. choice
  838. prompt "Kernel command line type"
  839. depends on CMDLINE != ""
  840. default CMDLINE_FROM_BOOTLOADER
  841. config CMDLINE_FROM_BOOTLOADER
  842. bool "Use bootloader kernel arguments if available"
  843. help
  844. Uses the command-line options passed by the boot loader. If
  845. the boot loader doesn't provide any, the default kernel command
  846. string provided in CMDLINE will be used.
  847. config CMDLINE_EXTEND
  848. bool "Extend bootloader kernel arguments"
  849. help
  850. The command-line arguments provided by the boot loader will be
  851. appended to the default kernel command string.
  852. config CMDLINE_FORCE
  853. bool "Always use the default kernel command string"
  854. help
  855. Always use the default kernel command string, even if the boot
  856. loader passes other arguments to the kernel.
  857. This is useful if you cannot or don't want to change the
  858. command-line options your boot loader passes to the kernel.
  859. endchoice
  860. config EXTRA_TARGETS
  861. string "Additional default image types"
  862. help
  863. List additional targets to be built by the bootwrapper here (separated
  864. by spaces). This is useful for targets that depend of device tree
  865. files in the .dts directory.
  866. Targets in this list will be build as part of the default build
  867. target, or when the user does a 'make zImage' or a
  868. 'make zImage.initrd'.
  869. If unsure, leave blank
  870. config ARCH_WANTS_FREEZER_CONTROL
  871. def_bool y
  872. depends on ADB_PMU
  873. source "kernel/power/Kconfig"
  874. config PPC_MEM_KEYS
  875. prompt "PowerPC Memory Protection Keys"
  876. def_bool y
  877. depends on PPC_BOOK3S_64
  878. depends on PPC_64S_HASH_MMU
  879. select ARCH_USES_HIGH_VMA_FLAGS
  880. select ARCH_HAS_PKEYS
  881. help
  882. Memory Protection Keys provides a mechanism for enforcing
  883. page-based protections, but without requiring modification of the
  884. page tables when an application changes protection domains.
  885. For details, see Documentation/core-api/protection-keys.rst
  886. If unsure, say y.
  887. config ARCH_PKEY_BITS
  888. int
  889. default 5
  890. config PPC_SECURE_BOOT
  891. prompt "Enable secure boot support"
  892. bool
  893. depends on PPC_POWERNV || PPC_PSERIES
  894. depends on IMA_ARCH_POLICY
  895. imply IMA_SECURE_AND_OR_TRUSTED_BOOT
  896. select PSERIES_PLPKS if PPC_PSERIES
  897. help
  898. Systems with firmware secure boot enabled need to define security
  899. policies to extend secure boot to the OS. This config allows a user
  900. to enable OS secure boot on systems that have firmware support for
  901. it. If in doubt say N.
  902. config PPC_SECVAR_SYSFS
  903. bool "Enable sysfs interface for POWER secure variables"
  904. default y
  905. depends on PPC_SECURE_BOOT
  906. depends on SYSFS
  907. help
  908. POWER secure variables are managed and controlled by firmware.
  909. These variables are exposed to userspace via sysfs to enable
  910. read/write operations on these variables. Say Y if you have
  911. secure boot enabled and want to expose variables to userspace.
  912. endmenu
  913. config ISA_DMA_API
  914. bool
  915. default PCI
  916. menu "Bus options"
  917. config ISA
  918. bool "Support for ISA-bus hardware"
  919. depends on PPC_CHRP
  920. select PPC_I8259
  921. help
  922. Find out whether you have ISA slots on your motherboard. ISA is the
  923. name of a bus system, i.e. the way the CPU talks to the other stuff
  924. inside your box. If you have an Apple machine, say N here; if you
  925. have an IBM RS/6000 or pSeries machine, say Y. If you have an
  926. embedded board, consult your board documentation.
  927. config GENERIC_ISA_DMA
  928. bool
  929. depends on ISA_DMA_API
  930. default y
  931. config PPC_INDIRECT_PCI
  932. bool
  933. depends on PCI
  934. default y if 44x
  935. config SBUS
  936. bool
  937. config FSL_SOC
  938. bool
  939. config FSL_PCI
  940. bool
  941. select ARCH_HAS_DMA_SET_MASK
  942. select PPC_INDIRECT_PCI
  943. select PCI_QUIRKS
  944. config FSL_PMC
  945. bool
  946. default y
  947. depends on SUSPEND && (PPC_85xx || PPC_86xx)
  948. help
  949. Freescale MPC85xx/MPC86xx power management controller support
  950. (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
  951. config PPC4xx_CPM
  952. bool
  953. default y
  954. depends on SUSPEND && 44x
  955. help
  956. PPC4xx Clock Power Management (CPM) support (suspend/resume).
  957. It also enables support for two different idle states (idle-wait
  958. and idle-doze).
  959. config FSL_LBC
  960. bool "Freescale Local Bus support"
  961. help
  962. Enables reporting of errors from the Freescale local bus
  963. controller. Also contains some common code used by
  964. drivers for specific local bus peripherals.
  965. config FSL_GTM
  966. bool
  967. depends on PPC_83xx || QUICC_ENGINE || CPM2
  968. help
  969. Freescale General-purpose Timers support
  970. config FSL_RIO
  971. bool "Freescale Embedded SRIO Controller support"
  972. depends on RAPIDIO = y && HAVE_RAPIDIO
  973. default "n"
  974. help
  975. Include support for RapidIO controller on Freescale embedded
  976. processors (MPC8548, MPC8641, etc).
  977. endmenu
  978. config NONSTATIC_KERNEL
  979. bool
  980. menu "Advanced setup"
  981. depends on PPC32
  982. config ADVANCED_OPTIONS
  983. bool "Prompt for advanced kernel configuration options"
  984. help
  985. This option will enable prompting for a variety of advanced kernel
  986. configuration options. These options can cause the kernel to not
  987. work if they are set incorrectly, but can be used to optimize certain
  988. aspects of kernel memory management.
  989. Unless you know what you are doing, say N here.
  990. comment "Default settings for advanced configuration options are used"
  991. depends on !ADVANCED_OPTIONS
  992. config LOWMEM_SIZE_BOOL
  993. bool "Set maximum low memory"
  994. depends on ADVANCED_OPTIONS
  995. help
  996. This option allows you to set the maximum amount of memory which
  997. will be used as "low memory", that is, memory which the kernel can
  998. access directly, without having to set up a kernel virtual mapping.
  999. This can be useful in optimizing the layout of kernel virtual
  1000. memory.
  1001. Say N here unless you know what you are doing.
  1002. config LOWMEM_SIZE
  1003. hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
  1004. default "0x30000000"
  1005. config LOWMEM_CAM_NUM_BOOL
  1006. bool "Set number of CAMs to use to map low memory"
  1007. depends on ADVANCED_OPTIONS && PPC_85xx
  1008. help
  1009. This option allows you to set the maximum number of CAM slots that
  1010. will be used to map low memory. There are a limited number of slots
  1011. available and even more limited number that will fit in the L1 MMU.
  1012. However, using more entries will allow mapping more low memory. This
  1013. can be useful in optimizing the layout of kernel virtual memory.
  1014. Say N here unless you know what you are doing.
  1015. config LOWMEM_CAM_NUM
  1016. depends on PPC_85xx
  1017. int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
  1018. default 3 if !STRICT_KERNEL_RWX
  1019. default 9 if DATA_SHIFT >= 24
  1020. default 12 if DATA_SHIFT >= 22
  1021. default 15
  1022. config DYNAMIC_MEMSTART
  1023. bool "Enable page aligned dynamic load address for kernel"
  1024. depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
  1025. select NONSTATIC_KERNEL
  1026. help
  1027. This option enables the kernel to be loaded at any page aligned
  1028. physical address. The kernel creates a mapping from KERNELBASE to
  1029. the address where the kernel is loaded. The page size here implies
  1030. the TLB page size of the mapping for kernel on the particular platform.
  1031. Please refer to the init code for finding the TLB page size.
  1032. DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
  1033. kernel image, where the only restriction is the page aligned kernel
  1034. load address. When this option is enabled, the compile time physical
  1035. address CONFIG_PHYSICAL_START is ignored.
  1036. This option is overridden by CONFIG_RELOCATABLE
  1037. config PAGE_OFFSET_BOOL
  1038. bool "Set custom page offset address"
  1039. depends on ADVANCED_OPTIONS
  1040. help
  1041. This option allows you to set the kernel virtual address at which
  1042. the kernel will map low memory. This can be useful in optimizing
  1043. the virtual memory layout of the system.
  1044. Say N here unless you know what you are doing.
  1045. config PAGE_OFFSET
  1046. hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
  1047. default "0xc0000000"
  1048. config KERNEL_START_BOOL
  1049. bool "Set custom kernel base address"
  1050. depends on ADVANCED_OPTIONS
  1051. help
  1052. This option allows you to set the kernel virtual address at which
  1053. the kernel will be loaded. Normally this should match PAGE_OFFSET
  1054. however there are times (like kdump) that one might not want them
  1055. to be the same.
  1056. Say N here unless you know what you are doing.
  1057. config KERNEL_START
  1058. hex "Virtual address of kernel base" if KERNEL_START_BOOL
  1059. default PAGE_OFFSET if PAGE_OFFSET_BOOL
  1060. default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
  1061. default "0xc0000000"
  1062. config PHYSICAL_START_BOOL
  1063. bool "Set physical address where the kernel is loaded"
  1064. depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
  1065. help
  1066. This gives the physical address where the kernel is loaded.
  1067. Say N here unless you know what you are doing.
  1068. config PHYSICAL_START
  1069. hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
  1070. default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
  1071. default "0x00000000"
  1072. config PHYSICAL_ALIGN
  1073. hex
  1074. default "0x04000000" if PPC_85xx
  1075. help
  1076. This value puts the alignment restrictions on physical address
  1077. where kernel is loaded and run from. Kernel is compiled for an
  1078. address which meets above alignment restriction.
  1079. config TASK_SIZE_BOOL
  1080. bool "Set custom user task size"
  1081. depends on ADVANCED_OPTIONS
  1082. help
  1083. This option allows you to set the amount of virtual address space
  1084. allocated to user tasks. This can be useful in optimizing the
  1085. virtual memory layout of the system.
  1086. Say N here unless you know what you are doing.
  1087. config TASK_SIZE
  1088. hex "Size of user task space" if TASK_SIZE_BOOL
  1089. default "0x80000000" if PPC_8xx
  1090. default "0xb0000000" if PPC_BOOK3S_32 && EXECMEM
  1091. default "0xc0000000"
  1092. config MODULES_SIZE_BOOL
  1093. bool "Set custom size for modules/execmem area"
  1094. depends on EXECMEM && ADVANCED_OPTIONS
  1095. help
  1096. This option allows you to set the size of kernel virtual address
  1097. space dedicated for modules/execmem.
  1098. For the time being it is only for 8xx and book3s/32. Other
  1099. platform share it with vmalloc space.
  1100. Say N here unless you know what you are doing.
  1101. config MODULES_SIZE
  1102. int "Size of modules/execmem area (In Mbytes)" if MODULES_SIZE_BOOL
  1103. range 1 256 if EXECMEM
  1104. default 64 if EXECMEM && PPC_BOOK3S_32
  1105. default 32 if EXECMEM && PPC_8xx
  1106. default 0
  1107. endmenu
  1108. if PPC64
  1109. # This value must have zeroes in the bottom 60 bits otherwise lots will break
  1110. config PAGE_OFFSET
  1111. hex
  1112. default "0xc000000000000000"
  1113. config KERNEL_START
  1114. hex
  1115. default "0xc000000000000000"
  1116. config PHYSICAL_START
  1117. hex
  1118. default "0x00000000"
  1119. endif
  1120. config PPC_LIB_RHEAP
  1121. bool
  1122. source "arch/powerpc/kvm/Kconfig"
  1123. source "kernel/livepatch/Kconfig"