18c2ecf20Sopenharmony_ciRamoops oops/panic logger
28c2ecf20Sopenharmony_ci=========================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciramoops provides persistent RAM storage for oops and panics, so they can be
58c2ecf20Sopenharmony_cirecovered after a reboot. This is a child-node of "/reserved-memory", and
68c2ecf20Sopenharmony_ciis named "ramoops" after the backend, rather than "pstore" which is the
78c2ecf20Sopenharmony_cisubsystem.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciParts of this storage may be set aside for other persistent log buffers, such
108c2ecf20Sopenharmony_cias kernel log messages, or for optional ECC error-correction data.  The total
118c2ecf20Sopenharmony_cisize of these optional buffers must fit in the reserved region.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciAny remaining space will be used for a circular buffer of oops and panic
148c2ecf20Sopenharmony_cirecords.  These records have a configurable size, with a size of 0 indicating
158c2ecf20Sopenharmony_cithat they should be disabled.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciAt least one of "record-size", "console-size", "ftrace-size", or "pmsg-size"
188c2ecf20Sopenharmony_cimust be set non-zero, but are otherwise optional as listed below.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciRequired properties:
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci- compatible: must be "ramoops"
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci- reg: region of memory that is preserved between reboots
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciOptional properties:
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci- ecc-size: enables ECC support and specifies ECC buffer size in bytes
318c2ecf20Sopenharmony_ci  (defaults to 0: no ECC)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci- record-size: maximum size in bytes of each kmsg dump.
348c2ecf20Sopenharmony_ci  (defaults to 0: disabled)
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci- console-size: size in bytes of log buffer reserved for kernel messages
378c2ecf20Sopenharmony_ci  (defaults to 0: disabled)
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci- ftrace-size: size in bytes of log buffer reserved for function tracing and
408c2ecf20Sopenharmony_ci  profiling (defaults to 0: disabled)
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci- pmsg-size: size in bytes of log buffer reserved for userspace messages
438c2ecf20Sopenharmony_ci  (defaults to 0: disabled)
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci- unbuffered: if present, use unbuffered mappings to map the reserved region
468c2ecf20Sopenharmony_ci  (defaults to buffered mappings)
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci- max-reason: if present, sets maximum type of kmsg dump reasons to store
498c2ecf20Sopenharmony_ci  (defaults to 2: log Oopses and Panics). This can be set to INT_MAX to
508c2ecf20Sopenharmony_ci  store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other
518c2ecf20Sopenharmony_ci  kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the
528c2ecf20Sopenharmony_ci  reason filtering will be controlled by the printk.always_kmsg_dump boot
538c2ecf20Sopenharmony_ci  param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci- no-dump-oops: deprecated, use max_reason instead. If present, and
568c2ecf20Sopenharmony_ci  max_reason is not specified, it is equivalent to max_reason = 1
578c2ecf20Sopenharmony_ci  (KMSG_DUMP_PANIC).
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci- flags: if present, pass ramoops behavioral flags (defaults to 0,
608c2ecf20Sopenharmony_ci  see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).
61