<?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 Re: Regarding L1CSR0 register change. in P-Series</title>
    <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197205#M56</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="code.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38093i549EF55112C5E8BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="code.jpg" alt="code.jpg" /&gt;&lt;/span&gt;Thanks a lot for reply Scott.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My statement is not clear in above note. Let me try once again, I'm checking AND to ensure the bit is not already set before enable the compact mode after then I'm doing OR with the 0x00000008 to update the L1CSR0 register and reverse for clear the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the snippet of code (partial pseudo type):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not able to insert the code (not sure on reason) so attached the Jpeg image format for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2012 07:20:29 GMT</pubDate>
    <dc:creator>Simbu</dc:creator>
    <dc:date>2012-09-21T07:20:29Z</dc:date>
    <item>
      <title>Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197201#M52</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;I'm working on a P4 Processor(e500mc)&amp;nbsp; in which need to modify the status of the L1CSR0 register (Bit : 60) and trying the below pseudo code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; sync&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; Read from L1CSR0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; sync&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; isync&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; Write to L1CSR0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;--&amp;gt; isync&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;But, I could see the changes are not reflected or getting into some wierd issues (like panic and other memory related probelms). Am I missing something here? Could anyone provide pointer on this regard?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 14:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197201#M52</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-20T14:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197202#M53</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What values are you reading from, and then writing to, &lt;SPAN style="font-family: courier new,courier;"&gt;L1CSR0?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 14:59:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197202#M53</guid>
      <dc:creator>timurtabi</dc:creator>
      <dc:date>2012-09-20T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197203#M54</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm reading the existing value from l1csr0 and doing AND operation against 0x00000008 to update the _32 compact bit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 17:56:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197203#M54</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-20T17:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197204#M55</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That'll clear every other bit and leave DCBZ32 alone -- which will definitely cause problems like you describe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to set the bit, OR with 0x00000008.&amp;nbsp; If you want to clear the bit, AND with ~0x00000008 (bitwise inversion of 0x00000008).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If I'm misinterpreting your response, could you show the actual code and the actual values read and written?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 20:29:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197204#M55</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-09-20T20:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197205#M56</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="code.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38093i549EF55112C5E8BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="code.jpg" alt="code.jpg" /&gt;&lt;/span&gt;Thanks a lot for reply Scott.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My statement is not clear in above note. Let me try once again, I'm checking AND to ensure the bit is not already set before enable the compact mode after then I'm doing OR with the 0x00000008 to update the L1CSR0 register and reverse for clear the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the snippet of code (partial pseudo type):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not able to insert the code (not sure on reason) so attached the Jpeg image format for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 07:20:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197205#M56</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-21T07:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197206#M57</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For now (short term), I'm not concerned about performance penalty or any kernel degradation. so, I have tried to setup the value in "__e500_dcache_setup" code by executing below piece of code.&lt;/P&gt;&lt;P&gt;ori&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, r0, 0x00000008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But no behaviour change after the above code condition also.&lt;/P&gt;&lt;P&gt;Thx..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 12:00:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197206#M57</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-21T12:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197207#M58</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said that "&lt;SPAN style="font-family: courier new,courier;"&gt;I could see the changes are not reflected or getting into some wierd issues (like panic and other memory related probelms)".&amp;nbsp; How did you see the changes not being reflected?&amp;nbsp; You read the register back and that bit wasn't set?&amp;nbsp; Or you did a dcbz and saw 64 bytes cleared?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;As for kernel crashes and such, are you sure that the kernel is able to work in dcbz32 mode?&amp;nbsp; If you're talking about Linux, I think it'll need some changes for that, to use dcbzl.&amp;nbsp; Otherwise it will only clear every other 32 bytes in a dcbz loop, because the kernel is assuming a 64 byte cache block on this platform.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 16:26:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197207#M58</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-09-21T16:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197208#M59</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said that "I could see the changes are not reflected or getting into some wierd issues (like panic and other memory related probelms)".&amp;nbsp; How did you see the changes not being reflected?&amp;nbsp; You read the register back and that bit wasn't set?&amp;nbsp; Or you did a dcbz and saw 64 bytes cleared?&lt;/P&gt;&lt;P&gt;Basically, have introduced per-thread flag in kernel to enable and clear this functionality and could see my app (able to dump the memory segment which is affected by the dcbz inst) is not able perform &lt;BR /&gt;data cache operation on 32 Bytes intead could see always doing on 64 Bytes.&lt;/P&gt;&lt;P&gt;I have checked the value after modfying the register and could see the changes are reflected back in the register, but not &lt;BR /&gt;in my app.&lt;/P&gt;&lt;P&gt;Below is the snippet of code in detail:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-- Introduced Per-thread flag (TIF_..).&lt;BR /&gt;-- Enabled the functionality according to the flag (!TIF_..)&lt;BR /&gt;-- handled the flag clear and functionalty disabled in sys_execve () and compact_sys_execve&lt;BR /&gt;-- Load app (syscall -&amp;gt; Kernel -&amp;gt; set and enable the flag &amp;amp; Fucntionality)&lt;BR /&gt;-- Verification of DCBZ inst.&lt;/P&gt;&lt;P&gt;I'm not sure there is any other simple (as compare to above one) to verify my app execution for time being would be good.&lt;/P&gt;&lt;P&gt;Every I tried to do something like CPU specific (CPU 0) or User program specific (as changes are required for user program alone), but &lt;BR /&gt;no expected results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 16:48:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197208#M59</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-21T16:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197209#M60</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you testing that the DCBZ32 bit is actually set at the time (i.e. that there's no bug in the per-process mechanism)?&amp;nbsp; E.g. single step with an external debugger, make a system call immediately before and after doing the dcbz to dump L1CSR0, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried dcbz with DCBZ32 under a simpler environment such as a U-Boot, a standalone program, or early kernel boot to verify that it's working as expected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure you're using dcbz and not dcbzl (i.e. bit 0x00200000 of the opcode must be unset)?&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 19:30:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197209#M60</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-09-21T19:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197210#M61</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Scott !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my app I'm using an externel single step debugger to execute my app program store instruction by instruction and parllely checking the memory location which DCBZ suppose to clear before and after instruction execution (As we are discussing it is zeoring 64 Bytes&lt;/P&gt;&lt;P&gt;instead of 32 Bytes),I'm not dumping L1CSR0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My assumption is that when there is a context switch then thread will be set which will enable the DCBZ_32 functionality for an user app&lt;/P&gt;&lt;P&gt;so that instruction will get execute in 32 Bytes (may be not 100 % clear as I could give more from my code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not able to debug the context switch or either task switch scenario and not sure how wise to make a syscall for each execution of&lt;/P&gt;&lt;P&gt;dcbz instruction as the occurances of the instruction in program store is quite large.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tried to check the behaviour during early kernel reboot yet, but maybe need to give a try if there is suspect it maynot work in &lt;/P&gt;&lt;P&gt;kernel mode too.But I tried to set the value and dumped the value of L1CSR0 after updation and could see it got refelcted properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest me a way to achieve the debug platform for DCBZ? I can place a breakpoint in a porgram store(user app) to get a hit but &lt;/P&gt;&lt;P&gt;not able to imagine how could I achieve the 32 Bytes execution for specific app without making system wide change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2012 09:20:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197210#M61</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-22T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197211#M62</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please read L1CSR0 with the external debugger while stepping through the code where you see dcbz affect 64 bytes.&amp;nbsp; Let's focus on whether the hardware is behaving properly -- debugging your Linux modifications is beyond the scope of this forum (especially without actually seeing them).&amp;nbsp; You could ask your sales contact for such a mechanism as an SDK feature request, or if you want to work with the open source community to get this debugged and merged into the kernel, you could post an RFC patch against the latest upstream kernel to the open source linuxppc-dev list (be sure to mention that you need help debugging it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The suggestion to make a system call was for debug purposes -- to have the kernel print L1CSR0 at that moment -- not something that should be left in the final product.&amp;nbsp; It would be better to use the external debugger to read L1CSR0, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 22:54:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197211#M62</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-09-24T22:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197212#M63</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000;"&gt;Thank you Scott.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000;"&gt;I'll give more try (debug and other possibilities) before approach open C// or Forum. I have listed few items to verify in sequence and will post the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000;"&gt;Once again thanks for your replies and suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker" style="font-family: tahoma,arial,helvetica,sans-serif; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:40:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197212#M63</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-09-25T18:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197213#M64</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Been facin this thing myself. Good that someone down there has had the same thing to tackle. Nonetheless, getting back to this topic, you say "&lt;EM&gt;If you're talking about Linux, I think it'll need some changes for that, to use dcbzl.&amp;nbsp; Otherwise it will only clear every other 32 bytes in a dcbz loop, because the kernel is assuming a 64 byte cache block on this platform&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'd like to understand what you mean here. To facilitate your answer, I'd add what I understand of this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I assume you mean it is NOT possible for the cache line size to be 32 bytes for a certain process and platform default otherwise. Right? Or do you mean something else? Or is it even possible or feasible to have such a per-process arrangement with respect to the cache block size?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now adding to the above, my question is, If I just set the DCBZ32 bit in the L1CSR0 register, will that suffice or do I need to also do some other stuff in order to give an impression to the bootloader or the OS for that matter that my cache line size is 32 bytes and not 64 bytes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keen to hear from you guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Scott Wood wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;You said that "&lt;SPAN style="font-family: courier new, courier;"&gt;I could see the changes are not reflected or getting into some wierd issues (like panic and other memory related probelms)".&amp;nbsp; How did you see the changes not being reflected?&amp;nbsp; You read the register back and that bit wasn't set?&amp;nbsp; Or you did a dcbz and saw 64 bytes cleared?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new, courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new, courier;"&gt;As for kernel crashes and such, are you sure that the kernel is able to work in dcbz32 mode?&amp;nbsp; If you're talking about Linux, I think it'll need some changes for that, to use dcbzl.&amp;nbsp; Otherwise it will only clear every other 32 bytes in a dcbz loop, because the kernel is assuming a 64 byte cache block on this platform.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 12:47:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197213#M64</guid>
      <dc:creator>pegasus711_knig</dc:creator>
      <dc:date>2012-10-09T12:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197214#M65</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DCBZ32 doesn't actually make the cache line be 32 bytes, it just changes the behavior of dcbz, dcba, and dcbzep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The kernel assumes that dcbz operates on the full cache block, as it properly considers the actual cache block size instead of assuming 32 bytes.&amp;nbsp; If only 32 bytes get cleared when it's expecting 64 bytes to get cleared, bad things will happen.&amp;nbsp; There is a dcbzl instruction that always uses the real cache block size regardless of DCBZ32.&amp;nbsp; You'll need to use that in the kernel if you set DCBZ32.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll also need to make sure that you don't have DCBZ32 set for any processes that are assuming the real cache block size will be used (or fool the processes into believing that the cache block size is 32 bytes, though there is a performance penalty for DCBZ32 so you may not want to do that).&amp;nbsp; It's more realistic to change it on a per-process basis than on kernel entry/exit, though in either case it's not something that is currently implemented in Linux.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 17:48:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197214#M65</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-10-09T17:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197215#M66</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As mentioned by Scott in below thread, only setting the bit in L1CSR0 will not suffice the actual need.I tired in my first attempt and got panic as part of the boot process.Another thing which I tried by placing a hook to control DCBZ and DCBZL using a configuration flag (No hope). I need to cross check the place of bit setting and also facing challenges with my toolchain which is making my app to believe the cache line size is 64 Bytes (attempting to fool the processes into believing that the cache block size is 32 bytes)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 18:57:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197215#M66</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-10-09T18:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197216#M67</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm..thanks Scott and Simbu for your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Scott a better way would be to replace dcbz, dcbza and dcbzep with their long equivalents for processes that does require the hardware default cache size that the core offers? if not then have this bit set in L1CSR0 (for d-cache), follow the sync requirements mentioned in the manuals and be done with it? What I am unable to get my head around is actually understanding how setting this bit on a per process basis, with a process being more of a kernel construct, work with the exact same register on the hardware level, with some processes requiring the entire native cache line size while the others needing only 32 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make myself clear: Consider two processes P1 and P2. P1 doesn't need this bit set and P2 does. Now the scheduler has P1 scheduled before P2. P1 goes ahead, fetches a certain memory location, finds that the dcache does not have the needed memory location in the dcache, brings it from the RAM, updates the cache block (line) and sets the appropriate bit telling that the cache line is valid. Now the scheduler schedules P2, which ironically wants the same memory and it wants to have this memory area from the cache cleared (why would it want the same memory area is beyond me although) . So although this requirement may sound stupid, if it needs to work on the same cache line for some strange reason, and in addition it also needs it to be 32bytes only, then what if it goes and sets that bit in this register. What would happen to the other 32 bytes in that line?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Simbu: I believe the flag, as Scott said above was process based (although it has to be global flag it seems). I wonder if having a separate config option added to the KConfigs under powerpc would be right? Any comments on this Scott?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally simbu, you said your tool chain is givin you problems. Is there a way to specify this to GCC? I mean cache line size? IF yes why would you want to specify it while doing the compilation,linking, loading translation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping to hear from you fellas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 17:46:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197216#M67</guid>
      <dc:creator>pegasus711_knig</dc:creator>
      <dc:date>2012-10-10T17:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197217#M68</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Pegasus711 KnightRider wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hmmm..thanks Scott and Simbu for your inputs.&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;P&gt;So Scott a better way would be to replace dcbz, dcbza and dcbzep with their long equivalents for processes that does require the hardware default cache size that the core offers? if not then have this bit set in L1CSR0 (for d-cache), follow the sync requirements mentioned in the manuals and be done with it?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;In the kernel, yes, though I wouldn't look at it as "requires the hardware default cache size" but "does not have a legacy requirement for a simulated 32-byte cache block".&amp;nbsp; The best way is to avoid the need for DCBZ32 at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not recommend trying to selectively patch up userspace to use dcbzl.&amp;nbsp; Either implement a per-process mechanism or lie to userspace and say that cache blocks are 32 bytes.&lt;/P&gt;&lt;BLOCKQUOTE&gt;What I am unable to get my head around is actually understanding how setting this bit on a per process basis, with a process being more of a kernel construct, work with the exact same register on the hardware level, with some processes requiring the entire native cache line size while the others needing only 32 bytes.
