Kconfig 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config PSTORE
  3. tristate "Persistent store support"
  4. default n
  5. help
  6. This option enables generic access to platform level
  7. persistent storage via "pstore" filesystem that can
  8. be mounted as /dev/pstore. Only useful if you have
  9. a platform level driver that registers with pstore to
  10. provide the data, so you probably should just go say "Y"
  11. (or "M") to a platform specific persistent store driver
  12. (e.g. ACPI_APEI on X86) which will select this for you.
  13. If you don't have a platform persistent store driver,
  14. say N.
  15. config PSTORE_DEFAULT_KMSG_BYTES
  16. int "Default kernel log storage space" if EXPERT
  17. depends on PSTORE
  18. default "10240"
  19. help
  20. Defines default size of pstore kernel log storage.
  21. Can be enlarged if needed, not recommended to shrink it.
  22. config PSTORE_COMPRESS
  23. bool "Pstore compression (deflate)"
  24. depends on PSTORE
  25. select ZLIB_INFLATE
  26. select ZLIB_DEFLATE
  27. default y
  28. help
  29. Whether pstore records should be compressed before being written to
  30. the backing store. This is implemented using the zlib 'deflate'
  31. algorithm, using the library implementation instead of using the full
  32. blown crypto API. This reduces the risk of secondary oopses or other
  33. problems while pstore is recording panic metadata.
  34. config PSTORE_CONSOLE
  35. bool "Log kernel console messages"
  36. depends on PSTORE
  37. help
  38. When the option is enabled, pstore will log all kernel
  39. messages, even if no oops or panic happened.
  40. config PSTORE_PMSG
  41. bool "Log user space messages"
  42. depends on PSTORE
  43. select RT_MUTEXES
  44. help
  45. When the option is enabled, pstore will export a character
  46. interface /dev/pmsg0 to log user space messages. On reboot
  47. data can be retrieved from /sys/fs/pstore/pmsg-ramoops-[ID].
  48. If unsure, say N.
  49. config PSTORE_FTRACE
  50. bool "Persistent function tracer"
  51. depends on PSTORE
  52. depends on FUNCTION_TRACER
  53. depends on DEBUG_FS
  54. help
  55. With this option kernel traces function calls into a persistent
  56. ram buffer that can be decoded and dumped after reboot through
  57. pstore filesystem. It can be used to determine what function
  58. was last called before a reset or panic.
  59. If unsure, say N.
  60. config PSTORE_RAM
  61. tristate "Log panic/oops to a RAM buffer"
  62. depends on PSTORE
  63. depends on HAS_IOMEM
  64. select REED_SOLOMON
  65. select REED_SOLOMON_ENC8
  66. select REED_SOLOMON_DEC8
  67. help
  68. This enables panic and oops messages to be logged to a circular
  69. buffer in RAM where it can be read back at some later point.
  70. Note that for historical reasons, the module will be named
  71. "ramoops.ko".
  72. For more information, see Documentation/admin-guide/ramoops.rst.
  73. config PSTORE_ZONE
  74. tristate
  75. depends on PSTORE
  76. help
  77. The common layer for pstore/blk (and pstore/ram in the future)
  78. to manage storage in zones.
  79. config PSTORE_BLK
  80. tristate "Log panic/oops to a block device"
  81. depends on PSTORE
  82. depends on BLOCK
  83. select PSTORE_ZONE
  84. default n
  85. help
  86. This enables panic and oops message to be logged to a block dev
  87. where it can be read back at some later point.
  88. For more information, see Documentation/admin-guide/pstore-blk.rst
  89. If unsure, say N.
  90. config PSTORE_BLK_BLKDEV
  91. string "block device identifier"
  92. depends on PSTORE_BLK
  93. default ""
  94. help
  95. Which block device should be used for pstore/blk.
  96. It accepts the following variants:
  97. 1) <hex_major><hex_minor> device number in hexadecimal representation,
  98. with no leading 0x, for example b302.
  99. 2) /dev/<disk_name> represents the device name of disk
  100. 3) /dev/<disk_name><decimal> represents the device name and number
  101. of partition - device number of disk plus the partition number
  102. 4) /dev/<disk_name>p<decimal> - same as the above, this form is
  103. used when disk name of partitioned disk ends with a digit.
  104. 5) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
  105. unique id of a partition if the partition table provides it.
  106. The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
  107. partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
  108. filled hex representation of the 32-bit "NT disk signature", and PP
  109. is a zero-filled hex representation of the 1-based partition number.
  110. 6) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation
  111. to a partition with a known unique id.
  112. 7) <major>:<minor> major and minor number of the device separated by
  113. a colon.
  114. NOTE that, both Kconfig and module parameters can configure
  115. pstore/blk, but module parameters have priority over Kconfig.
  116. config PSTORE_BLK_KMSG_SIZE
  117. int "Size in Kbytes of kmsg dump log to store"
  118. depends on PSTORE_BLK
  119. default 64
  120. help
  121. This just sets size of kmsg dump (oops, panic, etc) log for
  122. pstore/blk. The size is in KB and must be a multiple of 4.
  123. NOTE that, both Kconfig and module parameters can configure
  124. pstore/blk, but module parameters have priority over Kconfig.
  125. config PSTORE_BLK_MAX_REASON
  126. int "Maximum kmsg dump reason to store"
  127. depends on PSTORE_BLK
  128. default 2
  129. help
  130. The maximum reason for kmsg dumps to store. The default is
  131. 2 (KMSG_DUMP_OOPS), see include/linux/kmsg_dump.h's
  132. enum kmsg_dump_reason for more details.
  133. NOTE that, both Kconfig and module parameters can configure
  134. pstore/blk, but module parameters have priority over Kconfig.
  135. config PSTORE_BLK_PMSG_SIZE
  136. int "Size in Kbytes of pmsg to store"
  137. depends on PSTORE_BLK
  138. depends on PSTORE_PMSG
  139. default 64
  140. help
  141. This just sets size of pmsg (pmsg_size) for pstore/blk. The size is
  142. in KB and must be a multiple of 4.
  143. NOTE that, both Kconfig and module parameters can configure
  144. pstore/blk, but module parameters have priority over Kconfig.
  145. config PSTORE_BLK_CONSOLE_SIZE
  146. int "Size in Kbytes of console log to store"
  147. depends on PSTORE_BLK
  148. depends on PSTORE_CONSOLE
  149. default 64
  150. help
  151. This just sets size of console log (console_size) to store via
  152. pstore/blk. The size is in KB and must be a multiple of 4.
  153. NOTE that, both Kconfig and module parameters can configure
  154. pstore/blk, but module parameters have priority over Kconfig.
  155. config PSTORE_BLK_FTRACE_SIZE
  156. int "Size in Kbytes of ftrace log to store"
  157. depends on PSTORE_BLK
  158. depends on PSTORE_FTRACE
  159. default 64
  160. help
  161. This just sets size of ftrace log (ftrace_size) for pstore/blk. The
  162. size is in KB and must be a multiple of 4.
  163. NOTE that, both Kconfig and module parameters can configure
  164. pstore/blk, but module parameters have priority over Kconfig.