2008-03-29 00:00:01 a quetion about cache and l1-ram
david wang (CHINA)
Message: 53281
Hi, all
I've a question for a long time. In my case, I want to use both l1-text and l1-data in my kernel driver, and also want to enable I-CACHE and D-CACHE to make my userspace application running faster. I do this by using __attribute__((section(.l1.data))) and __attribute__((section(.l1.text))) in my driver, and by selecting I-CACHE and D-CACHE( only use BANK A) enable in making menuconfig. It works fine to me for a long time( from Dec 2007), until I upgrade the kernel and toolchain to 2008-r1-rc8. It'll will corrupt each time when the userspace program running reporting NULL POINTER error. It seems the driver codes not in the correct l1 address. But even when I disable both cache the situation is the same.
My question is, is it possible to allocate memory manually by defining code with __attribute__((section(l1.text)) when cache (I-CACHE and D-CACHE) is enable? if I allocate a large data in l1, how will the cache works? I'm very confused with this problem. Thanks for any help!
QuoteReplyEditDelete
2008-03-29 00:10:12 Re: a quetion about cache and l1-ram
Mike Frysinger (UNITED STATES)
Message: 53287 please read the documentation:
http://docs.blackfin.uclinux.org/doku.php?id=using_l1_memory