<?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: i.MX8MM DDR firmware padding in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036641#M152833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oliver,&lt;/P&gt;&lt;P&gt;Thank you very much for a prompt reply, much appreciated.&lt;/P&gt;&lt;P&gt;Felix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Nov 2019 06:14:14 GMT</pubDate>
    <dc:creator>felixradensky</dc:creator>
    <dc:date>2019-11-28T06:14:14Z</dc:date>
    <item>
      <title>i.MX8MM DDR firmware padding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036638#M152830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are trying to support 2 i.MX8MM boards using the same u-boot binary. One board has LPDDR4 RAM while another one has DDR4 RAM. We were able to integrate both LPDDR4 and DDR4 firmware binaries into SPL image and modify SPL and DDR driver code to select relevant firmware and timing tables depending on the board type. To fit into 256KB TMU we had to disable some non-essential SPL features. In our image DDR4 firmware comes after LPDDR4 firmware. We were able to successfully boot DDR4 board, but noticed that if SPL size changes, the loading of DDR4 firmware may fail on the following exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DRAM PHY training for 2400MTS&lt;BR /&gt;check ddr4_pmu_train_imem code&lt;BR /&gt;check ddr4_pmu_train_imem code pass&lt;BR /&gt;check ddr4_pmu_train_dmem code&lt;BR /&gt;check ddr4_pmu_train_dmem code pass&lt;BR /&gt;DRAM PHY training for 400MTS&lt;BR /&gt;check ddr4_pmu_train_imem code&lt;BR /&gt;check ddr4_pmu_train_imem code pass&lt;BR /&gt;check ddr4_pmu_train_dmem code&lt;BR /&gt;check ddr4_pmu_train_dmem code pass&lt;BR /&gt;DRAM PHY training for 100MTS&lt;BR /&gt;check ddr4_pmu_train_imem code&lt;BR /&gt;check ddr4_pmu_train_imem code pass&lt;BR /&gt;check ddr4_pmu_train_dmem code&lt;BR /&gt;check ddr4_pmu_train_dmem code pass&lt;BR /&gt;DRAM PHY training for 2400MTS&lt;BR /&gt;"Synchronous Abort" handler, esr 0x96000210&lt;BR /&gt;elr: 00000000007eb7a0 lr : 00000000007ebd5c&lt;BR /&gt;x0 : 000000003c152000 x1 : 0000000000000000&lt;BR /&gt;x2 : 0000000000820000 x3 : 000000003c158000&lt;BR /&gt;x4 : 0000000000000000 x5 : 0000000000000041&lt;BR /&gt;x6 : 0000000014040000 x7 : 0000000023c34600&lt;BR /&gt;x8 : 0000000000000006 x9 : 0000000000000002&lt;BR /&gt;x10: 00000000ffffffd0 x11: 0000000000000006&lt;BR /&gt;x12: 000000000001869f x13: 0000000000000016&lt;BR /&gt;x14: 000000000090e558 x15: 00000000ffffffff&lt;BR /&gt;x16: 0000000000000000 x17: 00000000000000ff&lt;BR /&gt;x18: 000000000091de40 x19: 00000000007ef860&lt;BR /&gt;x20: 000000000081f000 x21: 000000003c340264&lt;BR /&gt;x22: 0000000000817000 x23: 000000000f000000&lt;BR /&gt;x24: 0000000000000001 x25: 0000000000000003&lt;BR /&gt;x26: 000000003c340000 x27: 0000000072000000&lt;BR /&gt;x28: 0000000000000000 x29: 000000000091dd20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is whether any special padding of SPL and LPDDR4 firmware is required in addition to padding that is already done by the image generation makefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2019 11:17:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036638#M152830</guid>
      <dc:creator>felixradensky</dc:creator>
      <dc:date>2019-11-26T11:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MM DDR firmware padding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036639#M152831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Answering my own question, the reason for the crash is the behavior of i.mx8m DDR driver.&lt;/P&gt;&lt;P&gt;The driver assumes that the size of the last firmware image (ddr4_dmem_2d.bin or lpddr4_pmu_train_2d_dmem.bin) is 16K and accesses the memory beyond 256K of TMU, causing the exception. We were able to modify the driver and avoid the crash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the sizes of LPDDR4 firmware,&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 felix felix&amp;nbsp; 1668 Oct 15 09:50 lpddr4_pmu_train_1d_dmem.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix 32244 Oct 15 09:50 lpddr4_pmu_train_1d_imem.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix&amp;nbsp; 1380 Oct 15 09:50 lpddr4_pmu_train_2d_dmem.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix 23232 Oct 15 09:50 lpddr4_pmu_train_2d_imem.bin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can see that lpddr4_pmu_train_1d_dmem.bin and lpddr4_pmu_train_2d_dmem.bin are actually less than 2K.&lt;/P&gt;&lt;P&gt;The same is true for DDR4 firmware:&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 felix felix 16384 Nov&amp;nbsp; 4 17:45 ddr4_dmem_1d.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix&amp;nbsp; 1436 Nov&amp;nbsp; 4 17:45 ddr4_dmem_2d.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix 32768 Nov&amp;nbsp; 4 17:45 ddr4_imem_1d.bin&lt;BR /&gt;-rw-r--r-- 1 felix felix 23772 Nov&amp;nbsp; 4 17:45 ddr4_imem_2d.bin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ddr4_dmem_1d.bin is 16K but in fact it is zero-padded, with actual size being less than 2K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The i.MX8M DDR driver assumes that the size of dmem firmware files is 16K, see &lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/uboot-imx/tree/drivers/ddr/imx8m/helper.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n20" title="https://source.codeaurora.org/external/imx/uboot-imx/tree/drivers/ddr/imx8m/helper.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n20"&gt;helper.c\imx8m\ddr\drivers - uboot-imx - i.MX U-Boot&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The imx-mkimage Makefile ensures the padding of dmem files to 16K:&amp;nbsp;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/imx-mkimage/tree/iMX8M/soc.mak?h=imx_4.14.98_2.0.0_ga#n65" title="https://source.codeaurora.org/external/imx/imx-mkimage/tree/iMX8M/soc.mak?h=imx_4.14.98_2.0.0_ga#n65"&gt;soc.mak\iMX8M - imx-mkimage - i.MX Mkimage Bootloader Tool&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like padding dmem files to 4K should be sufficient. This can avoid redundant copying of almost 100K of padding, since dmem files are copied to and from DDR PHY 4 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: is it safe to assume that 4K padding of dmem files is sufficient ? My experiments show this to be true, but I'd be happy to get a confirmation from NXP DDR experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2019 08:23:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036639#M152831</guid>
      <dc:creator>felixradensky</dc:creator>
      <dc:date>2019-11-27T08:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MM DDR firmware padding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036640#M152832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/fradensky"&gt;fradensky&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your trying and congratulations for your success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, 4K padding of DMEM is enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 03:13:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036640#M152832</guid>
      <dc:creator>oliver_chen</dc:creator>
      <dc:date>2019-11-28T03:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8MM DDR firmware padding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036641#M152833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oliver,&lt;/P&gt;&lt;P&gt;Thank you very much for a prompt reply, much appreciated.&lt;/P&gt;&lt;P&gt;Felix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 06:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8MM-DDR-firmware-padding/m-p/1036641#M152833</guid>
      <dc:creator>felixradensky</dc:creator>
      <dc:date>2019-11-28T06:14:14Z</dc:date>
    </item>
  </channel>
</rss>