&lt;P&gt;To make myself clear: Consider two processes P1 and P2. P1 doesn't need this bit set and P2 does. Now the scheduler has P1 scheduled before P2. P1 goes ahead, fetches a certain memory location, finds that the dcache does not have the needed memory location in the dcache, brings it from the RAM, updates the cache block (line) and sets the appropriate bit telling that the cache line is valid. Now the scheduler schedules P2, which ironically wants the same memory and it wants to have this memory area from the cache cleared (why would it want the same memory area is beyond me although) . So although this requirement may sound stupid, if it needs to work on the same cache line for some strange reason, and in addition it also needs it to be 32bytes only, then what if it goes and sets that bit in this register. What would happen to the other 32 bytes in that line?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;Again, DCBZ32 does not alter the actual structure of cache.&amp;nbsp; A cache line is 64 bytes on e500mc, always.&amp;nbsp; DCBZ32 just changes the behavior of instructions like dcbz.&amp;nbsp; Instead of allocating and zeroing a cache line, it becomes a "zero out 32 bytes at this address" instruction.&amp;nbsp; The performance benefit of dcbz is lost.&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;To Simbu: I believe the flag, as Scott said above was process based (although it has to be global flag it seems). I wonder if having a separate config option added to the KConfigs under powerpc would be right? Any comments on this Scott?&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;P&gt;Additionally simbu, you said your tool chain is givin you problems. Is there a way to specify this to GCC? I mean cache line size? IF yes why would you want to specify it while doing the compilation,linking, loading translation?&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;P&gt;Hoping to hear from you fellas&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;I didn't say that it is process based normally -- that was something that Simbu was trying to implement.&amp;nbsp; The current state of the kernel is that DCBZ32 is not supported.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 19:21:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197217#M68</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-10-10T19:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197218#M69</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To KnightRider :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The flag I was trying to make work is basically a control bit kinda (TIF__) which you can set upon your process lauch and control using task &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;switch (set and clear depends on prev and current process bit value). I tried to root cause the issue, but because of time constraint and few other reasons &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;switched to other way.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For user space app, we need to change libc to make sure it always uses &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, trying to replace all the DCBZ32 affected instruction with its extended instructions like dcbz with dcbzl. Able to code these changes (for primary and secondary cores) in &lt;/P&gt;&lt;P&gt;kernel source files but trying to find the source tree of FSL device drivers like DPAA which a suspect for boot hung (hoping it uses DCBZ or DCBA). Scott any idea here??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once able to boot the kernel with DCBZ change then have prepared snippet of code (kernel space) which will clear memory range using dcbz (to verify the new changes). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks simple, but not coming on my way...&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 18:48:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197218#M69</guid>
      <dc:creator>Simbu</dc:creator>
      <dc:date>2012-10-11T18:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197219#M70</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The datapath drivers are in drivers/staging/fsl_qbman, though it looks like they already use dcbzl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 22:33:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197219#M70</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2012-10-11T22:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding L1CSR0 register change.</title>
      <link>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197220#M71</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simbu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok. I seem to get what you are trying to do. On browsing some more on the surface of this vast ocean called the kernel mailing lists, Ive seemed to come across a fellow called Chris who is (or was) affiliated with Genband (the company). He was apparently trying to move some legacy apps from the PPC970 to the e5500. Heres the thread Im talking about:&lt;/P&gt;&lt;P&gt;&lt;A href="https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-September/085772.html" title="https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-September/085772.html"&gt;https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-September/085772.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott, which I believe it is you, then in the follow up, asked him to check with the BSP vendor. Now I have a few questions regarding the same.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Could you please elaborate why would one want to do that in the BSP? I mean what benefit would one derive by doing it in the BSP vis-a-vis in the early init parts of the Linux kernel?&lt;/LI&gt;&lt;LI&gt;Now one effect of doing that, that I see is that every DCBZ will always be translated to an operation with 32 bytes of cache line size right? This would mean that those parts in the kernel where a DCBZ was actually dependent on the actual 'default' cache line size would need to be changed to DCBZL as you say. Right?&lt;/LI&gt;&lt;LI&gt;Would be kind enough to give me a hint on which files would require doing such a change? I mean which files or directories under $LINUX=/usr/src/linux/ would one be interested to look at? Looking at 2.6.27.10 I am trying to indentify which file(s) under $LINUX/arch/powerpc/kernel/ will I be targetting. &lt;STRONG&gt;&lt;EM&gt;I believe since the P4080 contains 8 e500 cores, it is also categorized as belonging to the 'Book E' family right? &lt;/EM&gt;&lt;/STRONG&gt;This means that I should be looking at head_fsl_booke.S which is the 'head.S' file for this core isnt it?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Simbu:&lt;/P&gt;&lt;P&gt;Why do you think would any driver would want to have itself dependent on the width of the processor's internal cache line? That would deliberately make the code HIGHLY NON-PORTABLE. My suspicion is that there is something on the kernel side that you may have missed. Scott could you please comment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 07:49:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Regarding-L1CSR0-register-change/m-p/197220#M71</guid>
      <dc:creator>pegasus711_knig</dc:creator>
      <dc:date>2012-10-13T07:49:43Z</dc:date>
    </item>
  </channel>
</rss>

