<?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: IMX8MP On chip RAM memory access in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1541181#M196629</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202155"&gt;@Sanket_Parekh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the response, it was helpful!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible for me to modify the device tree to support DMA within the 448 KB OCRAM space, if I can't use it for the user application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Samhitha Kashyap&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 13:09:09 GMT</pubDate>
    <dc:creator>Samhitha_Kashyap</dc:creator>
    <dc:date>2022-10-20T13:09:09Z</dc:date>
    <item>
      <title>IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1516438#M194685</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to learn how I can access the OCRAM&amp;nbsp; to read and data to the memory.&lt;/P&gt;&lt;P&gt;Can anyone advice how I could achieve that on Linux cortex A-53?&lt;/P&gt;&lt;P&gt;On-Chip RAM - OCRAM (576 KB)&lt;/P&gt;&lt;P&gt;start address: 0x00900000 =&amp;gt; reserved for ROM&lt;/P&gt;&lt;P&gt;start address: 0x00918000&amp;nbsp;&amp;nbsp;=&amp;gt;OCRAM FREE AREA&lt;/P&gt;&lt;P&gt;end address:&amp;nbsp;0x0097FFFF&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=IMX8MPRM&amp;amp;_gl=1*1pdpyox*_ga*MTI2Njg0NDMwNy4xNjYyMTQxOTIw*_ga_WM5LE0KMSH*MTY2MjE0MTkyMC4xLjEuMTY2MjE0MzA5MS4wLjAuMA.." target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.nxp.com/webapp/Download?colCode=IMX8MPRM&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="IMX8MPLUS" id="IMX8MPLUS"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 18:25:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1516438#M194685</guid>
      <dc:creator>Samhitha_Kashyap</dc:creator>
      <dc:date>2022-09-02T18:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1525089#M195378</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201902"&gt;@Samhitha_Kashyap&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well.&lt;/P&gt;
&lt;P&gt;To access OCRAM First you need to ensure that you don't try to access the region that is used by ATF.&lt;/P&gt;
&lt;P&gt;in the case of u-boot, one can use md/mw command to access OCRAM directly.&lt;/P&gt;
&lt;P&gt;It is not recommended to use OCRAM in userspace as Linux itself uses it.&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;
&lt;P&gt;Sanket Parekh&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 14:06:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1525089#M195378</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2022-09-20T14:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1538608#M196444</link>
      <description>&lt;P&gt;Hi Sanket,&lt;/P&gt;&lt;P&gt;Would it be possible to verify how much memory the Linux utilizes and the rest can be used for the user application.&lt;/P&gt;&lt;P&gt;If it is possible, how could I verify the same and allocate the rest of the memory for my application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Samhitha Kashyap&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 13:59:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1538608#M196444</guid>
      <dc:creator>Samhitha_Kashyap</dc:creator>
      <dc:date>2022-10-17T13:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1539338#M196490</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201902"&gt;@Samhitha_Kashyap&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN class="im"&gt;I hope you are doing well.&lt;BR /&gt;&lt;/SPAN&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You can determine how much memory in the OCRAM, Linux kernel Reserved for itself by looking into the dtsi file (reserved memory node) of the soc&lt;/DIV&gt;
