<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: Linux kernel debug breakpoint problem</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496560#M79933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andrew,&lt;/P&gt;&lt;P&gt;this fault indicates some access issue.&lt;/P&gt;&lt;P&gt;some hits so far:&lt;/P&gt;&lt;P&gt;- WFI instruction in Linux which implements the delay have to be replaced by NOP - could be in kernel menu config.&lt;/P&gt;&lt;P&gt;- MMU has to be set correctly to enable debugger to access SoC - please check &lt;A href="http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf" title="http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf"&gt;http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf&lt;/A&gt; page 25 DACR&lt;/P&gt;&lt;P&gt;Please describe your setup more deeply (HW+SW). Presume that you use DS-5 + DSTREAM - please correct me. We will try to replicate it.&lt;/P&gt;&lt;P&gt;/Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2016 08:43:40 GMT</pubDate>
    <dc:creator>jiri-b36968</dc:creator>
    <dc:date>2016-02-11T08:43:40Z</dc:date>
    <item>
      <title>Linux kernel debug breakpoint problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496558#M79931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an i.MX7 Rev B board &lt;SPAN style="color: #1f497d;"&gt;running Freescale Yocto Linux (Linux imx7dsabresd 3.14.38-6UL_ga+ge4944a5) and I'm debugging the kernel using JTAG halted mode debug.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I'm attempting to set a breakpoint so I can debug a kernel module, but when the breakpoint is hit, it causes a kernel exception rather entering into debug mode in the debugger:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;root@imx7dsabresd:~# modprobe -r imx_rpmsg_tty&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Unhandled prefetch abort: breakpoint debug exception (0x002) at 0x80086600&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Internal error: : 2 [#1] PREEMPT SMP ARM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Modules linked in: imx_rpmsg_tty evbug&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;CPU: 1 PID: 735 Comm: modprobe Not tainted 3.14.38-6UL_ga+ge4944a5 #4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;task: a81c6880 ti: a8bc4000 task.ti: a8bc4000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;PC is at SyS_delete_module+0x0/0x174&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;LR is at ret_fast_syscall+0x0/0x30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;pc : [&amp;lt;80086600&amp;gt;]&amp;nbsp;&amp;nbsp;&amp;nbsp; lr : [&amp;lt;8000e460&amp;gt;]&amp;nbsp;&amp;nbsp;&amp;nbsp; psr: 80080013&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;sp : a8bc5fa8&amp;nbsp; ip : 10c53c7d&amp;nbsp; fp : 000aedf0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;r10: 00000000&amp;nbsp; r9 : a8bc4000&amp;nbsp; r8 : 8000e5e4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;r7 : 00000081&amp;nbsp; r6 : 000aee24&amp;nbsp; r5 : 000aee24&amp;nbsp; r4 : 000aedf0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;r3 : 00000000&amp;nbsp; r2 : 76f00104&amp;nbsp; r1 : 00000800&amp;nbsp; r0 : 000aee24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Flags: Nzcv&amp;nbsp; IRQs on&amp;nbsp; FIQs on&amp;nbsp; Mode SVC_32 ISA ARM&amp;nbsp; Segment user&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Control: 10c53c7d&amp;nbsp; Table: a854c06a&amp;nbsp; DAC: 00000015&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Process modprobe (pid: 735, stack limit = 0xa8bc4238)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Stack: (0xa8bc5fa8 to 0xa8bc6000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;5fa0: 000aedf0 000aee24 000aee24 00000800 76f00104 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;5fc0: 000aedf0 000aee24 000aee24 00000081 00000001 00000000 00000001 000aedf0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;5fe0: 76ec5eb0 7ebe4a64 00016e3c 76ec5ebc 60080010 000aee24 00000000 00000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Code: e59510c8 e8bd40f8 eaffff84 80a78208 (e120be70)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;---[ end trace 062b135e73d4dfd6 ]---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Courier New'; color: #1f497d;"&gt;Segmentation fault&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Logging shows that the CP14 DBGDSCR register has both the halted mode debug and monitor mode debug bits cleared when the exception is taken - this lead me to believe that &lt;/SPAN&gt;&lt;SPAN style="color: #1f497d;"&gt;the Cortex-A7 core is being powered down in some way and then restored, and it is this that is clearing the halted mode debug bit from the DBGDSCR - I can find nothing in the kernel which explicitly does this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Disabling CPU idle by removing it from the kernel or disabling it by issuing the following commands:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'courier new', courier;"&gt;echo 1 &amp;gt;&amp;nbsp; /sys/devices/system/cpu/cpu0/cpuidle/state1/disable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'courier new', courier;"&gt;echo 1 &amp;gt;&amp;nbsp; /sys/devices/system/cpu/cpu0/cpuidle/state2/disable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'courier new', courier;"&gt;echo 1 &amp;gt;&amp;nbsp; /sys/devices/system/cpu/cpu1/cpuidle/state1/disable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d; font-family: 'courier new', courier;"&gt;echo 1 &amp;gt;&amp;nbsp; /sys/devices/system/cpu/cpu1/cpuidle/state2/disable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;didn't help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;It may be that the core is not powering down, however keeping the core busy &lt;/SPAN&gt;&lt;SPAN style="color: #1f497d;"&gt;by adding a ‘while 1’ loop in bash does help reduce this exception from happening, but does not solve the problem to an acceptable level. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Any help on this issue would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Andrew.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 11:27:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496558#M79931</guid>
      <dc:creator>debuguser</dc:creator>
      <dc:date>2016-02-09T11:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Linux kernel debug breakpoint problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496559#M79932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andrew,&lt;/P&gt;&lt;P&gt;If I have problem like this I would call ARM :smileyhappy:. We will check it.&lt;/P&gt;&lt;P&gt;Quick note 3.14.52 is available.&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/michalsusen"&gt;michalsusen&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/markruthenbeck"&gt;markruthenbeck&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;/Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 13:18:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496559#M79932</guid>
      <dc:creator>jiri-b36968</dc:creator>
      <dc:date>2016-02-09T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linux kernel debug breakpoint problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496560#M79933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andrew,&lt;/P&gt;&lt;P&gt;this fault indicates some access issue.&lt;/P&gt;&lt;P&gt;some hits so far:&lt;/P&gt;&lt;P&gt;- WFI instruction in Linux which implements the delay have to be replaced by NOP - could be in kernel menu config.&lt;/P&gt;&lt;P&gt;- MMU has to be set correctly to enable debugger to access SoC - please check &lt;A href="http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf" title="http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf"&gt;http://www.lauterbach.com/pdfnew/training_rtos_linux.pdf&lt;/A&gt; page 25 DACR&lt;/P&gt;&lt;P&gt;Please describe your setup more deeply (HW+SW). Presume that you use DS-5 + DSTREAM - please correct me. We will try to replicate it.&lt;/P&gt;&lt;P&gt;/Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 08:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496560#M79933</guid>
      <dc:creator>jiri-b36968</dc:creator>
      <dc:date>2016-02-11T08:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Linux kernel debug breakpoint problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496561#M79934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replaced the WFI instruction with NOP and the problem still happened, also the MMU global writes are enabled, there is no problem writing memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We now have an acceptable work around however - I'll look into this again in a couple of weeks, it might be tools related but difficult to tell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close this thread and I'll create a new one when I have more precise information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;Andrew.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:05:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-kernel-debug-breakpoint-problem/m-p/496561#M79934</guid>
      <dc:creator>debuguser</dc:creator>
      <dc:date>2016-02-11T18:05:39Z</dc:date>
    </item>
  </channel>
</rss>

