<?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>topic L2 cache coherence issue on e6500 Rev-2.0 in T-Series</title>
    <link>https://community.nxp.com/t5/T-Series/L2-cache-coherence-issue-on-e6500-Rev-2-0/m-p/617714#M1538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an e6500 L2 cache issue perplexed me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Target board:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;T4240QDS and T2080QDS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Core version:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;e6500 REV-2.0&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OS:&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;WindRiver's VxWorks SMP system&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Boot loader:&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; u-boot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Phenomenon description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In my test case, one of the T4240 (or T2080) core continues to write an increased value to a&amp;nbsp;specified memory address (this space is pointed by pMemAddr). The address is could be accessed for other cores. The operation just likes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*(volatile UINT32 *)(pMemAddr) = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (testRun)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(*(volatile unsigned int *)(pMemAddr))++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;This core, I name it as writer in here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another core continues to check whether the context in the memory address is changed or not. I named this core as reader. The reader just could find the context in the memory (pointed by pMemAddr) is changed from the initialized value (deadbeef) to 0 and kept, no more changed again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the write instruction in the loop is followed by a memory barrier instruction, then the reader could find the memory context is changed in real time, the&amp;nbsp;coherence issue will be no more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*(volatile UINT32 *)(pMemAddr) = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (testRun)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(*(volatile unsigned int *)(pMemAddr))++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm volatile(" sync ");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue is occurred only on CPU with e6500 REV-2.0 core, such as T4240 REV-2.0 and T2080 REV-1.0, but not on T4240 REV-1.0 (e6500 REV-1.0), e5500 core types (T1040E) and e500mc types (P4080E).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why this issue occurred?&lt;/P&gt;&lt;P&gt;What is difference between e6500 REV-1.0 and REV-2.0?&lt;/P&gt;&lt;P&gt;Whether is the memory barrier instruction is needed on this condition the in normal?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yintai Shao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Nov 2016 07:30:32 GMT</pubDate>
    <dc:creator>yintai_shao</dc:creator>
    <dc:date>2016-11-01T07:30:32Z</dc:date>
    <item>
      <title>L2 cache coherence issue on e6500 Rev-2.0</title>
      <link>https://community.nxp.com/t5/T-Series/L2-cache-coherence-issue-on-e6500-Rev-2-0/m-p/617714#M1538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an e6500 L2 cache issue perplexed me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Target board:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;T4240QDS and T2080QDS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Core version:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;e6500 REV-2.0&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OS:&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;WindRiver's VxWorks SMP system&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Boot loader:&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; u-boot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Phenomenon description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In my test case, one of the T4240 (or T2080) core continues to write an increased value to a&amp;nbsp;specified memory address (this space is pointed by pMemAddr). The address is could be accessed for other cores. The operation just likes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*(volatile UINT32 *)(pMemAddr) = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (testRun)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(*(volatile unsigned int *)(pMemAddr))++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;This core, I name it as writer in here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another core continues to check whether the context in the memory address is changed or not. I named this core as reader. The reader just could find the context in the memory (pointed by pMemAddr) is changed from the initialized value (deadbeef) to 0 and kept, no more changed again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the write instruction in the loop is followed by a memory barrier instruction, then the reader could find the memory context is changed in real time, the&amp;nbsp;coherence issue will be no more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*(volatile UINT32 *)(pMemAddr) = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (testRun)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(*(volatile unsigned int *)(pMemAddr))++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm volatile(" sync ");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue is occurred only on CPU with e6500 REV-2.0 core, such as T4240 REV-2.0 and T2080 REV-1.0, but not on T4240 REV-1.0 (e6500 REV-1.0), e5500 core types (T1040E) and e500mc types (P4080E).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why this issue occurred?&lt;/P&gt;&lt;P&gt;What is difference between e6500 REV-1.0 and REV-2.0?&lt;/P&gt;&lt;P&gt;Whether is the memory barrier instruction is needed on this condition the in normal?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yintai Shao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 07:30:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/T-Series/L2-cache-coherence-issue-on-e6500-Rev-2-0/m-p/617714#M1538</guid>
      <dc:creator>yintai_shao</dc:creator>
      <dc:date>2016-11-01T07:30:32Z</dc:date>
    </item>
  </channel>
</rss>

