Documentation/trace/coresight/panic.rst

Source file repositories/reference/linux-study-clean/Documentation/trace/coresight/panic.rst

File Facts

System
Linux kernel
Corpus path
Documentation/trace/coresight/panic.rst
Extension
.rst
Size
14489 bytes
Lines
363
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

ap_cti_config () {
      #ETM trig out[0] trigger to Channel 0
      echo 0 4 > channels/trigin_attach
    }

    etf_cti_config () {
      #ETF Flush in trigger from Channel 0
      echo 0 1 > channels/trigout_attach
      echo 1 > channels/trig_filter_enable
    }

    etr_cti_config () {
      #ETR Flush in from Channel 0
      echo 0 1 > channels/trigout_attach
      echo 1 > channels/trig_filter_enable
    }

    ctidevs=`find . -name "cti*"`

    for i in $ctidevs
    do
            cd $i

            connection=`find . -name "ete*"`
            if [ ! -z "$connection" ]
            then
                    echo "AP CTI config for $i"
                    ap_cti_config
            fi

            connection=`find . -name "tmc_etf*"`
            if [ ! -z "$connection" ]
            then
                    echo "ETF CTI config for $i"
                    etf_cti_config
            fi

            connection=`find . -name "tmc_etr*"`
            if [ ! -z "$connection" ]
            then
                    echo "ETR CTI config for $i"
                    etr_cti_config
            fi

            cd ..
    done

Note: CTI connections are SOC specific and hence the above script is
added just for reference.

4. Choose reserved buffer mode for ETR buffer::

    #echo "resrv" > /sys/bus/coresight/devices/tmc_etr0/buf_mode_preferred

5. Enable stop on flush trigger configuration::

    #echo 1 > /sys/bus/coresight/devices/tmc_etr0/stop_on_flush

6. Start Coresight tracing on cores 1 and 2 using sysfs interface

7. Run some application on core 1::

    #taskset -c 1 dd if=/dev/urandom of=/dev/null &

8. Invoke kernel panic on core 2::

    #echo 1 > /proc/sys/kernel/panic
    #taskset -c 2 echo c > /proc/sysrq-trigger

9. From rebooted kernel or crashdump kernel, read crashdata::

Annotation

Implementation Notes