Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
ARMv6: "invalidate D-cache line" instruction doesn't work?
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
119 subscribers
Views
3574 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
ARMv6: "invalidate D-cache line" instruction doesn't work?
Zhanguo Li
over 12 years ago
Note: This was originally posted on 10th November 2011 at
http://forums.arm.com
I am trying to test the "invalidate D-cache line" instruction of Freescale imx31/35 processor(ARMv6) and seems that it fails to work.
Below are my test pseudocode:
1. pBuf = malloc(xxx) /* alloc a write-back memory */
2. *(volatile char *)pBuf = 0; /* not cache hit now and not write-allocate, so 0 is written to memory */
3. data = *(volatile char *)pBuf; /* read the date to cache */
4. *(char *)pBuf = 0xaa; /* write 0xaa to cache */
5. invalidate pBuf cache line; /* via mcr or mcrr instruction */
6. data = *(volatile char *)pBuf; /* read it again */
7. data should not be 0xaa, otherwise the invalidate instruction does not work.
Note that my real test code are more strict than the pseudocode, and it works well in ARMv7 platform
So is there knowd issue for ARMv6 "invalidate D-cache line" instruction?
Thanks a lot!
-Jerry
Parents
Zhanguo Li
over 12 years ago
Note: This was originally posted on 22nd November 2011 at
http://forums.arm.com
Thanks for your reply. ttfn.
Actually I do not need a clean operation here as I just want to test invalidate instructions. And furthermore, DSB has been added in my "invalidate D-cache line" routines.
Cancel
Vote up
0
Vote down
Cancel
Reply
Zhanguo Li
over 12 years ago
Note: This was originally posted on 22nd November 2011 at
http://forums.arm.com
Thanks for your reply. ttfn.
Actually I do not need a clean operation here as I just want to test invalidate instructions. And furthermore, DSB has been added in my "invalidate D-cache line" routines.
Cancel
Vote up
0
Vote down
Cancel
Children
No data