- 论坛徽章:
- 0
|
MPC8247属于MPC8272 family,因此配置文件选用mpc8272_ads_defconfig,内核则尝试了4.2、2.6.32、2.6.19多个版本。
在cpu_setup_6xx.S文件中的setup_common_caches挂死。
setup_common_caches:
mfspr r11,SPRN_HID0
andi. r0,r11,HID0_DCE
ori r11,r11,HID0_ICE|HID0_DCE
ori r8,r11,HID0_ICFI
bne 1f /* don't invalidate the D-cache */
ori r8,r8,HID0_DCI /* unless it wasn't enabled */
1: sync
//下面这条指令挂死
mtspr SPRN_HID0,r8 //YY r8->SPRN_HID0 /* enable and invalidate caches */
sync
mtspr SPRN_HID0,r11 /* enable caches */
sync
isync
blr
分析导致挂死的直接原因是:开启了data cache。
如果不开启data cache则在head_32.S中的turn_on_mmu挂死。
因为多个版本的Linux内核代码中,setup_common_caches代码都是一致的、都开启了data cache。那么开启data cache挂死的原因就更为奇怪了。
希望大家可以讨论下,谢谢!
|
|