10-31-2017 04:00 AM
Hi all,
We are working with ZC702 FPGA platform. We have petalinux running in CPU0 whereas a baremetal application is running in CPU1. This baremetal application works with DMA (not CDMA).
When we use the baremetal application alone everything works fine: DMA and interrupts are working. However, when using petalinux for CPU0 and baremetal for CPU1 (via openAMP library, remote_proc) we are having some issues, because DMA is not working, data is not being copied to DDR and we are having errors.
Anyone knows what can be happening? There's anyhting we have to configure when using petalinux along with a baremetal application which utilizes DMA? Is petalinux taking control over DMA and this is the cause our application is not running properly?
Any help will be appreciated. Thanks.
Regards,
David
11-01-2017 10:17 AM
David,
Which version of petalinux are you using and what are the errors you are seeing?
11-02-2017 01:38 AM
Hi @jovitac, thank you for your response. We are using Petalinux 2016.3.
It seems DMA is not reading, our buffer is initializated to known values, but data is not being updated in DDR because its values never change. However, if we executed this code standalone (without petalinux) everything works fine.
11-02-2017 01:55 AM
Hi again,
We caught an interrupt from DMA in the SGDMA_interrupt_handler function, and it give us an IRQ_ERROR....this is the content of the registers:
Dump registers 40400030:
Control REG: 64017012
Status REG: 00010219
Cur BD REG: 00000000
Tail BD REG: 00128300
Thanks, regards,
David
11-02-2017 10:01 AM
Could you please attach your device-tree? Do the demo apps work?
11-03-2017 03:02 AM
11-07-2017 03:54 PM
Make sure your kernel base address is set to higher address 0x10000000
Set memory split to 2G/2G
Enable high memory support.
Please see Chapter 3, Setting up Petalinux with OpenAMP.
Hope this helps
11-08-2017 03:08 AM
Thanks @jovitac, we have everything configured like you suggest us. But we still have the DMA problem. We have tried to add in the device tree a node to shared memory between linux and baremetal, in the following way:
reserved-memory { #address-cells = <1>; #size-cells = <1>; ranges; /* global autoconfigured region for contiguous allocations */ linux,cma@3F000000{ compatible = "shared-dma-pool"; reusable; size = <0x4000000>; alignment = <0x2000>; linux,cma-default; }; }
Maybe the problem is that shared memory between both cores must be configured as DMA compatible or something related to this issue.
Any clues?
Thank you in adcance,
David