<?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>MPC5xxx中的主题 Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2051775#M27331</link>
    <description>&lt;P&gt;The ICINV/DCINV Flash invalidation invalidates ALL cache, locked lines are also invalidated using this, but ICLFC/DCLFC will not be altered by the invalidation action, so to clear the Lock Bits the software must write this bit. You will end up with an invalid line which is locked if you just do the invalidate operation with this register.&lt;/P&gt;
&lt;P&gt;The icbi cache instructions invalidates and unlocks a cache lines in the L1 ICache.&lt;/P&gt;
&lt;P&gt;Pay attention to following presentation, slides 115-139, showing detailed description of cache instructions and also some code examples:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/e200-Core-Training-relevant-to-MPC55xx-and-MPC56xx-device-family/ta-p/1115124" target="_blank"&gt;https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/e200-Core-Training-relevant-to-MPC55xx-and-MPC56xx-device-family/ta-p/1115124&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2025 12:42:06 GMT</pubDate>
    <dc:creator>davidtosenovjan</dc:creator>
    <dc:date>2025-02-26T12:42:06Z</dc:date>
    <item>
      <title>Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2050794#M27325</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am following AN5191 guidance to boot a MPC5777C custom board and some of its built-in tests require me to disable the caches to perform some actions, then re-enable them for normal operation. Considering that I took half of the data cache to be my stack (using the AN5191 code based on dcbz and dcbtls instructions), how should I proceed to keep the stack working while disabling the rest of the data cache?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 11:47:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2050794#M27325</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2025-02-25T11:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2051775#M27331</link>
      <description>&lt;P&gt;The ICINV/DCINV Flash invalidation invalidates ALL cache, locked lines are also invalidated using this, but ICLFC/DCLFC will not be altered by the invalidation action, so to clear the Lock Bits the software must write this bit. You will end up with an invalid line which is locked if you just do the invalidate operation with this register.&lt;/P&gt;
&lt;P&gt;The icbi cache instructions invalidates and unlocks a cache lines in the L1 ICache.&lt;/P&gt;
&lt;P&gt;Pay attention to following presentation, slides 115-139, showing detailed description of cache instructions and also some code examples:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/e200-Core-Training-relevant-to-MPC55xx-and-MPC56xx-device-family/ta-p/1115124" target="_blank"&gt;https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/e200-Core-Training-relevant-to-MPC55xx-and-MPC56xx-device-family/ta-p/1115124&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 12:42:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2051775#M27331</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-02-26T12:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2057315#M27362</link>
      <description>&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use L1FINV0[CCMD] to force CWAY to 0 for a 4KB stack? I was thinking about something like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;stack_cache_0:
mfpir r3
se_cmpi r3,0
se_bne stack_cache_1 /* this part is Core 0 only */
/* assuming a 4KB stack */
e_li r4,3 # will set L1FINV0[CWAY] = 0 and L1FINV0[CCMD] = 3
e_lis r5,__CPU0_STACK_SIZE@h
e_or2i r5,__CPU0_STACK_SIZE@l
se_srwi r5,5 # Shift the contents of R3 right by 5 bits (stack_size/32 = 128)
se_mtctr r5
e_lis r3,_cpu0_stack_end@h
e_or2i r3,_cpu0_stack_end@l
mtl1finv0 r4
lock_cache_loop_cpu0_way0:
dcbz r0,r3 # Establish address in cache for 32 bytes and zero
dcbtls 0,r0,r3 # Lock the address into the cache
se_addi r3,32 # Increment to start of next cache line (+32 bytes)
e_bdnz lock_cache_loop_cpu0_way0 # Decrement the counter (CTR), branch if nonzero&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't know how to be sure my stack is where I think it is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 19:53:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2057315#M27362</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2025-03-06T19:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2057933#M27369</link>
      <description>&lt;DIV id="tinyMceEditordavidtosenovjan_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;At init, it is supposed to invalidate all. It also forces replacement counter to way 0. Then you may lock lines for cache.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327207iCF3A8930EDDD6BA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 14:26:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2057933#M27369</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-03-07T14:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2058768#M27378</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I right to assume that if I set L1FINV0[CCMD] to 3, it will force the way replacement counter to the value I specify in L1FINV0[CWAY] without performing any flush/invalidation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 13:15:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2058768#M27378</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2025-03-10T13:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2058780#M27380</link>
      <description>&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;I can neither confirm nor deny this.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;It doesn't come out of any description.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 13:28:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2058780#M27380</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-03-10T13:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2059068#M27381</link>
      <description>&lt;P&gt;I thought this use of L1FINV0 would not invalidate anything because the description of L1FINV0[CCMD] provides details of invalidation/flushing for all cache commands except this one:&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="CCMD.png" style="width: 551px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327406i95A765772373BD45/image-size/large?v=v2&amp;amp;px=999" role="button" title="CCMD.png" alt="CCMD.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In any case, what happens if I try to invalidate a locked cache line?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 23:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2059068#M27381</guid>
      <dc:creator>ricardofranca</dc:creator>
      <dc:date>2025-03-10T23:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling MPC5777C (remaining) data cache while keeping its stack there</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2059321#M27383</link>
      <description>&lt;P&gt;I see. You are right apparently.&lt;/P&gt;
&lt;P&gt;The ICINV/DCINV Flash invalidation invalidates ALL cache, locked lines are also invalidated using this, but ICLFC/DCLFC will not be altered by the invalidation action, so to clear the Lock Bits the software must write this bit. You will end up with an invalid line which is locked if you just do the invalidate operation with this register.&lt;/P&gt;
&lt;P&gt;The icbi cache instructions invalidates and unlocks a cache lines in the L1 ICache.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 08:27:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Disabling-MPC5777C-remaining-data-cache-while-keeping-its-stack/m-p/2059321#M27383</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2025-03-11T08:27:51Z</dc:date>
    </item>
  </channel>
</rss>

