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.

[FAQ] TDA4VM: 如何为大于 2GB 的存储器启用内联 ECC

Part Number: TDA4VM

问:

为大小不超过 2GB 的存储器启用内联 ECC 比较简单,因为存储器地址范围在 32 位地址 (0x80000000- 0xFFFFFFFF) 范围内

 

如何启用内联 ECC > 2GB 地址

  • 答:

    来自 TRM 的截图:

     

    需要在 DDR 初始化时执行 ECC 启用。在 Linux 引导流程中,DDR 配置由 R5 SPL 完成。

     

    R5 是 32 位处理器。因此,它无法访问需要大于 32 位的地址。

    可使用 MCU R5F 的基于 RAT - 区域的地址转换器来解决这一问题。

     

    RAT 将大于 32 位的地址转换为 32 位地址,并帮助 R5F 访问大于 32 位地址的存储器区域

    下面的补丁可为 3GB 的存储器启用 ECC。

     

    因此,在 DDR 初始化后,我们将 0x80000000(可通过 R5 访问)映射到 0x880000000(大于 32 位)。

    将它们清除为 0。取消映射 RAT 转换。

     

    为第三个 GB 设置 ECC 的第二个范围。

    已通过 Linux 和 memtester 的引导测试,运行良好。

     

    该补丁应用于 SDK7.3 U-Boot 之上。

    ECC-for-3-GB.patch.

    cd $PSDKLA_7.3/board-support/u-boot*
    git am ECC-for-3-GB.patch
    cd ../..
    make u-boot
    cp board-support/u-boot_build/r5/tiboot3.bin board-support/u-boot_build/a72/tispl.bin board-support/u-boot_build/a72/u-boot.img board-support/prebuilt-binaries/sysfw.itb /media/$USER/boot

     

    注意:启用 ECC 将增加 R5 S

  • 说的有道理,我很认同。