Kconfig.debug 5.2 KB

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