2009-10-28 21:49:01     Share memory problem on BF548

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-10-28 21:49:01     Share memory problem on BF548

watson xu (CHINA)

Message: 81832   

 

hi, all

 

i have a project using bf548 and uClinux-dist-2008R1.5, there is a problem when running share memory application. the share memory will be corrupted when copy a large file (more than 100M).

 

and then i test it on the bf548-ezkit board, using the downloaded u-boot and uClinux-dist from blackfin.uclinux.org, the same probem will happen. the problem will be reproduced on bf548-ezkit (chip rev0.2) with the following steps:

 

1、download the u-boot-bf548-ezkit-para-2008R1.5.ldr and uImage-bf548-ezkit-2008R1.5-RC3 binary from blackfin.uclinux.org.

 

2、program the u-boot to the norflash.

 

3、boot the board and run ramboot to load the uImage-bf548-ezkit-2008R1.5-RC3 to the memory and start linux.

 

4、cross-compile the "shm_test.c" with  command :

 

      > bfin-linux-uclibc-gcc -o shm_test shm_test.c

 

    and download shm_test to the target board using tftp.

 

5、mount the hard disk:

 

     > mount /dev/sda1 /mnt/

 

     and create a large file:

 

     > dd if=/dev/zero of=/testfile.dat bs=200 count=1000000

 

6、run test program:

 

     > shm_test &

 

7、copy the test file to another:

 

    > cp testfile.dat testfile2.dat

 

then the test program will report "share memory corrupted.", this can be reproduced everytime. i think this may be a bug.

 

by the way, the bf548-ezkit chip revision is 0.2, running uClinux-dist-2008R1.5, when i mount nfs, access the nfs will cause 'Data access misaligned addresss violation'. but on my board (which is using rev0.1) will not occurs.

 

 

 

thanks.

 

Watson Xu

 

shm_test.c

TranslateQuoteReplyEditDelete

 

 

2009-10-28 21:55:11     Re: Share memory problem on BF548

Mike Frysinger (UNITED STATES)

Message: 81834   

 

you've already posted your question and someone said they're going to look at it.  please dont go posting the same issue over and over.

QuoteReplyEditDelete

 

 

2009-10-28 22:29:10     Re: Share memory problem on BF548

watson xu (CHINA)

Message: 81835   

 

i'm sorry, i suppose this is another problem, so please delete this post. i will move the message to the original post.

 

thanks.

TranslateQuoteReplyEditDelete

 

 

2009-10-28 22:45:47     Re: Share memory problem on BF548

Mike Frysinger (UNITED STATES)

Message: 81837   

 

what you tried to do is fine actually.  i thought you were doing something else which some people try to do -- post the same question multiple times in the hopes of people answering faster.

QuoteReplyEditDelete

 

 

2009-10-29 03:24:34     Re: Share memory problem on BF548

Graf Yang (CHINA)

Message: 81855   

 

dd if=/dev/zero of=/testfile.dat bs=200 count=1000000

 

You are creating a file that near to 200M on the root directory? It is ramfs, the BF548-EZKIT only have 64M memory.

QuoteReplyEditDelete

 

 

2009-10-29 03:55:53     Re: Share memory problem on BF548

watson xu (CHINA)

Message: 81856   

 

this file is create on the hard disk, which is mounted at /mnt using this command:

 

mount /dev/sda1 /mnt

TranslateQuoteReplyEditDelete

 

 

2009-10-29 04:10:34     Re: Share memory problem on BF548

watson xu (CHINA)

Message: 81857   

 

sorry, it should be

 

dd if=/dev/zero of=/mnt/testfile.dat bs=200 count=1000000

 

it's on the hard disk.

TranslateQuoteReplyEditDelete

 

 

2009-10-29 04:41:58     Re: Share memory problem on BF548

Graf Yang (CHINA)

Message: 81858   

 

I can duplicate this bug using uImage-bf548-ezkit-2008R1.5-RC3.

 

But 2009R1(the image at    blackfin.uclinux.org/gf/download/frsrelease/451/6816/uImage-bf548-ezkit-2009R1-RC6) and svn head have not this problem.

QuoteReplyEditDelete

 

 

2009-10-29 04:47:54     Re: Share memory problem on BF548

Mike Frysinger (UNITED STATES)

Message: 81859   

 

we have fixed some bugs in the shm code, and mainline has made shm/nommu fixes too.  so answer is upgrade to 2009R1.

QuoteReplyEditDelete

 

 

2009-10-29 05:33:24     Re: Share memory problem on BF548

watson xu (CHINA)

Message: 81860   

 

thanks for you help, we will migrate our project to 2009R1, but our board is using rev0.1 of bf547, and have buy some rev0.1 chips last month, this revision seems not supported by 2009R1, so i wonder if there will be a patch to 2008R1.5 or not?

TranslateQuoteReplyEditDelete

 

 

2009-10-29 06:16:33     Re: Share memory problem on BF548

Mike Frysinger (UNITED STATES)

Message: 81861   

 

if we made a patch to 2008R1.5, it would be to remove BF54x-0.0 and BF54x-0.1 support.  read the error that is thrown when compiling for why BF54x-0.0 and BF54x-0.1 are unsupported.

QuoteReplyEditDelete

 

 

2009-10-29 21:54:56     Re: Share memory problem on BF548

watson xu (CHINA)

Message: 81883   

 

ok, thanks.

Attachments

Outcomes