This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 66AK2G12:如何为 DMA 保留存储器

Guru**** 657500 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1242949/66ak2g12-how-to-reserve-memory-for-dma

器件型号:66AK2G12

您好!

我想保留64M 存储器用于显示 DMA 数据传输。 我们修改了 keystone-k2g-evm.dts 、如下所示:

/{
   兼容= "ti、k2g-evm"、"ti、k2g"、"ti、keystone";
   模型="UCS SR 302";

   内存@8000000 {
      device_type ="存储器";
      REG =<0x00000008 0x00000000 0x00000000 0x40000000>;
   };

   保留内存{
      #address-Cells =<2>;
      #size-cells =<2>;
      范围;

      dsp_common_mpm_memory:dsp-common-mpm-memory@81d000000{
         兼容="ti、keystone-mem-pool";
         REG =<0x00000008 0x1d000000 0x00000000 0x2800000>;
         无地图;
         状态="可以";
      };

      DSP_COMMON_MEMORY:DSP-COMMON-MEMORY@81f800000{
         兼容="共享 dma-pool";
         REG =<0x00000008 0x1f800000 0x00000000 0x800000>;
         可重复使用;
         状态="可以";
      };

      display_reserved:帧缓冲@820000000{
         REG =<0x00000008 0x20000000 0x00000000 0x04000000>;

         状态="可以";

      };
   };

我将保留的显示 DMA 存储器从0x8,200,0000开始设置为0x4000000大小(64M)

我想知道 DTS 中的"display_reserved"是否正确? 该地址是否适用于 DMA?

此外、Linux OS 如何知道它不能使用高于0x82000 0000地址的存储器?

我听说过一个解决方案是使用 memmap 内核参数,如"memmap=64M0美元x820000000 ",

我想知道我应该更新哪个文件? 或者根本有必要使用"memmap"内核参数吗?

汤姆

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Tom、

    您是否已查看内核中的文档:

    Documentation/devicetree/bindings/reserved-memory/framebuffer.YAML

    Documentation/devicetree/bindings/reserved-memory/reserved_memory.yAML

    并查看修改 dts 文件是否会有所帮助。

    此外、您还可以尝试下面的内容、看看它是否有帮助

    display_reserved:帧缓冲@820000000{
             REG =<0x80020000000 0x04000000>;

    };

    此致、

    苏伦