ԭsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/trace/coresight/panicmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/trace/coresight/panicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/trace/coresight/panicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/trace/coresight/panicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/trace/coresight/panicmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/trace/coresight/panicmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h3Using Coresight for Kernel panic and Watchdog reseth]h3Using Coresight for Kernel panic and Watchdog reset}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/trace/coresight/panic.rsthKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hsThis documentation is about using Linux coresight trace support to debug kernel panic and watchdog reset scenarios.h]hsThis documentation is about using Linux coresight trace support to debug kernel panic and watchdog reset scenarios.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h#Coresight trace during Kernel panich]h#Coresight trace during Kernel panic}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hjFrom the coresight driver point of view, addressing the kernel panic situation has four main requirements.h]hjFrom the coresight driver point of view, addressing the kernel panic situation has four main requirements.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhenumerated_list)}(hhh](h list_item)}(hSupport for allocation of trace buffer pages from reserved memory area. Platform can advertise this using a new device tree property added to relevant coresight nodes. h]h)}(hSupport for allocation of trace buffer pages from reserved memory area. Platform can advertise this using a new device tree property added to relevant coresight nodes.h]hSupport for allocation of trace buffer pages from reserved memory area. Platform can advertise this using a new device tree property added to relevant coresight nodes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h;Support for stopping coresight blocks at the time of panic h]h)}(h:Support for stopping coresight blocks at the time of panich]h:Support for stopping coresight blocks at the time of panic}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h1Saving required metadata in the specified format h]h)}(h0Saving required metadata in the specified formath]h0Saving required metadata in the specified format}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h=Support for reading trace data captured at the time of panic h]h)}(hExternal out --->CTI -->External In---->ETR/ETF stoph]h[ Trigger on panic Comparator --->External out --->CTI -->External In---->ETR/ETF stop}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK4hjhhubeh}(h]/disabling-coresight-blocks-at-the-time-of-panicah ]h"]/disabling coresight blocks at the time of panicah$]h&]uh1hhhhhhhhK,ubh)}(hhh](h)}(h+Saving metadata at the time of kernel panich]h+Saving metadata at the time of kernel panic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hCoresight metadata involves all additional data that are required for a successful trace decode in addition to the trace data. This involves ETR/ETF/ETB register snapshot etc.h]hCoresight metadata involves all additional data that are required for a successful trace decode in addition to the trace data. This involves ETR/ETF/ETB register snapshot etc.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjhhubh)}(haA new optional device property "memory-region" is added to the ETR/ETF/ETB device nodes for this.h]heA new optional device property “memory-region” is added to the ETR/ETF/ETB device nodes for this.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubeh}(h]+saving-metadata-at-the-time-of-kernel-panicah ]h"]+saving metadata at the time of kernel panicah$]h&]uh1hhhhhhhhK8ubh)}(hhh](h)}(h0Reading trace data captured at the time of panich]h0Reading trace data captured at the time of panic}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhKAubh)}(hTrace data captured at the time of panic, can be read from rebooted kernel or from crashdump kernel using a special device file /dev/crash_tmc_xxx. This device file is created only when there is a valid crashdata available.h]hTrace data captured at the time of panic, can be read from rebooted kernel or from crashdump kernel using a special device file /dev/crash_tmc_xxx. This device file is created only when there is a valid crashdata available.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhj0hhubeh}(h]0reading-trace-data-captured-at-the-time-of-panicah ]h"]0reading trace data captured at the time of panicah$]h&]uh1hhhhhhhhKAubh)}(hhh](h)}(h?General flow of trace capture and decode incase of kernel panich]h?General flow of trace capture and decode incase of kernel panic}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhKGubj)}(hhh](j)}(hEnable source and sink on all the cores using the sysfs interface. ETR sinks should have trace buffers allocated from reserved memory, by selecting "resrv" buffer mode from sysfs. h]h)}(hEnable source and sink on all the cores using the sysfs interface. ETR sinks should have trace buffers allocated from reserved memory, by selecting "resrv" buffer mode from sysfs.h]hEnable source and sink on all the cores using the sysfs interface. ETR sinks should have trace buffers allocated from reserved memory, by selecting “resrv” buffer mode from sysfs.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjkubah}(h]h ]h"]h$]h&]uh1jhjhhhhhhNubj)}(hRun relevant tests. h]h)}(hRun relevant tests.h]hRun relevant tests.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhhNubj)}(hOn a kernel panic, all coresight blocks are disabled, necessary metadata is synced by kernel panic handler. System would eventually reboot or boot a crashdump kernel. h](h)}(hkOn a kernel panic, all coresight blocks are disabled, necessary metadata is synced by kernel panic handler.h]hkOn a kernel panic, all coresight blocks are disabled, necessary metadata is synced by kernel panic handler.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubh)}(h:System would eventually reboot or boot a crashdump kernel.h]h:System would eventually reboot or boot a crashdump kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhhNubj)}(hFor platforms that supports crashdump kernel, raw trace data can be dumped using the coresight sysfs interface from the crashdump kernel itself. Persistent RAM is not a requirement in this case. h]h)}(hFor platforms that supports crashdump kernel, raw trace data can be dumped using the coresight sysfs interface from the crashdump kernel itself. Persistent RAM is not a requirement in this case.h]hFor platforms that supports crashdump kernel, raw trace data can be dumped using the coresight sysfs interface from the crashdump kernel itself. Persistent RAM is not a requirement in this case.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhhNubj)}(hFor platforms that supports persistent RAM, trace data can be dumped using the coresight sysfs interface in the subsequent Linux boot. Crashdump kernel is not a requirement in this case. Persistent RAM ensures that trace data is intact across reboot. h]h)}(hFor platforms that supports persistent RAM, trace data can be dumped using the coresight sysfs interface in the subsequent Linux boot. Crashdump kernel is not a requirement in this case. Persistent RAM ensures that trace data is intact across reboot.h]hFor platforms that supports persistent RAM, trace data can be dumped using the coresight sysfs interface in the subsequent Linux boot. Crashdump kernel is not a requirement in this case. Persistent RAM ensures that trace data is intact across reboot.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhhNubeh}(h]h ]h"]h$]h&]jlarabicjnhjojpuh1hhjWhhhhhKHubeh}(h]?general-flow-of-trace-capture-and-decode-incase-of-kernel-panicah ]h"]?general flow of trace capture and decode incase of kernel panicah$]h&]uh1hhhhhhhhKGubeh}(h]#coresight-trace-during-kernel-panicah ]h"]#coresight trace during kernel panicah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h%Coresight trace during Watchdog reseth]h%Coresight trace during Watchdog reset}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK]ubh)}(hZThe main difference between addressing the watchdog reset and kernel panic case are below,h]hZThe main difference between addressing the watchdog reset and kernel panic case are below,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjhhubj)}(hhh](j)}(hSaving coresight metadata need to be taken care by the SCP(system control processor) firmware in the specified format, instead of kernel. h]h)}(hSaving coresight metadata need to be taken care by the SCP(system control processor) firmware in the specified format, instead of kernel.h]hSaving coresight metadata need to be taken care by the SCP(system control processor) firmware in the specified format, instead of kernel.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj*ubah}(h]h ]h"]h$]h&]uh1jhj'hhhhhNubj)}(hReserved memory region given by firmware for trace buffer and metadata has to be in persistent RAM. Note: This is a requirement for watchdog reset case but optional in kernel panic case. h]h)}(hReserved memory region given by firmware for trace buffer and metadata has to be in persistent RAM. Note: This is a requirement for watchdog reset case but optional in kernel panic case.h]hReserved memory region given by firmware for trace buffer and metadata has to be in persistent RAM. Note: This is a requirement for watchdog reset case but optional in kernel panic case.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjBubah}(h]h ]h"]h$]h&]uh1jhj'hhhhhNubeh}(h]h ]h"]h$]h&]jljmjnhjojpuh1hhjhhhhhKaubh)}(hWWatchdog reset can be supported only on platforms that meet the above two requirements.h]hWWatchdog reset can be supported only on platforms that meet the above two requirements.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjhhubeh}(h]%coresight-trace-during-watchdog-resetah ]h"]%coresight trace during watchdog resetah$]h&]uh1hhhhhhhhK]ubh)}(hhh](h)}(h=Sample commands for testing a Kernel panic case with ETR sinkh]h=Sample commands for testing a Kernel panic case with ETR sink}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhhhhhKnubj)}(hhh](j)}(hBoot Linux kernel with "crash_kexec_post_notifiers" added to the kernel bootargs. This is mandatory if the user would like to read the tracedata from the crashdump kernel. h]h)}(hBoot Linux kernel with "crash_kexec_post_notifiers" added to the kernel bootargs. This is mandatory if the user would like to read the tracedata from the crashdump kernel.h]hBoot Linux kernel with “crash_kexec_post_notifiers” added to the kernel bootargs. This is mandatory if the user would like to read the tracedata from the crashdump kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hrEnable the preloaded ETM configuration:: #echo 1 > /sys/kernel/config/cs-syscfg/configurations/panicstop/enable h](h)}(h(Enable the preloaded ETM configuration::h]h'Enable the preloaded ETM configuration:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubj)}(hF#echo 1 > /sys/kernel/config/cs-syscfg/configurations/panicstop/enableh]hF#echo 1 > /sys/kernel/config/cs-syscfg/configurations/panicstop/enable}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKvhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXoConfigure CTI using sysfs interface:: #./cti_setup.sh #cat cti_setup.sh cd /sys/bus/coresight/devices/ 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 h](h)}(h%Configure CTI using sysfs interface::h]h$Configure CTI using sysfs interface:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjubj)}(hX#./cti_setup.sh #cat cti_setup.sh cd /sys/bus/coresight/devices/ 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 .. doneh]hX#./cti_setup.sh #cat cti_setup.sh cd /sys/bus/coresight/devices/ 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}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKzhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jljjnhjojpuh1hhjvhhhhhKpubh)}(h^Note: CTI connections are SOC specific and hence the above script is added just for reference.h]h^Note: CTI connections are SOC specific and hence the above script is added just for reference.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjvhhubj)}(hhh](j)}(hvChoose reserved buffer mode for ETR buffer:: #echo "resrv" > /sys/bus/coresight/devices/tmc_etr0/buf_mode_preferred h](h)}(h,Choose reserved buffer mode for ETR buffer::h]h+Choose reserved buffer mode for ETR buffer:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hF#echo "resrv" > /sys/bus/coresight/devices/tmc_etr0/buf_mode_preferredh]hF#echo "resrv" > /sys/bus/coresight/devices/tmc_etr0/buf_mode_preferred}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hkEnable stop on flush trigger configuration:: #echo 1 > /sys/bus/coresight/devices/tmc_etr0/stop_on_flush h](h)}(h,Enable stop on flush trigger configuration::h]h+Enable stop on flush trigger configuration:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubj)}(h;#echo 1 > /sys/bus/coresight/devices/tmc_etr0/stop_on_flushh]h;#echo 1 > /sys/bus/coresight/devices/tmc_etr0/stop_on_flush}hj=sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj+ubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h?Start Coresight tracing on cores 1 and 2 using sysfs interface h]h)}(h>Start Coresight tracing on cores 1 and 2 using sysfs interfaceh]h>Start Coresight tracing on cores 1 and 2 using sysfs interface}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hSRun some application on core 1:: #taskset -c 1 dd if=/dev/urandom of=/dev/null & h](h)}(h Run some application on core 1::h]hRun some application on core 1:}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjiubj)}(h/#taskset -c 1 dd if=/dev/urandom of=/dev/null &h]h/#taskset -c 1 dd if=/dev/urandom of=/dev/null &}hj{sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjiubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hoInvoke kernel panic on core 2:: #echo 1 > /proc/sys/kernel/panic #taskset -c 2 echo c > /proc/sysrq-trigger h](h)}(hInvoke kernel panic on core 2::h]hInvoke kernel panic on core 2:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hK#echo 1 > /proc/sys/kernel/panic #taskset -c 2 echo c > /proc/sysrq-triggerh]hK#echo 1 > /proc/sys/kernel/panic #taskset -c 2 echo c > /proc/sysrq-trigger}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hnFrom rebooted kernel or crashdump kernel, read crashdata:: #dd if=/dev/crash_tmc_etr0 of=/trace/cstrace.bin h](h)}(h:From rebooted kernel or crashdump kernel, read crashdata::h]h9From rebooted kernel or crashdump kernel, read crashdata:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h0#dd if=/dev/crash_tmc_etr0 of=/trace/cstrace.binh]h0#dd if=/dev/crash_tmc_etr0 of=/trace/cstrace.bin}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hERun opencsd decoder tools/scripts to generate the instruction trace. h]h)}(hDRun opencsd decoder tools/scripts to generate the instruction trace.h]hDRun opencsd decoder tools/scripts to generate the instruction trace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jljjnhjojpstartKuh1hhjvhhhhhKubh)}(hhh](h)}(hSample instruction trace dumph]hSample instruction trace dump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h Core1 dump::h]h Core1 dump:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX A etm4_enable_hw: ffff800008ae1dd4 CONTEXT EL2 etm4_enable_hw: ffff800008ae1dd4 I etm4_enable_hw: ffff800008ae1dd4: d503201f nop I etm4_enable_hw: ffff800008ae1dd8: d503201f nop I etm4_enable_hw: ffff800008ae1ddc: d503201f nop I etm4_enable_hw: ffff800008ae1de0: d503201f nop I etm4_enable_hw: ffff800008ae1de4: d503201f nop I etm4_enable_hw: ffff800008ae1de8: d503233f paciasp I etm4_enable_hw: ffff800008ae1dec: a9be7bfd stp x29, x30, [sp, #-32]! I etm4_enable_hw: ffff800008ae1df0: 910003fd mov x29, sp I etm4_enable_hw: ffff800008ae1df4: a90153f3 stp x19, x20, [sp, #16] I etm4_enable_hw: ffff800008ae1df8: 2a0003f4 mov w20, w0 I etm4_enable_hw: ffff800008ae1dfc: 900085b3 adrp x19, ffff800009b95000 I etm4_enable_hw: ffff800008ae1e00: 910f4273 add x19, x19, #0x3d0 I etm4_enable_hw: ffff800008ae1e04: f8747a60 ldr x0, [x19, x20, lsl #3] E etm4_enable_hw: ffff800008ae1e08: b4000140 cbz x0, ffff800008ae1e30 I 149.039572921 etm4_enable_hw: ffff800008ae1e30: a94153f3 ldp x19, x20, [sp, #16] I 149.039572921 etm4_enable_hw: ffff800008ae1e34: 52800000 mov w0, #0x0 // #0 I 149.039572921 etm4_enable_hw: ffff800008ae1e38: a8c27bfd ldp x29, x30, [sp], #32 ..snip 149.052324811 chacha_block_generic: ffff800008642d80: 9100a3e0 add x0, I 149.052324811 chacha_block_generic: ffff800008642d84: b86178a2 ldr w2, [x5, x1, lsl #2] I 149.052324811 chacha_block_generic: ffff800008642d88: 8b010803 add x3, x0, x1, lsl #2 I 149.052324811 chacha_block_generic: ffff800008642d8c: b85fc063 ldur w3, [x3, #-4] I 149.052324811 chacha_block_generic: ffff800008642d90: 0b030042 add w2, w2, w3 I 149.052324811 chacha_block_generic: ffff800008642d94: b8217882 str w2, [x4, x1, lsl #2] I 149.052324811 chacha_block_generic: ffff800008642d98: 91000421 add x1, x1, #0x1 I 149.052324811 chacha_block_generic: ffff800008642d9c: f100443f cmp x1, #0x11h]hX A etm4_enable_hw: ffff800008ae1dd4 CONTEXT EL2 etm4_enable_hw: ffff800008ae1dd4 I etm4_enable_hw: ffff800008ae1dd4: d503201f nop I etm4_enable_hw: ffff800008ae1dd8: d503201f nop I etm4_enable_hw: ffff800008ae1ddc: d503201f nop I etm4_enable_hw: ffff800008ae1de0: d503201f nop I etm4_enable_hw: ffff800008ae1de4: d503201f nop I etm4_enable_hw: ffff800008ae1de8: d503233f paciasp I etm4_enable_hw: ffff800008ae1dec: a9be7bfd stp x29, x30, [sp, #-32]! I etm4_enable_hw: ffff800008ae1df0: 910003fd mov x29, sp I etm4_enable_hw: ffff800008ae1df4: a90153f3 stp x19, x20, [sp, #16] I etm4_enable_hw: ffff800008ae1df8: 2a0003f4 mov w20, w0 I etm4_enable_hw: ffff800008ae1dfc: 900085b3 adrp x19, ffff800009b95000 I etm4_enable_hw: ffff800008ae1e00: 910f4273 add x19, x19, #0x3d0 I etm4_enable_hw: ffff800008ae1e04: f8747a60 ldr x0, [x19, x20, lsl #3] E etm4_enable_hw: ffff800008ae1e08: b4000140 cbz x0, ffff800008ae1e30 I 149.039572921 etm4_enable_hw: ffff800008ae1e30: a94153f3 ldp x19, x20, [sp, #16] I 149.039572921 etm4_enable_hw: ffff800008ae1e34: 52800000 mov w0, #0x0 // #0 I 149.039572921 etm4_enable_hw: ffff800008ae1e38: a8c27bfd ldp x29, x30, [sp], #32 ..snip 149.052324811 chacha_block_generic: ffff800008642d80: 9100a3e0 add x0, I 149.052324811 chacha_block_generic: ffff800008642d84: b86178a2 ldr w2, [x5, x1, lsl #2] I 149.052324811 chacha_block_generic: ffff800008642d88: 8b010803 add x3, x0, x1, lsl #2 I 149.052324811 chacha_block_generic: ffff800008642d8c: b85fc063 ldur w3, [x3, #-4] I 149.052324811 chacha_block_generic: ffff800008642d90: 0b030042 add w2, w2, w3 I 149.052324811 chacha_block_generic: ffff800008642d94: b8217882 str w2, [x4, x1, lsl #2] I 149.052324811 chacha_block_generic: ffff800008642d98: 91000421 add x1, x1, #0x1 I 149.052324811 chacha_block_generic: ffff800008642d9c: f100443f cmp x1, #0x11}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(h Core 2 dump::h]h Core 2 dump:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj)}(hXdA etm4_enable_hw: ffff800008ae1dd4 CONTEXT EL2 etm4_enable_hw: ffff800008ae1dd4 I etm4_enable_hw: ffff800008ae1dd4: d503201f nop I etm4_enable_hw: ffff800008ae1dd8: d503201f nop I etm4_enable_hw: ffff800008ae1ddc: d503201f nop I etm4_enable_hw: ffff800008ae1de0: d503201f nop I etm4_enable_hw: ffff800008ae1de4: d503201f nop I etm4_enable_hw: ffff800008ae1de8: d503233f paciasp I etm4_enable_hw: ffff800008ae1dec: a9be7bfd stp x29, x30, [sp, #-32]! I etm4_enable_hw: ffff800008ae1df0: 910003fd mov x29, sp I etm4_enable_hw: ffff800008ae1df4: a90153f3 stp x19, x20, [sp, #16] I etm4_enable_hw: ffff800008ae1df8: 2a0003f4 mov w20, w0 I etm4_enable_hw: ffff800008ae1dfc: 900085b3 adrp x19, ffff800009b95000 I etm4_enable_hw: ffff800008ae1e00: 910f4273 add x19, x19, #0x3d0 I etm4_enable_hw: ffff800008ae1e04: f8747a60 ldr x0, [x19, x20, lsl #3] E etm4_enable_hw: ffff800008ae1e08: b4000140 cbz x0, ffff800008ae1e30 I 149.046243445 etm4_enable_hw: ffff800008ae1e30: a94153f3 ldp x19, x20, [sp, #16] I 149.046243445 etm4_enable_hw: ffff800008ae1e34: 52800000 mov w0, #0x0 // #0 I 149.046243445 etm4_enable_hw: ffff800008ae1e38: a8c27bfd ldp x29, x30, [sp], #32 I 149.046243445 etm4_enable_hw: ffff800008ae1e3c: d50323bf autiasp E 149.046243445 etm4_enable_hw: ffff800008ae1e40: d65f03c0 ret A ete_sysreg_write: ffff800008adfa18 ..snip I 149.05422547 panic: ffff800008096300: a90363f7 stp x23, x24, [sp, #48] I 149.05422547 panic: ffff800008096304: 6b00003f cmp w1, w0 I 149.05422547 panic: ffff800008096308: 3a411804 ccmn w0, #0x1, #0x4, ne // ne = any N 149.05422547 panic: ffff80000809630c: 540001e0 b.eq ffff800008096348 // b.none I 149.05422547 panic: ffff800008096310: f90023f9 str x25, [sp, #64] E 149.05422547 panic: ffff800008096314: 97fe44ef bl ffff8000080276d0 A panic: ffff80000809634c I 149.05422547 panic: ffff80000809634c: 910102d5 add x21, x22, #0x40 I 149.05422547 panic: ffff800008096350: 52800020 mov w0, #0x1 // #1 E 149.05422547 panic: ffff800008096354: 94166b8b bl ffff800008631180 N 149.054225518 bust_spinlocks: ffff800008631180: 340000c0 cbz w0, ffff800008631198 I 149.054225518 bust_spinlocks: ffff800008631184: f000a321 adrp x1, ffff800009a98000 I 149.054225518 bust_spinlocks: ffff800008631188: b9405c20 ldr w0, [x1, #92] I 149.054225518 bust_spinlocks: ffff80000863118c: 11000400 add w0, w0, #0x1 I 149.054225518 bust_spinlocks: ffff800008631190: b9005c20 str w0, [x1, #92] E 149.054225518 bust_spinlocks: ffff800008631194: d65f03c0 ret A panic: ffff800008096358h]hXdA etm4_enable_hw: ffff800008ae1dd4 CONTEXT EL2 etm4_enable_hw: ffff800008ae1dd4 I etm4_enable_hw: ffff800008ae1dd4: d503201f nop I etm4_enable_hw: ffff800008ae1dd8: d503201f nop I etm4_enable_hw: ffff800008ae1ddc: d503201f nop I etm4_enable_hw: ffff800008ae1de0: d503201f nop I etm4_enable_hw: ffff800008ae1de4: d503201f nop I etm4_enable_hw: ffff800008ae1de8: d503233f paciasp I etm4_enable_hw: ffff800008ae1dec: a9be7bfd stp x29, x30, [sp, #-32]! I etm4_enable_hw: ffff800008ae1df0: 910003fd mov x29, sp I etm4_enable_hw: ffff800008ae1df4: a90153f3 stp x19, x20, [sp, #16] I etm4_enable_hw: ffff800008ae1df8: 2a0003f4 mov w20, w0 I etm4_enable_hw: ffff800008ae1dfc: 900085b3 adrp x19, ffff800009b95000 I etm4_enable_hw: ffff800008ae1e00: 910f4273 add x19, x19, #0x3d0 I etm4_enable_hw: ffff800008ae1e04: f8747a60 ldr x0, [x19, x20, lsl #3] E etm4_enable_hw: ffff800008ae1e08: b4000140 cbz x0, ffff800008ae1e30 I 149.046243445 etm4_enable_hw: ffff800008ae1e30: a94153f3 ldp x19, x20, [sp, #16] I 149.046243445 etm4_enable_hw: ffff800008ae1e34: 52800000 mov w0, #0x0 // #0 I 149.046243445 etm4_enable_hw: ffff800008ae1e38: a8c27bfd ldp x29, x30, [sp], #32 I 149.046243445 etm4_enable_hw: ffff800008ae1e3c: d50323bf autiasp E 149.046243445 etm4_enable_hw: ffff800008ae1e40: d65f03c0 ret A ete_sysreg_write: ffff800008adfa18 ..snip I 149.05422547 panic: ffff800008096300: a90363f7 stp x23, x24, [sp, #48] I 149.05422547 panic: ffff800008096304: 6b00003f cmp w1, w0 I 149.05422547 panic: ffff800008096308: 3a411804 ccmn w0, #0x1, #0x4, ne // ne = any N 149.05422547 panic: ffff80000809630c: 540001e0 b.eq ffff800008096348 // b.none I 149.05422547 panic: ffff800008096310: f90023f9 str x25, [sp, #64] E 149.05422547 panic: ffff800008096314: 97fe44ef bl ffff8000080276d0 A panic: ffff80000809634c I 149.05422547 panic: ffff80000809634c: 910102d5 add x21, x22, #0x40 I 149.05422547 panic: ffff800008096350: 52800020 mov w0, #0x1 // #1 E 149.05422547 panic: ffff800008096354: 94166b8b bl ffff800008631180 N 149.054225518 bust_spinlocks: ffff800008631180: 340000c0 cbz w0, ffff800008631198 I 149.054225518 bust_spinlocks: ffff800008631184: f000a321 adrp x1, ffff800009a98000 I 149.054225518 bust_spinlocks: ffff800008631188: b9405c20 ldr w0, [x1, #92] I 149.054225518 bust_spinlocks: ffff80000863118c: 11000400 add w0, w0, #0x1 I 149.054225518 bust_spinlocks: ffff800008631190: b9005c20 str w0, [x1, #92] E 149.054225518 bust_spinlocks: ffff800008631194: d65f03c0 ret A panic: ffff800008096358}hj5sbah}(h]h ]h"]h$]h&]jjuh1jhhhM hjhhubeh}(h]sample-instruction-trace-dumpah ]h"]sample instruction trace dumpah$]h&]uh1hhjvhhhhhKubeh}(h]=sample-commands-for-testing-a-kernel-panic-case-with-etr-sinkah ]h"]=sample commands for testing a kernel panic case with etr sinkah$]h&]uh1hhhhhhhhKnubh)}(hhh](h)}(hPerf based testingh]hPerf based testing}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShhhhhMZubh)}(hhh](h)}(hStarting perf sessionh]hStarting perf session}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhhhhhM]ubh)}(hETF::h]hETF:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjdhhubj)}(h_perf record -e cs_etm/panicstop,@tmc_etf1/ -C 1 perf record -e cs_etm/panicstop,@tmc_etf2/ -C 2h]h_perf record -e cs_etm/panicstop,@tmc_etf1/ -C 1 perf record -e cs_etm/panicstop,@tmc_etf2/ -C 2}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM`hjdhhubh)}(hETR::h]hETR:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjdhhubj)}(h1perf record -e cs_etm/panicstop,@tmc_etr0/ -C 1,2h]h1perf record -e cs_etm/panicstop,@tmc_etr0/ -C 1,2}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMehjdhhubeh}(h]starting-perf-sessionah ]h"]starting perf sessionah$]h&]uh1hhjShhhhhM]ubh)}(hhh](h)}(hReading trace data after panich]hReading trace data after panic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMhubh)}(h{Same sysfs based method explained above can be used to retrieve and decode the trace data after the reboot on kernel panic.h]h{Same sysfs based method explained above can be used to retrieve and decode the trace data after the reboot on kernel panic.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjhhubeh}(h]reading-trace-data-after-panicah ]h"]reading trace data after panicah$]h&]uh1hhjShhhhhMhubeh}(h]perf-based-testingah ]h"]perf based testingah$]h&]uh1hhhhhhhhMZubeh}(h]3using-coresight-for-kernel-panic-and-watchdog-resetah ]h"]3using coresight for kernel panic and watchdog resetah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjhhjjjjjjj-j*jTjQjjjsjpjPjMjHjEjjjjjju nametypes}(jh݉jjjj-jTjjsjPjHjjjuh}(jhhhjhjjqjjj*jjQj0jjWjpjjMjvjEjjjSjjdjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "4" (ordinal 4)h]h>Enumerated list start value not ordinal-1: “4” (ordinal 4)}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jqhjvhhhhhKubatransform_messages] transformerN include_log] decorationNhhub.