Ramoops oops/panic logger
Schema identifier ($id): "http://devicetree.org/schemas/reserved-memory/ramoops.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
ramoops provides persistent RAM storage for oops and panics, so they can be recovered after a reboot. This is a child-node of "/reserved-memory", and is named "ramoops" after the backend, rather than "pstore" which is the subsystem.
Parts of this storage may be set aside for other persistent log buffers, such as kernel log messages, or for optional ECC error-correction data. The total size of these optional buffers must fit in the reserved region.
Any remaining space will be used for a circular buffer of oops and panic records. These records have a configurable size, with a size of 0 indicating that they should be disabled.
At least one of "record-size", "console-size", "ftrace-size", or "pmsg-size" must be set non-zero, but are otherwise optional as listed below.
Maintainers (maintainers): "Kees Cook <keescook@chromium.org>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):reserved-memory.yaml
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "ramoops"
reg — required here #
region of memory that is preserved between reboots
ecc-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
enables ECC support and specifies ECC buffer size in bytes
Default value (default): 0
record-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
maximum size in bytes of each kmsg dump
Default value (default): 0
console-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
size in bytes of log buffer reserved for kernel messages
Default value (default): 0
ftrace-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
size in bytes of log buffer reserved for function tracing and profiling
Default value (default): 0
pmsg-size — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
size in bytes of log buffer reserved for userspace messages
Default value (default): 0
mem-type — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
if present, sets the type of mapping is to be used to map the reserved region.
Default value (default): 0
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):0write-combined
Rule 2
Exact value (
const):1unbuffered
Rule 3
Exact value (
const):2cached
max-reason — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 2
Maximum value (maximum): 2147483647
If present, sets maximum type of kmsg dump reasons to store. This can be set to INT_MAX to store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the reason filtering will be controlled by the printk.always_kmsg_dump boot param. If unset, it will be 2 (KMSG_DUMP_OOPS), otherwise 5 (KMSG_DUMP_MAX).
flags — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 0
If present, pass ramoops behavioral flags (see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).
no-dump-oops — not listed as required here #
Deprecated (deprecated): true
Value type (type): "boolean"
Use max_reason instead. If present, and max_reason is not specified, it is equivalent to max_reason = 1 (KMSG_DUMP_PANIC).
unbuffered — not listed as required here #
Deprecated (deprecated): true
Value type (type): "boolean"
Use mem_type instead. If present, and mem_type is not specified, it is equivalent to mem_type = 1 and uses unbuffered mappings to map the reserved region (defaults to buffered mappings mem_type = 0). If both are specified -- "mem_type" overrides "unbuffered".
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg"
At least one of these rules must match (anyOf) #
Rule 1 #
Rule 2 #
Rule 3 #
Rule 4 #
Examples (examples) #
/ {
compatible = "foo";
model = "foo";
#address-cells = <1>;
#size-cells = <1>;
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
ramoops@bfdf0000 {
compatible = "ramoops";
reg = <0xbfdf0000 0x10000>; /* 64kB */
console-size = <0x8000>; /* 32kB */
record-size = <0x400>; /* 1kB */
ecc-size = <16>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 42: no ECC
Line 78: log oopses and panics