brintos

brintos / linux-shallow public Read only

0
0
Text · 4.3 KiB · 45cc39e Raw
145 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/reserved-memory/ramoops.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Ramoops oops/panic logger8 9description: |10  ramoops provides persistent RAM storage for oops and panics, so they can be11  recovered after a reboot. This is a child-node of "/reserved-memory", and12  is named "ramoops" after the backend, rather than "pstore" which is the13  subsystem.14 15  Parts of this storage may be set aside for other persistent log buffers, such16  as kernel log messages, or for optional ECC error-correction data.  The total17  size of these optional buffers must fit in the reserved region.18 19  Any remaining space will be used for a circular buffer of oops and panic20  records.  These records have a configurable size, with a size of 0 indicating21  that they should be disabled.22 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.25 26maintainers:27  - Kees Cook <keescook@chromium.org>28 29allOf:30  - $ref: reserved-memory.yaml31 32properties:33  compatible:34    const: ramoops35 36  reg:37    description: region of memory that is preserved between reboots38 39  ecc-size:40    $ref: /schemas/types.yaml#/definitions/uint3241    description: enables ECC support and specifies ECC buffer size in bytes42    default: 0 # no ECC43 44  record-size:45    $ref: /schemas/types.yaml#/definitions/uint3246    description: maximum size in bytes of each kmsg dump47    default: 048 49  console-size:50    $ref: /schemas/types.yaml#/definitions/uint3251    description: size in bytes of log buffer reserved for kernel messages52    default: 053 54  ftrace-size:55    $ref: /schemas/types.yaml#/definitions/uint3256    description: size in bytes of log buffer reserved for function tracing and profiling57    default: 058 59  pmsg-size:60    $ref: /schemas/types.yaml#/definitions/uint3261    description: size in bytes of log buffer reserved for userspace messages62    default: 063 64  mem-type:65    $ref: /schemas/types.yaml#/definitions/uint3266    description: if present, sets the type of mapping is to be used to map the reserved region.67    default: 068    oneOf:69      - const: 070        description: write-combined71      - const: 172        description: unbuffered73      - const: 274        description: cached75 76  max-reason:77    $ref: /schemas/types.yaml#/definitions/uint3278    default: 2 # log oopses and panics79    maximum: 0x7fffffff80    description: |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 be85      controlled by the printk.always_kmsg_dump boot param.86      If unset, it will be 2 (KMSG_DUMP_OOPS), otherwise 5 (KMSG_DUMP_MAX).87 88  flags:89    $ref: /schemas/types.yaml#/definitions/uint3290    default: 091    description: |92      If present, pass ramoops behavioral flags93      (see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values).94 95  no-dump-oops:96    deprecated: true97    type: boolean98    description: |99      Use max_reason instead. If present, and max_reason is not specified,100      it is equivalent to max_reason = 1 (KMSG_DUMP_PANIC).101 102  unbuffered:103    deprecated: true104    type: boolean105    description: |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 map108      the reserved region (defaults to buffered mappings mem_type = 0).109      If both are specified -- "mem_type" overrides "unbuffered".110 111unevaluatedProperties: false112 113required:114  - compatible115  - reg116 117anyOf:118  - required: [record-size]119  - required: [console-size]120  - required: [ftrace-size]121  - required: [pmsg-size]122 123examples:124  - |125    / {126        compatible = "foo";127        model = "foo";128        #address-cells = <1>;129        #size-cells = <1>;130 131        reserved-memory {132            #address-cells = <1>;133            #size-cells = <1>;134            ranges;135 136            ramoops@bfdf0000 {137                compatible = "ramoops";138                reg = <0xbfdf0000 0x10000>; /* 64kB */139                console-size = <0x8000>;    /* 32kB */140                record-size = <0x400>;      /*  1kB */141                ecc-size = <16>;142            };143        };144    };145