Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
How to set dram region to cacheable?
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
118 subscribers
Views
6125 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
How to set dram region to cacheable?
china liu
over 12 years ago
Note: This was originally posted on 31st October 2012 at
http://forums.arm.com
hi, experts:
I am a newcomer to ARM world.
I was working x86 platform in these years.
So, i have a question about how to set dram region's cacheable attributes.
Take my ARM development board as an example:
It has 1GByte DRAM, 4MB NOR Flash, 64MB Nand Flash.
So:
1. How to set some parts of 1GByte DRAM to cacheable(write back)?
2. How to set 4MByte NOR Flash region to cacheable , to enhance uboot's execution speed?
With x86 CPU, it had MTRR registers to do these things, so how to do these things on ARM platform?
I have read some arm documents, it seemed doing these things by creating page tables , right?
Any tips will be appreciated!
best wishes,
Parents
Thomas Partiot
over 12 years ago
Note: This was originally posted on 9th November 2012 at
http://forums.arm.com
Hi,
I have a very similar question !
i would like to separate my DDR memory into 2 sections :
one, used by the processor only, this section have to be cacheable
the other shared with external processes. this section mus be set as a device.
i'm working on a Cortex A9 inside a Xilinx's Zynq.
i could find a library with these functions :
void Xil_DCacheInvalidateLine(unsigned int adr);
void Xil_DCacheFlushLine(unsigned int adr);
void Xil_DCacheStoreLine(unsigned int adr);
void Xil_ICacheInvalidateLine(unsigned int adr);
void Xil_L1DCacheEnable(void);
void Xil_L1DCacheDisable(void);
void Xil_L1DCacheInvalidate(void);
void Xil_L1DCacheInvalidateLine(unsigned int adr);
void Xil_L1DCacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L1DCacheFlush(void);
void Xil_L1DCacheFlushLine(unsigned int adr);
void Xil_L1DCacheFlushRange(unsigned int adr, unsigned len);
void Xil_L1DCacheStoreLine(unsigned int adr);
void Xil_L1ICacheEnable(void);
void Xil_L1ICacheDisable(void);
void Xil_L1ICacheInvalidate(void);
void Xil_L1ICacheInvalidateLine(unsigned int adr);
void Xil_L1ICacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L2CacheEnable(void);
void Xil_L2CacheDisable(void);
void Xil_L2CacheInvalidate(void);
void Xil_L2CacheInvalidateLine(unsigned int adr);
void Xil_L2CacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L2CacheFlush(void);
void Xil_L2CacheFlushLine(unsigned int adr);
void Xil_L2CacheFlushRange(unsigned int adr, unsigned len);
void Xil_L2CacheStoreLine(unsigned int adr);
but it doesn't enable disable cache for only a section of the DDR.
i saw there is a stuff called PL 310 who looks like the L2 Cache, and also some explanation about MMU and translation table but i could not find
a simple example that i could modify to make the job. I hope someone could help !!
regards.
Thomas.
Cancel
Vote up
0
Vote down
Cancel
Reply
Thomas Partiot
over 12 years ago
Note: This was originally posted on 9th November 2012 at
http://forums.arm.com
Hi,
I have a very similar question !
i would like to separate my DDR memory into 2 sections :
one, used by the processor only, this section have to be cacheable
the other shared with external processes. this section mus be set as a device.
i'm working on a Cortex A9 inside a Xilinx's Zynq.
i could find a library with these functions :
void Xil_DCacheInvalidateLine(unsigned int adr);
void Xil_DCacheFlushLine(unsigned int adr);
void Xil_DCacheStoreLine(unsigned int adr);
void Xil_ICacheInvalidateLine(unsigned int adr);
void Xil_L1DCacheEnable(void);
void Xil_L1DCacheDisable(void);
void Xil_L1DCacheInvalidate(void);
void Xil_L1DCacheInvalidateLine(unsigned int adr);
void Xil_L1DCacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L1DCacheFlush(void);
void Xil_L1DCacheFlushLine(unsigned int adr);
void Xil_L1DCacheFlushRange(unsigned int adr, unsigned len);
void Xil_L1DCacheStoreLine(unsigned int adr);
void Xil_L1ICacheEnable(void);
void Xil_L1ICacheDisable(void);
void Xil_L1ICacheInvalidate(void);
void Xil_L1ICacheInvalidateLine(unsigned int adr);
void Xil_L1ICacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L2CacheEnable(void);
void Xil_L2CacheDisable(void);
void Xil_L2CacheInvalidate(void);
void Xil_L2CacheInvalidateLine(unsigned int adr);
void Xil_L2CacheInvalidateRange(unsigned int adr, unsigned len);
void Xil_L2CacheFlush(void);
void Xil_L2CacheFlushLine(unsigned int adr);
void Xil_L2CacheFlushRange(unsigned int adr, unsigned len);
void Xil_L2CacheStoreLine(unsigned int adr);
but it doesn't enable disable cache for only a section of the DDR.
i saw there is a stuff called PL 310 who looks like the L2 Cache, and also some explanation about MMU and translation table but i could not find
a simple example that i could modify to make the job. I hope someone could help !!
regards.
Thomas.
Cancel
Vote up
0
Vote down
Cancel
Children
No data