Is A Reserved Mem Func Well as Dma_create When we use sra Test Nwrite for T serial Soc.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is A Reserved Mem Func Well as Dma_create When we use sra Test Nwrite for T serial Soc.

547 Views
liguofa
Contributor III

Hello Dears,

We uses T2080 for test rapidio.

Then about RIWAR register .

Cache coherency is maintained when "snoop local processor" option for WTT is selected in the corresponding RIWAR register.

what is the difference of 

pastedImage_1.png

Enhanced read, snoop local processor

 and 

Read,snoop local processor

We found sra demo used default is Read ,can tell me the diff of 0x5 and 0xd

pastedImage_2.png

Thanks,

By the way if my app not used dma alloc memory from usdpaa_mem but use reserved memory。

Our system does not use dma_create func, but the reserved address. There is no problem with function sending and receiving  nwrite now,but the problem is the speed is too low ,when we copy used memcpy from reserved memory to user space memory. we used mmap to translate phy to virt.

0 Kudos
Reply
1 Reply

481 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Li guofa ,

Please refer to "Init DMA pool" section in usdpaa-apps source code src/sra/sra.c.

static int dma_usmem_init(struct dma_pool *pool)
{
        int err;

        dma_mem_generic = dma_mem_create(DMA_MAP_FLAG_ALLOC,
                                        NULL, SRIO_POOL_SIZE);
        if (!dma_mem_generic) {
                err = -EINVAL;
                error(0, -err, "%s(): dma_mem_create()", __func__);
                return err;
        }

        pool->dma_virt_base = __dma_mem_memalign(64, SRIO_POOL_PORT_OFFSET);
        if (!pool->dma_virt_base) {
                err = -EINVAL;
                error(0, -err, "%s(): __dma_mem_memalign()", __func__);
                return err;
        }
        pool->dma_phys_base = __dma_mem_vtop(pool->dma_virt_base);

        return 0;
}

Thanks,

Yiping

0 Kudos
Reply