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.

[参考译文] J784S4XEVM:Linux 应用程序无法通过 J784S4 上的/dev/mem 访问 DDR 存储器 (0xC0000000)

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1636843/j784s4xevm-linux-application-is-unable-to-access-ddr-memory-0xc0000000-via-dev-mem-on-j784s4

器件型号: J784S4XEVM

你(们)好

我正在使用 PSDK 版本 (ti-processor-sdk-rtos-j784s4-evm-09_02_00_05) 来开发 J784S4 EVM。

我开发了一个将在 Linux 上运行的自定义应用程序、用于访问共享存储器位置并在其中写入一些内容。

我尝试从物理地址开始访问特定的 DDR 存储器区域 0xC0000000 、旨在用作多个视觉应用内核之间的共享存储器区域。

每当我运行这个使用 /dev/memmmap()映射物理地址的 Linux 用户空间应用程序时、就会抛出以下问题。

image.png

谢谢

Madhu

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

    您好 Madhu、

    您是否尝试过 DDR 中的任何其他地址? 您看到相同的失败吗?

    是否将 0xC0000000 地址定义为共享区域?

    此致、

    Keerthy  

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

    您好 Madhu、

    您可以尝试将其设置为无映射区域。 0xA0000000 表示。

    CONFIG_STRICT_DEVMEM 不会让标记为 Linux 的 DDR 区域映射到存储器。

    arch/arm64/boot/dts/ti/k3-j784s4-evm.dts

            reserved_memory: reserved-memory {
                    #address-cells = <2>;
                    #size-cells = <2>;
                    ranges;
    
                     /* global cma region */
                    linux,cma {
                            compatible = "shared-dma-pool";
                            reusable;
                            size = <0x00 0x70000000>;
                            linux,cma-default;
                    };
    
                    secure_ddr: optee@9e800000 {
                            reg = <0x00 0x9e800000 0x00 0x01800000>;
                            no-map;
                    };
    
                    mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
                            compatible = "shared-dma-pool";
                            reg = <0x00 0xa0000000 0x00 0x100000>;
                            no-map;
                    };
    

    - Keerthy