uboot下armV8 指令集架构芯片icache和dcache开关调试
一、编译出cache命令
cmd目录的makefile中打开cache.c的编译编译结果会生成cache.o替换板卡uboot固件后测试
二、uboot命令行下 测试icache dcache的 开关和状态获取
- dcache
=> dcache
Data (writethrough) Cache is ON
=> dcache off
=> dcache flush
=> dcache
Data (writethrough) Cache is OFF
=>
2.icache
=> icache
Instruction Cache is ON
=> icache off
=> icache flush
=> icache
Instruction Cache is OFF
=>
三、代码路径说明
u-boot-XXXX.XX-rc/arch/arm/cpu/armv8/cache_v8.c 和 arch/arm/include/asm/system.h为icache dcache 开/关 状态获取 函数封装所在文件;
u-boot-2018.11-rc/cmd/cache.c : 为 icache dcache 支持 uboot cache测试的命令handler封装文件
四、扩展集成
1.将代码的汇编实现放入其它项目中即可;
2.关闭cache后注意操作刷新icache和dcache

1430

被折叠的 条评论
为什么被折叠?



