1# SPDX-License-Identifier: GPL-2.0 2 3config PPC_DISABLE_WERROR 4 bool "Don't build arch/powerpc code with -Werror" 5 default n 6 help 7 This option tells the compiler NOT to build the code under 8 arch/powerpc with the -Werror flag (which means warnings 9 are treated as errors). 10 11 Only enable this if you are hitting a build failure in the 12 arch/powerpc code caused by a warning, and you don't feel 13 inclined to fix it. 14 15config PPC_WERROR 16 bool 17 depends on !PPC_DISABLE_WERROR 18 default y 19 20config PRINT_STACK_DEPTH 21 int "Stack depth to print" if DEBUG_KERNEL 22 default 64 23 help 24 This option allows you to set the stack depth that the kernel 25 prints in stack traces. This can be useful if your display is 26 too small and stack traces cause important information to 27 scroll off the screen. 28 29config HCALL_STATS 30 bool "Hypervisor call instrumentation" 31 depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS 32 help 33 Adds code to keep track of the number of hypervisor calls made and 34 the amount of time spent in hypervisor calls. Wall time spent in 35 each call is always calculated, and if available CPU cycles spent 36 are also calculated. A directory named hcall_inst is added at the 37 root of the debugfs filesystem. Within the hcall_inst directory 38 are files that contain CPU specific call statistics. 39 40 This option will add a small amount of overhead to all hypervisor 41 calls. 42 43config PPC_EMULATED_STATS 44 bool "Emulated instructions tracking" 45 depends on DEBUG_FS 46 help 47 Adds code to keep track of the number of instructions that are 48 emulated by the in-kernel emulator. Counters for the various classes 49 of emulated instructions are available under 50 powerpc/emulated_instructions/ in the root of the debugfs file 51 system. Optionally (controlled by 52 powerpc/emulated_instructions/do_warn in debugfs), rate-limited 53 warnings can be printed to the console when instructions are 54 emulated. 55 56config CODE_PATCHING_SELFTEST 57 bool "Run self-tests of the code-patching code" 58 depends on DEBUG_KERNEL 59 default n 60 61config JUMP_LABEL_FEATURE_CHECKS 62 bool "Enable use of jump label for cpu/mmu_has_feature()" 63 depends on JUMP_LABEL 64 default y 65 help 66 Selecting this options enables use of jump labels for some internal 67 feature checks. This should generate more optimal code for those 68 checks. 69 70config JUMP_LABEL_FEATURE_CHECK_DEBUG 71 bool "Do extra check on feature fixup calls" 72 depends on DEBUG_KERNEL && JUMP_LABEL_FEATURE_CHECKS 73 default n 74 help 75 This tries to catch incorrect usage of cpu_has_feature() and 76 mmu_has_feature() in the code. 77 78 If you don't know what this means, say N. 79 80config FTR_FIXUP_SELFTEST 81 bool "Run self-tests of the feature-fixup code" 82 depends on DEBUG_KERNEL 83 default n 84 85config MSI_BITMAP_SELFTEST 86 bool "Run self-tests of the MSI bitmap code" 87 depends on DEBUG_KERNEL 88 default n 89 90config PPC_IRQ_SOFT_MASK_DEBUG 91 bool "Include extra checks for powerpc irq soft masking" 92 default n 93 94config XMON 95 bool "Include xmon kernel debugger" 96 depends on DEBUG_KERNEL 97 help 98 Include in-kernel hooks for the xmon kernel monitor/debugger. 99 Unless you are intending to debug the kernel, say N here. 100 Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise 101 nothing will appear on the screen (xmon writes directly to the 102 framebuffer memory). 103 The cmdline option 'xmon' or 'xmon=early' will drop into xmon 104 very early during boot. 'xmon=on' will just enable the xmon 105 debugger hooks. 'xmon=off' will disable the debugger hooks 106 if CONFIG_XMON_DEFAULT is set. 107 xmon will print a backtrace on the very first invocation. 108 'xmon=nobt' will disable this autobacktrace. 109 110config XMON_DEFAULT 111 bool "Enable xmon by default" 112 depends on XMON 113 help 114 xmon is normally disabled unless booted with 'xmon=on'. 115 Use 'xmon=off' to disable xmon init during runtime. 116 117config XMON_DISASSEMBLY 118 bool "Include disassembly support in xmon" 119 depends on XMON 120 default y 121 help 122 Include support for disassembling in xmon. You probably want 123 to say Y here, unless you're building for a memory-constrained 124 system. 125 126config DEBUGGER 127 bool 128 depends on KGDB || XMON 129 default y 130 131config BDI_SWITCH 132 bool "Include BDI-2000 user context switcher" 133 depends on DEBUG_KERNEL && PPC32 134 help 135 Include in-kernel support for the Abatron BDI2000 debugger. 136 Unless you are intending to debug the kernel with one of these 137 machines, say N here. 138 139config BOOTX_TEXT 140 bool "Support for early boot text console (BootX or OpenFirmware only)" 141 depends on PPC_BOOK3S 142 help 143 Say Y here to see progress messages from the boot firmware in text 144 mode. Requires either BootX or Open Firmware. 145 146config PPC_EARLY_DEBUG 147 bool "Early debugging (dangerous)" 148 help 149 Say Y to enable some early debugging facilities that may be available 150 for your processor/board combination. Those facilities are hacks 151 intended to debug problems early during boot, this should not be 152 enabled in a production kernel. 153 Note that enabling this will also cause the kernel default log level 154 to be pushed to max automatically very early during boot 155 156choice 157 prompt "Early debugging console" 158 depends on PPC_EARLY_DEBUG 159 help 160 Use the selected console for early debugging. Careful, if you 161 enable debugging for the wrong type of machine your kernel 162 _will not boot_. 163 164config PPC_EARLY_DEBUG_BOOTX 165 bool "BootX or OpenFirmware" 166 depends on BOOTX_TEXT 167 help 168 Select this to enable early debugging for a machine using BootX 169 or OpenFirmware. 170 171config PPC_EARLY_DEBUG_LPAR 172 bool "LPAR HV Console" 173 depends on PPC_PSERIES && HVC_CONSOLE 174 help 175 Select this to enable early debugging for a machine with a HVC 176 console on vterm 0. 177 178config PPC_EARLY_DEBUG_LPAR_HVSI 179 bool "LPAR HVSI Console" 180 depends on PPC_PSERIES && HVC_CONSOLE 181 help 182 Select this to enable early debugging for a machine with a HVSI 183 console on a specified vterm. 184 185config PPC_EARLY_DEBUG_G5 186 bool "Apple G5" 187 depends on PPC_PMAC64 188 help 189 Select this to enable early debugging for Apple G5 machines. 190 191config PPC_EARLY_DEBUG_RTAS_PANEL 192 bool "RTAS Panel" 193 depends on PPC_RTAS 194 help 195 Select this to enable early debugging via the RTAS panel. 196 197config PPC_EARLY_DEBUG_RTAS_CONSOLE 198 bool "RTAS Console" 199 depends on PPC_RTAS 200 select UDBG_RTAS_CONSOLE 201 help 202 Select this to enable early debugging via the RTAS console. 203 204config PPC_EARLY_DEBUG_MAPLE 205 bool "Maple real mode" 206 depends on PPC_MAPLE 207 help 208 Select this to enable early debugging for Maple. 209 210config PPC_EARLY_DEBUG_PAS_REALMODE 211 bool "PA Semi real mode" 212 depends on PPC_PASEMI 213 help 214 Select this to enable early debugging for PA Semi. 215 Output will be on UART0. 216 217config PPC_EARLY_DEBUG_44x 218 bool "Early serial debugging for IBM/AMCC 44x CPUs" 219 depends on 44x 220 help 221 Select this to enable early debugging for IBM 44x chips via the 222 inbuilt serial port. If you enable this, ensure you set 223 PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board. 224 225config PPC_EARLY_DEBUG_40x 226 bool "Early serial debugging for IBM/AMCC 40x CPUs" 227 depends on 40x 228 help 229 Select this to enable early debugging for IBM 40x chips via the 230 inbuilt serial port. This works on chips with a 16550 compatible 231 UART. Xilinx chips with uartlite cannot use this option. 232 233config PPC_EARLY_DEBUG_CPM 234 bool "Early serial debugging for Freescale CPM-based serial ports" 235 depends on SERIAL_CPM 236 help 237 Select this to enable early debugging for Freescale chips 238 using a CPM-based serial port. This assumes that the bootwrapper 239 has run, and set up the CPM in a particular way. 240 241config PPC_EARLY_DEBUG_USBGECKO 242 bool "Early debugging through the USB Gecko adapter" 243 depends on GAMECUBE_COMMON 244 select USBGECKO_UDBG 245 help 246 Select this to enable early debugging for Nintendo GameCube/Wii 247 consoles via an external USB Gecko adapter. 248 249config PPC_EARLY_DEBUG_PS3GELIC 250 bool "Early debugging through the PS3 Ethernet port" 251 depends on PPC_PS3 252 select PS3GELIC_UDBG 253 help 254 Select this to enable early debugging for the PlayStation3 via 255 UDP broadcasts sent out through the Ethernet port. 256 257config PPC_EARLY_DEBUG_OPAL_RAW 258 bool "OPAL raw console" 259 depends on HVC_OPAL 260 help 261 Select this to enable early debugging for the PowerNV platform 262 using a "raw" console 263 264config PPC_EARLY_DEBUG_OPAL_HVSI 265 bool "OPAL hvsi console" 266 depends on HVC_OPAL 267 help 268 Select this to enable early debugging for the PowerNV platform 269 using an "hvsi" console 270 271config PPC_EARLY_DEBUG_MEMCONS 272 bool "In memory console" 273 help 274 Select this to enable early debugging using an in memory console. 275 This console provides input and output buffers stored within the 276 kernel BSS and should be safe to select on any system. A debugger 277 can then be used to read kernel output or send input to the console. 278endchoice 279 280config PPC_MEMCONS_OUTPUT_SIZE 281 int "In memory console output buffer size" 282 depends on PPC_EARLY_DEBUG_MEMCONS 283 default 4096 284 help 285 Selects the size of the output buffer (in bytes) of the in memory 286 console. 287 288config PPC_MEMCONS_INPUT_SIZE 289 int "In memory console input buffer size" 290 depends on PPC_EARLY_DEBUG_MEMCONS 291 default 128 292 help 293 Selects the size of the input buffer (in bytes) of the in memory 294 console. 295 296config PPC_EARLY_DEBUG_OPAL 297 def_bool y 298 depends on PPC_EARLY_DEBUG_OPAL_RAW || PPC_EARLY_DEBUG_OPAL_HVSI 299 300 301config PPC_EARLY_DEBUG_HVSI_VTERMNO 302 hex "vterm number to use with early debug HVSI" 303 depends on PPC_EARLY_DEBUG_LPAR_HVSI 304 default "0x30000000" 305 help 306 You probably want 0x30000000 for your first serial port and 307 0x30000001 for your second one 308 309config PPC_EARLY_DEBUG_OPAL_VTERMNO 310 hex "vterm number to use with OPAL early debug" 311 depends on PPC_EARLY_DEBUG_OPAL 312 default "0" 313 help 314 This correspond to which /dev/hvcN you want to use for early 315 debug. 316 317 On OPAL v2, this will be 0 for network console and 1 or 2 for 318 the machine built-in serial ports. 319 320config PPC_EARLY_DEBUG_44x_PHYSLOW 321 hex "Low 32 bits of early debug UART physical address" 322 depends on PPC_EARLY_DEBUG_44x 323 default "0x40000200" 324 help 325 You probably want 0x40000200 for ebony boards and 326 0x40000300 for taishan 327 328config PPC_EARLY_DEBUG_44x_PHYSHIGH 329 hex "EPRN of early debug UART physical address" 330 depends on PPC_EARLY_DEBUG_44x 331 default "0x1" 332 333config PPC_EARLY_DEBUG_40x_PHYSADDR 334 hex "Early debug UART physical address" 335 depends on PPC_EARLY_DEBUG_40x 336 default "0xef600300" 337 338config PPC_EARLY_DEBUG_CPM_ADDR 339 hex "CPM UART early debug transmit descriptor address" 340 depends on PPC_EARLY_DEBUG_CPM 341 default "0xfa202008" if PPC_EP88XC 342 default "0xf0001ff8" if CPM2 343 default "0xff002008" if CPM1 344 help 345 This specifies the address of the transmit descriptor 346 used for early debug output. Because it is needed before 347 platform probing is done, all platforms selected must 348 share the same address. 349 350config FAIL_IOMMU 351 bool "Fault-injection capability for IOMMU" 352 depends on FAULT_INJECTION 353 help 354 Provide fault-injection capability for IOMMU. Each device can 355 be selectively enabled via the fail_iommu property. 356 357 If you are unsure, say N. 358 359config PPC_PTDUMP 360 bool "Export kernel pagetable layout to userspace via debugfs" 361 depends on DEBUG_KERNEL && DEBUG_FS 362 help 363 This option exports the state of the kernel pagetables to a 364 debugfs file. This is only useful for kernel developers who are 365 working in architecture specific areas of the kernel - probably 366 not a good idea to enable this feature in a production kernel. 367 368 If you are unsure, say N. 369 370config PPC_HTDUMP 371 def_bool y 372 depends on PPC_PTDUMP && PPC_BOOK3S_64 373 374config PPC_FAST_ENDIAN_SWITCH 375 bool "Deprecated fast endian-switch syscall" 376 depends on DEBUG_KERNEL && PPC_BOOK3S_64 377 help 378 If you're unsure what this is, say N. 379