Kconfig.debug 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. menu "Kernel hacking"
  2. config TRACE_IRQFLAGS_SUPPORT
  3. def_bool y
  4. source "lib/Kconfig.debug"
  5. config EARLY_PRINTK
  6. bool "Early printk" if EMBEDDED
  7. default y
  8. help
  9. Write kernel log output directly into the VGA buffer or to a serial
  10. port.
  11. This is useful for kernel debugging when your machine crashes very
  12. early before the console code is initialized. For normal operation
  13. it is not recommended because it looks ugly and doesn't cooperate
  14. with klogd/syslogd or the X server. You should normally N here,
  15. unless you want to debug such a crash.
  16. config DEBUG_STACKOVERFLOW
  17. bool "Check for stack overflows"
  18. depends on DEBUG_KERNEL
  19. help
  20. This option will cause messages to be printed if free stack space
  21. drops below a certain limit.
  22. config DEBUG_STACK_USAGE
  23. bool "Stack utilization instrumentation"
  24. depends on DEBUG_KERNEL
  25. help
  26. Enables the display of the minimum amount of free stack which each
  27. task has ever had available in the sysrq-T and sysrq-P debug output.
  28. This option will slow down process creation somewhat.
  29. comment "Page alloc debug is incompatible with Software Suspend on i386"
  30. depends on DEBUG_KERNEL && HIBERNATION
  31. depends on X86_32
  32. config DEBUG_PAGEALLOC
  33. bool "Debug page memory allocations"
  34. depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
  35. depends on X86_32
  36. help
  37. Unmap pages from the kernel linear mapping after free_pages().
  38. This results in a large slowdown, but helps to find certain types
  39. of memory corruptions.
  40. config DEBUG_PER_CPU_MAPS
  41. bool "Debug access to per_cpu maps"
  42. depends on DEBUG_KERNEL
  43. depends on X86_64_SMP
  44. default n
  45. help
  46. Say Y to verify that the per_cpu map being accessed has
  47. been setup. Adds a fair amount of code to kernel memory
  48. and decreases performance.
  49. Say N if unsure.
  50. config DEBUG_RODATA
  51. bool "Write protect kernel read-only data structures"
  52. depends on DEBUG_KERNEL
  53. help
  54. Mark the kernel read-only data as write-protected in the pagetables,
  55. in order to catch accidental (and incorrect) writes to such const
  56. data. This option may have a slight performance impact because a
  57. portion of the kernel code won't be covered by a 2MB TLB anymore.
  58. If in doubt, say "N".
  59. config 4KSTACKS
  60. bool "Use 4Kb for kernel stacks instead of 8Kb"
  61. depends on DEBUG_KERNEL
  62. depends on X86_32
  63. help
  64. If you say Y here the kernel will use a 4Kb stacksize for the
  65. kernel stack attached to each process/thread. This facilitates
  66. running more threads on a system and also reduces the pressure
  67. on the VM subsystem for higher order allocations. This option
  68. will also use IRQ stacks to compensate for the reduced stackspace.
  69. config X86_FIND_SMP_CONFIG
  70. def_bool y
  71. depends on X86_LOCAL_APIC || X86_VOYAGER
  72. depends on X86_32
  73. config X86_MPPARSE
  74. def_bool y
  75. depends on (X86_32 && (X86_LOCAL_APIC && !X86_VISWS)) || X86_64
  76. config DOUBLEFAULT
  77. default y
  78. bool "Enable doublefault exception handler" if EMBEDDED
  79. depends on X86_32
  80. help
  81. This option allows trapping of rare doublefault exceptions that
  82. would otherwise cause a system to silently reboot. Disabling this
  83. option saves about 4k and might cause you much additional grey
  84. hair.
  85. config IOMMU_DEBUG
  86. bool "Enable IOMMU debugging"
  87. depends on GART_IOMMU && DEBUG_KERNEL
  88. depends on X86_64
  89. help
  90. Force the IOMMU to on even when you have less than 4GB of
  91. memory and add debugging code. On overflow always panic. And
  92. allow to enable IOMMU leak tracing. Can be disabled at boot
  93. time with iommu=noforce. This will also enable scatter gather
  94. list merging. Currently not recommended for production
  95. code. When you use it make sure you have a big enough
  96. IOMMU/AGP aperture. Most of the options enabled by this can
  97. be set more finegrained using the iommu= command line
  98. options. See Documentation/x86_64/boot-options.txt for more
  99. details.
  100. config IOMMU_LEAK
  101. bool "IOMMU leak tracing"
  102. depends on DEBUG_KERNEL
  103. depends on IOMMU_DEBUG
  104. help
  105. Add a simple leak tracer to the IOMMU code. This is useful when you
  106. are debugging a buggy device driver that leaks IOMMU mappings.
  107. #
  108. # IO delay types:
  109. #
  110. config IO_DELAY_TYPE_0X80
  111. int
  112. default "0"
  113. config IO_DELAY_TYPE_0XED
  114. int
  115. default "1"
  116. config IO_DELAY_TYPE_UDELAY
  117. int
  118. default "2"
  119. config IO_DELAY_TYPE_NONE
  120. int
  121. default "3"
  122. choice
  123. prompt "IO delay type"
  124. default IO_DELAY_0XED
  125. config IO_DELAY_0X80
  126. bool "port 0x80 based port-IO delay [recommended]"
  127. help
  128. This is the traditional Linux IO delay used for in/out_p.
  129. It is the most tested hence safest selection here.
  130. config IO_DELAY_0XED
  131. bool "port 0xed based port-IO delay"
  132. help
  133. Use port 0xed as the IO delay. This frees up port 0x80 which is
  134. often used as a hardware-debug port.
  135. config IO_DELAY_UDELAY
  136. bool "udelay based port-IO delay"
  137. help
  138. Use udelay(2) as the IO delay method. This provides the delay
  139. while not having any side-effect on the IO port space.
  140. config IO_DELAY_NONE
  141. bool "no port-IO delay"
  142. help
  143. No port-IO delay. Will break on old boxes that require port-IO
  144. delay for certain operations. Should work on most new machines.
  145. endchoice
  146. if IO_DELAY_0X80
  147. config DEFAULT_IO_DELAY_TYPE
  148. int
  149. default IO_DELAY_TYPE_0X80
  150. endif
  151. if IO_DELAY_0XED
  152. config DEFAULT_IO_DELAY_TYPE
  153. int
  154. default IO_DELAY_TYPE_0XED
  155. endif
  156. if IO_DELAY_UDELAY
  157. config DEFAULT_IO_DELAY_TYPE
  158. int
  159. default IO_DELAY_TYPE_UDELAY
  160. endif
  161. if IO_DELAY_NONE
  162. config DEFAULT_IO_DELAY_TYPE
  163. int
  164. default IO_DELAY_TYPE_NONE
  165. endif
  166. config DEBUG_BOOT_PARAMS
  167. bool "Debug boot parameters"
  168. depends on DEBUG_KERNEL
  169. depends on DEBUG_FS
  170. help
  171. This option will cause struct boot_params to be exported via debugfs.
  172. endmenu