&lt;DIV&gt;in the case of imx8mp, it is 448 KB.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;resmem: reserved-memory {
		#address-cells = &amp;lt;2&amp;gt;;
		#size-cells = &amp;lt;2&amp;gt;;
		ranges;

		ocram: ocram@900000 {
			no-map;
			reg = &amp;lt;0 0x900000 0 0x70000&amp;gt;;
		};
&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;      .....&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;      .....&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;}&lt;/PRE&gt;
&lt;PRE style="padding: 0px; margin-top: 0px; margin-bottom: 0px; color: #000000; font-size: 13.3333px;"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;DIV&gt;So here 0x70000 ( 448K) bytes are reserved for Linux usage. and cannot be virtually mapped to the userspace as specified by the no-map property.&lt;/DIV&gt;
&lt;DIV&gt;after 0x7000 bytes you can use it for other applications.&lt;/DIV&gt;
&lt;DIV&gt;But you need to make sure that any&amp;nbsp; M7 core Application not using OCRAM. which can be determined by looking into the Linker script of a&amp;nbsp;particular&amp;nbsp;application.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards&lt;/DIV&gt;
&lt;DIV&gt;Sanket Parekh&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Oct 2022 13:07:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1539338#M196490</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2022-10-18T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1541181#M196629</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202155"&gt;@Sanket_Parekh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the response, it was helpful!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible for me to modify the device tree to support DMA within the 448 KB OCRAM space, if I can't use it for the user application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Samhitha Kashyap&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 13:09:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1541181#M196629</guid>
      <dc:creator>Samhitha_Kashyap</dc:creator>
      <dc:date>2022-10-20T13:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1544925#M196928</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201902"&gt;@Samhitha_Kashyap&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="RFZYhc"&gt;&lt;SPAN&gt;Please note that the NXP does not recommend the modification in the node for 448 KB OCRAM Space as it is used by other drivers.&lt;BR /&gt;One can use memory regions after 0x970000 to Support DMA using the compatible = "shared-dma-pool" property.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;
&lt;P&gt;Sanket Parekh&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 09:22:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1544925#M196928</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2022-10-27T09:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1901107#M225960</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to use the OCRAM the way you suggested but I get kernel panic when I try to memcpy to/from it.&lt;BR /&gt;Could you please help me understand what am I doing wrong or missing?&lt;/P&gt;&lt;P&gt;dtsi:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resmem: reserved-memory {
    #address-cells = &amp;lt;2&amp;gt;;
    #size-cells = &amp;lt;2&amp;gt;;
    ranges;

    ocram: ocram@900000 {
        no-map;
        reg = &amp;lt;0 0x900000 0 0x70000&amp;gt;;
    };

    ocram_dma: ocram_dma@970000 {
        no-map;
        reg = &amp;lt;0 0x970000 0 0xC00&amp;gt;;  // 3KB
    };
...&lt;/LI-CODE&gt;&lt;P&gt;module init:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    // Find the OCRAM DMA node by name
    np = of_find_node_by_name(NULL, "ocram_dma");
    if (!np) {
        pr_err("Failed to find OCRAM DMA node in device tree\n");
        return -ENODEV;
    }

    // Lookup the reserved memory region
    rmem = of_reserved_mem_lookup(np);
    if (!rmem) {
        pr_err("Failed to lookup reserved memory for OCRAM DMA\n");
        return -ENODEV;
    }

    // Map the reserved memory region
    ocram_dma_base = ioremap(rmem-&amp;gt;base, rmem-&amp;gt;size);
    if (!ocram_dma_base) {
        pr_err("Failed to map OCRAM DMA memory\n");
        return -ENOMEM;
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;copy:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;memcpy(current_address, mv-&amp;gt;A, MATRIX_STRUCT_SIZE);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 09:34:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1901107#M225960</guid>
      <dc:creator>Roman_Loz</dc:creator>
      <dc:date>2024-07-07T09:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP On chip RAM memory access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1902257#M225987</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/235111"&gt;@Roman_Loz&lt;/a&gt;&amp;nbsp;, you could try including&amp;nbsp;compatible = "shared-dma-pool"; and it should work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ocram_dma: ocram_dma@970000 {
        no-map;
        compatible = "shared-dma-pool";
        reg = &amp;lt;0 0x970000 0 0xC00&amp;gt;;  // 3KB
    };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Samhitha Kashyap&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 12:21:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-On-chip-RAM-memory-access/m-p/1902257#M225987</guid>
      <dc:creator>Samhitha_Kashyap</dc:creator>
      <dc:date>2024-07-08T12:21:42Z</dc:date>
    </item>
  </channel>
</rss>

