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.

omap3 uboot dma issue

Hi, All

    I use TI_Android_Froyo_DevKit-V2.2(OMAP3730), and enable DMA, MMU, DCACHE, ICACHE. I do test memory as follow

0) enable mmu, d/icache

1) memset(81000000, 0x5a,  0x7000000)

2) use dma copy src address 81000000 to dst address 88000000, size 0x7000000

3) memcmp src and dst address, and print all difference ( if data is different, also continue to compare and print)

4) use dma fill the dst address and copy data from dst to src, then compare and print difference

5) I found the address 812f2090 is strange. The bitflip of last bit almost happens and some data followed are not correct when use MMU.

    if I do not use MMU,  only 812f2090 bitflip.

    I change the src and dst address, bitflip follows the address 812f2090.

    if I test the address do not include 812f2090, test is pass.

Can anybody help me, Thanks!

Log 1, test with mmu

=============================================================
Hit any key to stop autoboot:  0
OMAP3_EVM #
OMAP3_EVM # mmuenable
mmu_enable : create_page_tables...
open mmu now...
enable dcache now...
enable icache now...
mmu_enable success !!!
OMAP3_EVM # dma
  dmaclear dmatest
OMAP3_EVM # dmatest
do_dma_test -- src 81000000,  dsr 88000000, size 07000000, fill 0x5a5a
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0xa5a5
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
[0x882f2090]=a5a5a5a5    [812f2090]=5a5a5a58
[0x882f2094]=a5a5a5a5    [812f2094]=5a5a5a5a
[0x882f2098]=a5a5a5a5    [812f2098]=5a5a5a5a
[0x882f209c]=a5a5a5a5    [812f209c]=5a5a5a5a
2 memcmp failed, src 81000000, dst 88000000, size 07000000, err 1/2
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=c3c3c3c2    [882f2090]=c3c3c3c3
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 2/3
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0x3c3c
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
[0x882f2090]=3c3c3c3c    [812f2090]=c3c3c3c0
[0x882f2094]=3c3c3c3c    [812f2094]=c3c3c3c3
[0x882f2098]=3c3c3c3c    [812f2098]=c3c3c3c3
[0x882f209c]=3c3c3c3c    [812f209c]=c3c3c3c3
2 memcmp failed, src 81000000, dst 88000000, size 07000000, err 3/4
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=17171716    [882f2090]=17171717
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 4/5
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0xe8e8
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28

Log2, test without mmu

============================================================

OMAP3_EVM # dmatest
do_dma_test -- src 81000000,  dsr 88000000, size 07000000, fill 0x5a5a
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=5a5a5a5a    [882f2090]=5a5a5a5b
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 1/1
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0xa5a5
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
[0x882f2090]=a5a5a5a5    [812f2090]=a5a5a5a4
2 memcmp failed, src 81000000, dst 88000000, size 07000000, err 2/2
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=c3c3c3c2    [882f2090]=c3c3c3c3
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 3/3
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0x3c3c
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=17171716    [882f2090]=17171717
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 4/5
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0xe8e8
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 81000000 to 88000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
[0x812f2090]=fffffffe    [882f2090]=ffffffff
1 memcmp failed, src 81000000, dst 88000000, size 07000000, err 5/7
do_dma_clear -- start 88000000, size 0x07000000, elem 0x100000, frame 56, fill 0x0
dma copy data from 88000000 to 81000000 size 0x07000000, elem 0x100000, frame 28

Log 3, test exclude the address 812f2090

=============================================================

OMAP3_EVM # mmuenable
mmu_enable : create_page_tables...
open mmu now...
enable dcache now...
enable icache now...
mmu_enable success !!!
OMAP3_EVM # dmatest 0x82000000 0x89000000 0x7000000
do_dma_test -- src 82000000,  dsr 89000000, size 07000000, fill 0x5a5a
dma copy data from 82000000 to 89000000 size 0x07000000, elem 0x100000, frame 28
DMA Silicon revision (maj/min): 0x5/0x0
1 memory compare ...
do_dma_clear -- start 89000000, size 0x07000000, elem 0x100000, frame 56, fill 0xa5a5
dma copy data from 89000000 to 82000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 82000000 to 89000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
do_dma_clear -- start 89000000, size 0x07000000, elem 0x100000, frame 56, fill 0x3c3c
dma copy data from 89000000 to 82000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 82000000 to 89000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
do_dma_clear -- start 89000000, size 0x07000000, elem 0x100000, frame 56, fill 0xe8e8
dma copy data from 89000000 to 82000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 82000000 to 89000000 size 0x07000000, elem 0x100000, frame 28
1 memory compare ...
do_dma_clear -- start 89000000, size 0x07000000, elem 0x100000, frame 56, fill 0x0
dma copy data from 89000000 to 82000000 size 0x07000000, elem 0x100000, frame 28
2 memory compare ...
dma copy data from 82000000 to 89000000 size 0x07000000, elem 0x100000, frame 28