Kconfig.debug 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. help
  36. Unmap pages from the kernel linear mapping after free_pages().
  37. This results in a large slowdown, but helps to find certain types
  38. of memory corruptions.
  39. config DEBUG_PER_CPU_MAPS
  40. bool "Debug access to per_cpu maps"
  41. depends on DEBUG_KERNEL
  42. depends on X86_64_SMP
  43. default n
  44. help
  45. Say Y to verify that the per_cpu map being accessed has
  46. been setup. Adds a fair amount of code to kernel memory
  47. and decreases performance.
  48. Say N if unsure.
  49. config DEBUG_RODATA
  50. bool "Write protect kernel read-only data structures"
  51. default y
  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 is recommended so that we can catch kernel bugs sooner.
  57. If in doubt, say "Y".
  58. config 4KSTACKS
  59. bool "Use 4Kb for kernel stacks instead of 8Kb"
  60. depends on DEBUG_KERNEL
  61. depends on X86_32
  62. help
  63. If you say Y here the kernel will use a 4Kb stacksize for the
  64. kernel stack attached to each process/thread. This facilitates
  65. running more threads on a system and also reduces the pressure
  66. on the VM subsystem for higher order allocations. This option
  67. will also use IRQ stacks to compensate for the reduced stackspace.
  68. config X86_FIND_SMP_CONFIG
  69. def_bool y
  70. depends on X86_LOCAL_APIC || X86_VOYAGER
  71. depends on X86_32
  72. config X86_MPPARSE
  73. def_bool y
  74. depends on (X86_32 && (X86_LOCAL_APIC && !X86_VISWS)) || X86_64
  75. config DOUBLEFAULT
  76. default y
  77. bool "Enable doublefault exception handler" if EMBEDDED
  78. depends on X86_32
  79. help
  80. This option allows trapping of rare doublefault exceptions that
  81. would otherwise cause a system to silently reboot. Disabling this
  82. option saves about 4k and might cause you much additional grey
  83. hair.
  84. config IOMMU_DEBUG
  85. bool "Enable IOMMU debugging"
  86. depends on GART_IOMMU && DEBUG_KERNEL
  87. depends on X86_64
  88. help
  89. Force the IOMMU to on even when you have less than 4GB of
  90. memory and add debugging code. On overflow always panic. And
  91. allow to enable IOMMU leak tracing. Can be disabled at boot
  92. time with iommu=noforce. This will also enable scatter gather
  93. list merging. Currently not recommended for production
  94. code. When you use it make sure you have a big enough
  95. IOMMU/AGP aperture. Most of the options enabled by this can
  96. be set more finegrained using the iommu= command line
  97. options. See Documentation/x86_64/boot-options.txt for more
  98. details.
  99. config IOMMU_LEAK
  100. bool "IOMMU leak tracing"
  101. depends on DEBUG_KERNEL
  102. depends on IOMMU_DEBUG
  103. help
  104. Add a simple leak tracer to the IOMMU code. This is useful when you
  105. are debugging a buggy device driver that leaks IOMMU mappings.
  106. #
  107. # IO delay types:
  108. #
  109. config IO_DELAY_TYPE_0X80
  110. int
  111. default "0"
  112. config IO_DELAY_TYPE_0XED
  113. int
  114. default "1"
  115. config IO_DELAY_TYPE_UDELAY
  116. int
  117. default "2"
  118. config IO_DELAY_TYPE_NONE
  119. int
  120. default "3"
  121. choice
  122. prompt "IO delay type"
  123. default IO_DELAY_0XED
  124. config IO_DELAY_0X80
  125. bool "port 0x80 based port-IO delay [recommended]"
  126. help
  127. This is the traditional Linux IO delay used for in/out_p.
  128. It is the most tested hence safest selection here.
  129. config IO_DELAY_0XED
  130. bool "port 0xed based port-IO delay"
  131. help
  132. Use port 0xed as the IO delay. This frees up port 0x80 which is
  133. often used as a hardware-debug port.
  134. config IO_DELAY_UDELAY
  135. bool "udelay based port-IO delay"
  136. help
  137. Use udelay(2) as the IO delay method. This provides the delay
  138. while not having any side-effect on the IO port space.
  139. config IO_DELAY_NONE
  140. bool "no port-IO delay"
  141. help
  142. No port-IO delay. Will break on old boxes that require port-IO
  143. delay for certain operations. Should work on most new machines.
  144. endchoice
  145. if IO_DELAY_0X80
  146. config DEFAULT_IO_DELAY_TYPE
  147. int
  148. default IO_DELAY_TYPE_0X80
  149. endif
  150. if IO_DELAY_0XED
  151. config DEFAULT_IO_DELAY_TYPE
  152. int
  153. default IO_DELAY_TYPE_0XED
  154. endif
  155. if IO_DELAY_UDELAY
  156. config DEFAULT_IO_DELAY_TYPE
  157. int
  158. default IO_DELAY_TYPE_UDELAY
  159. endif
  160. if IO_DELAY_NONE
  161. config DEFAULT_IO_DELAY_TYPE
  162. int
  163. default IO_DELAY_TYPE_NONE
  164. endif
  165. config DEBUG_BOOT_PARAMS
  166. bool "Debug boot parameters"
  167. depends on DEBUG_KERNEL
  168. depends on DEBUG_FS
  169. help
  170. This option will cause struct boot_params to be exported via debugfs.
  171. config CPA_DEBUG
  172. bool "CPA self test code"
  173. depends on DEBUG_KERNEL
  174. help
  175. Do change_page_attr self tests at boot.
  176. endmenu