NVIDIA Tegra
NVIDIA Tegra Linux Driver Package

Development Guide
28.1 Release


 
Debugging with Register Trace Buffers
 
Locating RTRACE Output
RTRACE can be used to determine what register access happened before a reset or panic. With RTRACE, kernel traces trigger read/write calls into a persistent register trace buffer that can be decoded and dumped after reboot, using the pstore file system. Tegra RTRACE does not require ramdump. It prints parsed output from the device directly.
To enable RTRACE
1. Add the following to the kernel configuration:
CONFIG_PSTORE_RTRACE=y
2. Along with the above macro, also add the following to start RTRACE automatically:
CONFIG_PSTORE_RTRACE_ENABLE_AT_STARTUP=y
To start and stop RTRACE
To start RTRACE, enter the command:
$ echo 1 > /sys/kernel/debug/pstore/record_rtrace
To stop RTRACE, enter the command:
$ echo 0 > /sys/kernel/debug/pstore/record_rtrace
Locating RTRACE Output
Output from RTRACE is available after reboot in the following file on the device:
/sys/fs/pstore/rtrace-ramoops
RTRACE output is similar to the following:
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 W fe406304 <- c038df18 mem_serial_out+0x30/0x38