目标机: at91sama5d3x-xplained 的板子
主要添加:External Memory lpddr 64M 跟 nandflash 128M
现象:
Auto-Config the TwI Bus by the board
NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0x31
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 0x4, sector: 0x200
NAND: Image: Copy 0x3507e0 bytes from 0x200000 to 0x22000000
NAND: dt blob: Copy 0x5f83 bytes from 0x180000 to 0x21000000
Booting zImage ../...
zImage magic: 0x16f2818 is found
Using devicf tree in place at 0x21000000
Starting linux kerndl ..., machid: 0xffffffff
<font color="red">Uncompressing Linux... done, booting ~he kernel.</font>
再这里就挂掉了!
我尝试使用
adr r0, str_prr @test by me
bl printascii
来跟踪调试,一直跟踪到内核启动第一阶段:
ENTRY(__turn_mmu_on)
mov r0, r0
instr_sync
/***********************************/
adr r0, str_prr @test by me
bl printascii
/***********************************/
mcr p15, 0, r0, c1, c0, 0 @ write control reg
mrc p15, 0, r3, c0, c0, 0 @ read id reg
instr_sync
mov r3, r3
mov r3, r13
mov pc, r3
str_prr: .asciz "\nError: __turn_mmu_on\n"
__turn_mmu_on_end:
ENDPROC(__turn_mmu_on) 跟踪到这里的mcr p15, 0, r0, c1, c0, 0 @ write control reg这一句,,开启mmu时候就无法跟踪下去了,下面再打印信息是打印不出来了!!
(PS:printascii 是到b start_kernel 都是有效的,但是添加在mcr p15, 0, r0, c1, c0, 0 后面就打印不了调试信息了)
另外再main.c的 start_kernel(void)
asmlinkage void __init start_kernel(void)
{
gpio_request(74, "AT91_PIN_PC10");
gpio_direction_output(74, 0);
......................................
}
添加控制led灯是无效的,led没有亮,电路时无问题的!!说明没有成功进入start_kernel这一段!
-----------------------------------------------------------------------------------------------------------------------------------
现在怀疑:
开启mmu的时候 mcr p15, 0, r0, c1, c0, 0 @ write control reg
这一句就挂掉了,导致无法进入到start_kernel(void)!
各位大神,
有没有遇到同样问题的!求解决方法!或者思路!感激不尽!!
线上坐等答案1
|