Kconfig 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config PSTORE
  3. tristate "Persistent store support"
  4. select CRYPTO if PSTORE_COMPRESS
  5. default n
  6. help
  7. This option enables generic access to platform level
  8. persistent storage via "pstore" filesystem that can
  9. be mounted as /dev/pstore. Only useful if you have
  10. a platform level driver that registers with pstore to
  11. provide the data, so you probably should just go say "Y"
  12. (or "M") to a platform specific persistent store driver
  13. (e.g. ACPI_APEI on X86) which will select this for you.
  14. If you don't have a platform persistent store driver,
  15. say N.
  16. config PSTORE_DEFLATE_COMPRESS
  17. tristate "DEFLATE (ZLIB) compression"
  18. default y
  19. depends on PSTORE
  20. select CRYPTO_DEFLATE
  21. help
  22. This option enables DEFLATE (also known as ZLIB) compression
  23. algorithm support.
  24. config PSTORE_LZO_COMPRESS
  25. tristate "LZO compression"
  26. depends on PSTORE
  27. select CRYPTO_LZO
  28. help
  29. This option enables LZO compression algorithm support.
  30. config PSTORE_LZ4_COMPRESS
  31. tristate "LZ4 compression"
  32. depends on PSTORE
  33. select CRYPTO_LZ4
  34. help
  35. This option enables LZ4 compression algorithm support.
  36. config PSTORE_LZ4HC_COMPRESS
  37. tristate "LZ4HC compression"
  38. depends on PSTORE
  39. select CRYPTO_LZ4HC
  40. help
  41. This option enables LZ4HC (high compression) mode algorithm.
  42. config PSTORE_842_COMPRESS
  43. bool "842 compression"
  44. depends on PSTORE
  45. select CRYPTO_842
  46. help
  47. This option enables 842 compression algorithm support.
  48. config PSTORE_ZSTD_COMPRESS
  49. bool "zstd compression"
  50. depends on PSTORE
  51. select CRYPTO_ZSTD
  52. help
  53. This option enables zstd compression algorithm support.
  54. config PSTORE_COMPRESS
  55. def_bool y
  56. depends on PSTORE
  57. depends on PSTORE_DEFLATE_COMPRESS || PSTORE_LZO_COMPRESS || \
  58. PSTORE_LZ4_COMPRESS || PSTORE_LZ4HC_COMPRESS || \
  59. PSTORE_842_COMPRESS || PSTORE_ZSTD_COMPRESS
  60. choice
  61. prompt "Default pstore compression algorithm"
  62. depends on PSTORE_COMPRESS
  63. help
  64. This option chooses the default active compression algorithm.
  65. This change be changed at boot with "pstore.compress=..." on
  66. the kernel command line.
  67. Currently, pstore has support for 6 compression algorithms:
  68. deflate, lzo, lz4, lz4hc, 842 and zstd.
  69. The default compression algorithm is deflate.
  70. config PSTORE_DEFLATE_COMPRESS_DEFAULT
  71. bool "deflate" if PSTORE_DEFLATE_COMPRESS
  72. config PSTORE_LZO_COMPRESS_DEFAULT
  73. bool "lzo" if PSTORE_LZO_COMPRESS
  74. config PSTORE_LZ4_COMPRESS_DEFAULT
  75. bool "lz4" if PSTORE_LZ4_COMPRESS
  76. config PSTORE_LZ4HC_COMPRESS_DEFAULT
  77. bool "lz4hc" if PSTORE_LZ4HC_COMPRESS
  78. config PSTORE_842_COMPRESS_DEFAULT
  79. bool "842" if PSTORE_842_COMPRESS
  80. config PSTORE_ZSTD_COMPRESS_DEFAULT
  81. bool "zstd" if PSTORE_ZSTD_COMPRESS
  82. endchoice
  83. config PSTORE_COMPRESS_DEFAULT
  84. string
  85. depends on PSTORE_COMPRESS
  86. default "deflate" if PSTORE_DEFLATE_COMPRESS_DEFAULT
  87. default "lzo" if PSTORE_LZO_COMPRESS_DEFAULT
  88. default "lz4" if PSTORE_LZ4_COMPRESS_DEFAULT
  89. default "lz4hc" if PSTORE_LZ4HC_COMPRESS_DEFAULT
  90. default "842" if PSTORE_842_COMPRESS_DEFAULT
  91. default "zstd" if PSTORE_ZSTD_COMPRESS_DEFAULT
  92. config PSTORE_CONSOLE
  93. bool "Log kernel console messages"
  94. depends on PSTORE
  95. help
  96. When the option is enabled, pstore will log all kernel
  97. messages, even if no oops or panic happened.
  98. config PSTORE_PMSG
  99. bool "Log user space messages"
  100. depends on PSTORE
  101. help
  102. When the option is enabled, pstore will export a character
  103. interface /dev/pmsg0 to log user space messages. On reboot
  104. data can be retrieved from /sys/fs/pstore/pmsg-ramoops-[ID].
  105. If unsure, say N.
  106. config PSTORE_FTRACE
  107. bool "Persistent function tracer"
  108. depends on PSTORE
  109. depends on FUNCTION_TRACER
  110. depends on DEBUG_FS
  111. help
  112. With this option kernel traces function calls into a persistent
  113. ram buffer that can be decoded and dumped after reboot through
  114. pstore filesystem. It can be used to determine what function
  115. was last called before a reset or panic.
  116. If unsure, say N.
  117. config PSTORE_RAM
  118. tristate "Log panic/oops to a RAM buffer"
  119. depends on PSTORE
  120. depends on HAS_IOMEM
  121. select REED_SOLOMON
  122. select REED_SOLOMON_ENC8
  123. select REED_SOLOMON_DEC8
  124. help
  125. This enables panic and oops messages to be logged to a circular
  126. buffer in RAM where it can be read back at some later point.
  127. Note that for historical reasons, the module will be named
  128. "ramoops.ko".
  129. For more information, see Documentation/admin-guide/ramoops.rst.
  130. config PSTORE_ZONE
  131. tristate
  132. depends on PSTORE
  133. help
  134. The common layer for pstore/blk (and pstore/ram in the future)
  135. to manage storage in zones.
  136. config PSTORE_BLK
  137. tristate "Log panic/oops to a block device"
  138. depends on PSTORE
  139. depends on BLOCK
  140. depends on BROKEN
  141. select PSTORE_ZONE
  142. default n
  143. help
  144. This enables panic and oops message to be logged to a block dev
  145. where it can be read back at some later point.
  146. For more information, see Documentation/admin-guide/pstore-blk.rst
  147. If unsure, say N.
  148. config PSTORE_BLK_BLKDEV
  149. string "block device identifier"
  150. depends on PSTORE_BLK
  151. default ""
  152. help
  153. Which block device should be used for pstore/blk.
  154. It accepts the following variants:
  155. 1) <hex_major><hex_minor> device number in hexadecimal representation,
  156. with no leading 0x, for example b302.
  157. 2) /dev/<disk_name> represents the device name of disk
  158. 3) /dev/<disk_name><decimal> represents the device name and number
  159. of partition - device number of disk plus the partition number
  160. 4) /dev/<disk_name>p<decimal> - same as the above, this form is
  161. used when disk name of partitioned disk ends with a digit.
  162. 5) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
  163. unique id of a partition if the partition table provides it.
  164. The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
  165. partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
  166. filled hex representation of the 32-bit "NT disk signature", and PP
  167. is a zero-filled hex representation of the 1-based partition number.
  168. 6) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation
  169. to a partition with a known unique id.
  170. 7) <major>:<minor> major and minor number of the device separated by
  171. a colon.
  172. NOTE that, both Kconfig and module parameters can configure
  173. pstore/blk, but module parameters have priority over Kconfig.
  174. config PSTORE_BLK_KMSG_SIZE
  175. int "Size in Kbytes of kmsg dump log to store"
  176. depends on PSTORE_BLK
  177. default 64
  178. help
  179. This just sets size of kmsg dump (oops, panic, etc) log for
  180. pstore/blk. The size is in KB and must be a multiple of 4.
  181. NOTE that, both Kconfig and module parameters can configure
  182. pstore/blk, but module parameters have priority over Kconfig.
  183. config PSTORE_BLK_MAX_REASON
  184. int "Maximum kmsg dump reason to store"
  185. depends on PSTORE_BLK
  186. default 2
  187. help
  188. The maximum reason for kmsg dumps to store. The default is
  189. 2 (KMSG_DUMP_OOPS), see include/linux/kmsg_dump.h's
  190. enum kmsg_dump_reason for more details.
  191. NOTE that, both Kconfig and module parameters can configure
  192. pstore/blk, but module parameters have priority over Kconfig.
  193. config PSTORE_BLK_PMSG_SIZE
  194. int "Size in Kbytes of pmsg to store"
  195. depends on PSTORE_BLK
  196. depends on PSTORE_PMSG
  197. default 64
  198. help
  199. This just sets size of pmsg (pmsg_size) for pstore/blk. The size is
  200. in KB and must be a multiple of 4.
  201. NOTE that, both Kconfig and module parameters can configure
  202. pstore/blk, but module parameters have priority over Kconfig.
  203. config PSTORE_BLK_CONSOLE_SIZE
  204. int "Size in Kbytes of console log to store"
  205. depends on PSTORE_BLK
  206. depends on PSTORE_CONSOLE
  207. default 64
  208. help
  209. This just sets size of console log (console_size) to store via
  210. pstore/blk. The size is in KB and must be a multiple of 4.
  211. NOTE that, both Kconfig and module parameters can configure
  212. pstore/blk, but module parameters have priority over Kconfig.
  213. config PSTORE_BLK_FTRACE_SIZE
  214. int "Size in Kbytes of ftrace log to store"
  215. depends on PSTORE_BLK
  216. depends on PSTORE_FTRACE
  217. default 64
  218. help
  219. This just sets size of ftrace log (ftrace_size) for pstore/blk. The
  220. size is in KB and must be a multiple of 4.
  221. NOTE that, both Kconfig and module parameters can configure
  222. pstore/blk, but module parameters have priority over Kconfig.