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.

AM5718: IDK-AM571 CMA memory pool

Part Number: AM5718

Hi ,

I am running ti-processor-sdk-linux-rt-am57xx-evm-06.03.00.106. When I check the CMA ares on Linux side I realized that for IPU1 DMA is used instead of CMA.

[    0.000000] Reserved memory: created DMA memory pool at 0x0000000095800000, size 56 MiB
[    0.000000] OF: reserved mem: initialized node ipu1-memory@95800000, compatible id shared-dma-pool

Can you provide some information on why this is taken via DMA instead of CMA and which impacts this has? Also is there a way to change it to CMA?

Best regards,
Nicolas Rausch

  • Hello support team,

    can anyone answer the question?
    I have the same question.

    Best regards,
    Milan

  • Hello,

    can I expect some answers to this?

  • Hi Nicolas,

    The typical remoteproc usage model with Linux on AM57xx is to use a CMA pool and use the pool to allocate the memory needed by the firmware dynamically, program the MMU and boot the processor. A CMA pool by definition is owned and managed by Linux kernel, and a driver has requested memory from that pool (happens during OMAP remoteproc driver probe and booting).

    If you are early-booting the processor in bootloader, then the remote processors are already running, and memory is already consumed. You cannot have this memory used for general purpose Linux usage before the remoteproc driver is probed, the memory has to be reserved up-front and removed from the Linux kernel memory. This makes the memory pool a carveout and shows up as a DMA pool.

    The difference between CMA and DMA pools in Linux device-tree would be the addition of the "no-map" property to the corresponding reserved-memory node. If you are not early-booting the processors, you can remove this property to make the pool a CMA pool. 

    regards

    Suman

  • Thank you for the reply!

    The no-map property is not present in my dts file. So probably the processor is booting early.
    Is there a way to find out if the the processor is set to early-booting?
    Can you point me to a guide where I can see how to turn off early-booting?

    Best regards,
    Nico

  • Hi Nicolas,

    The "DMA pool" trace shows up only if the no-map property is set, otherwise, it should show up as regular CMA pool. The 'DMA pool' is indeed the required behavior when booting the remote processors early.

    I have just booted the regular 6.3 SDK and do not see any early-boot traces. Can you attach your full kernel log? 

    regards

    Suman

  • Hi Suman,

    I think I found something. So in my dts file (am571x-idk.dts) the property is set to reusable, but the file also includes dra7-ipu-common-eary-boot.dtsi where there is the following:

    &ipu1_memory_region {
        /delete-property/ reusable;
        no-map;
    };

    Apparently this is overwriting the property.

    If I remove this does IPU1 boot later or do I have to make some adjustments in the bootloader, too?

    Best regards,
    Nico

  • Hi Nicolas,

    The dra7-ipu-common-eary-boot.dtsi includes the overrides to various nodes (as you noticed) to support the early-booting the IPU1. This file should be included in the board dts files only if the SPL is booting the IPU1 before the kernel. The board dts should not include this file if it is not desired for your U-Boot/SPL to do the early-boot.

    The early-boot in U-Boot is controlled by the CONFIG_REMOTEPROC_TI_IPU Kconfig symbol. Please see the spl_boot_ipu() function in arch/arm/mach-omap2/boot-common.c file. Please disable this option to disable early-booting in U-Boot. 

    regards

    Suman