1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 $id: "http://devicetree.org/schemas/reserved-memory/ramoops.yaml#"
5 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
7 title: Ramoops oops/panic logger
10 ramoops provides persistent RAM storage for oops and panics, so they can be
11 recovered after a reboot. This is a child-node of "/reserved-memory", and
12 is named "ramoops" after the backend, rather than "pstore" which is the
15 Parts of this storage may be set aside for other persistent log buffers, such
16 as kernel log messages, or for optional ECC error-correction data. The total
17 size of these optional buffers must fit in the reserved region.
19 Any remaining space will be used for a circular buffer of oops and panic
20 records. These records have a configurable size, with a size of 0 indicating
21 that they should be disabled.
23 At least one of "record-size", "console-size", "ftrace-size", or "pmsg-size"
24 must be set non-zero, but are otherwise optional as listed below.
27 - Kees Cook <keescook@chromium.org>
30 - $ref: "reserved-memory.yaml"
37 description: region of memory that is preserved between reboots
40 $ref: /schemas/types.yaml#/definitions/uint32
41 description: enables ECC support and specifies ECC buffer size in bytes
45 $ref: /schemas/types.yaml#/definitions/uint32
46 description: maximum size in bytes of each kmsg dump
50 $ref: /schemas/types.yaml#/definitions/uint32
51 description: size in bytes of log buffer reserved for kernel messages
55 $ref: /schemas/types.yaml#/definitions/uint32
56 description: size in bytes of log buffer reserved for function tracing and profiling
60 $ref: /schemas/types.yaml#/definitions/uint32
61 description: size in bytes of log buffer reserved for userspace messages
65 $ref: /schemas/types.yaml#/definitions/uint32
66 description: if present, sets the type of mapping is to be used to map the reserved region.
70 description: write-combined
72 description: unbuffered
77 $ref: /schemas/types.yaml#/definitions/uint32
78 default: 2 # log oopses and panics
81 If present, sets maximum type of kmsg dump reasons to store.
82 This can be set to INT_MAX to store all kmsg dumps.
83 See include/linux/kmsg_dump.h KMSG_DUMP_* for other kmsg dump reason values.
84 Setting this to 0 (KMSG_DUMP_UNDEF), means the reason filtering will be
85 controlled by the printk.always_kmsg_dump boot param.
86 If unset, it will be 2 (KMSG_DUMP_OOPS), otherwise 5 (KMSG_DUMP_MAX).
89 $ref: /schemas/types.yaml#/definitions/uint32
92 If present, pass ramoops behavioral flags
93 (see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).
99 Use max_reason instead. If present, and max_reason is not specified,
100 it is equivalent to max_reason = 1 (KMSG_DUMP_PANIC).
106 Use mem_type instead. If present, and mem_type is not specified,
107 it is equivalent to mem_type = 1 and uses unbuffered mappings to map
108 the reserved region (defaults to buffered mappings mem_type = 0).
109 If both are specified -- "mem_type" overrides "unbuffered".
111 unevaluatedProperties: false
118 - required: [record-size]
119 - required: [console-size]
120 - required: [ftrace-size]
121 - required: [pmsg-size]
128 #address-cells = <1>;
132 #address-cells = <1>;
137 compatible = "ramoops";
138 reg = <0xbfdf0000 0x10000>; /* 64kB */
139 console-size = <0x8000>; /* 32kB */
140 record-size = <0x400>; /* 1kB */