1*4882a593SmuzhiyunRamoops oops/panic logger 2*4882a593Smuzhiyun========================= 3*4882a593Smuzhiyun 4*4882a593Smuzhiyunramoops provides persistent RAM storage for oops and panics, so they can be 5*4882a593Smuzhiyunrecovered after a reboot. This is a child-node of "/reserved-memory", and 6*4882a593Smuzhiyunis named "ramoops" after the backend, rather than "pstore" which is the 7*4882a593Smuzhiyunsubsystem. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunParts of this storage may be set aside for other persistent log buffers, such 10*4882a593Smuzhiyunas kernel log messages, or for optional ECC error-correction data. The total 11*4882a593Smuzhiyunsize of these optional buffers must fit in the reserved region. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunAny remaining space will be used for a circular buffer of oops and panic 14*4882a593Smuzhiyunrecords. These records have a configurable size, with a size of 0 indicating 15*4882a593Smuzhiyunthat they should be disabled. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunAt least one of "record-size", "console-size", "ftrace-size", or "pmsg-size" 18*4882a593Smuzhiyunmust be set non-zero, but are otherwise optional as listed below. 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunRequired properties: 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun- compatible: must be "ramoops" 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun- reg: region of memory that is preserved between reboots 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunOptional properties: 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun- ecc-size: enables ECC support and specifies ECC buffer size in bytes 31*4882a593Smuzhiyun (defaults to 0: no ECC) 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun- record-size: maximum size in bytes of each kmsg dump. 34*4882a593Smuzhiyun (defaults to 0: disabled) 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun- console-size: size in bytes of log buffer reserved for kernel messages 37*4882a593Smuzhiyun (defaults to 0: disabled) 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun- ftrace-size: size in bytes of log buffer reserved for function tracing and 40*4882a593Smuzhiyun profiling (defaults to 0: disabled) 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun- pmsg-size: size in bytes of log buffer reserved for userspace messages 43*4882a593Smuzhiyun (defaults to 0: disabled) 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun- mem-type: if present, sets the type of mapping is to be used to map the 46*4882a593Smuzhiyun reserved region. mem-type: 0 = write-combined (default), 1 = unbuffered, 47*4882a593Smuzhiyun 2 = cached. 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun- unbuffered: deprecated, use mem_type instead. if present, and mem_type is 50*4882a593Smuzhiyun not specified, it is equivalent to mem_type = 1 and uses unbuffered mappings 51*4882a593Smuzhiyun to map the reserved region (defaults to buffered mappings mem_type = 0). If 52*4882a593Smuzhiyun both are specified -- "mem_type" overrides "unbuffered". 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun- max-reason: if present, sets maximum type of kmsg dump reasons to store 55*4882a593Smuzhiyun (defaults to 2: log Oopses and Panics). This can be set to INT_MAX to 56*4882a593Smuzhiyun store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other 57*4882a593Smuzhiyun kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the 58*4882a593Smuzhiyun reason filtering will be controlled by the printk.always_kmsg_dump boot 59*4882a593Smuzhiyun param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun- no-dump-oops: deprecated, use max_reason instead. If present, and 62*4882a593Smuzhiyun max_reason is not specified, it is equivalent to max_reason = 1 63*4882a593Smuzhiyun (KMSG_DUMP_PANIC). 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun- flags: if present, pass ramoops behavioral flags (defaults to 0, 66*4882a593Smuzhiyun see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values). 67