Head.s分析(4):关闭CACHE

快乐虾

http://blog.csdn.net/lights_joy/

[email protected]

本文适用于

ADI bf561 DSP

uclinux-2008r1.5-rc3 (移植到vdsp5)

Visual DSP++ 5.0(update 5)

欢迎转载,但请保留作者信息

/* Turn off the icache */

p0.l = LO(IMEM_CONTROL);

p0.h = HI(IMEM_CONTROL);

R1 = [p0];

R0 = ~ENICPLB;

R0 = R0 & R1;

#if ANOMALY_05000125

CLI R2;

SSYNC;

#endif

[p0] = R0;

SSYNC;

#if ANOMALY_05000125

STI R2;

#endif

/* Turn off the dcache */

p0.l = LO(DMEM_CONTROL);

p0.h = HI(DMEM_CONTROL);

R1 = [p0];

R0 = ~ENDCPLB;

R0 = R0 & R1;

/* Anomaly 05000125 */

#if ANOMALY_05000125

CLI R2;

SSYNC;

#endif

[p0] = R0;

SSYNC;

#if ANOMALY_05000125

STI R2;

#endif

这段代码功能也相对简单,关闭ICACHEDCACHE,因为在u-boot中可能启用它,不过对于直接启动uclinux的移植方式而言,没啥意义,在RESET之后,本来就是关闭的,呵呵。

L1 Instruction Memory Control Register

DMEM_CONTROL

1 参考资料

head.s分析(1):保存u-boot传递过来的指针(2009-1-19)

head.s分析(2)SYSCFG配置(2009-1-19)

head.s分析(3):数据及指针寄存器清0(2009-1-19)

你可能感兴趣的:(.net,cache,Blog)