void call_linux(long a0, long a1, long a2)
{
__asm__(
//"mov
r0, %0\n"
//"mov
r1, %1\n"
//"mov
r2, %2\n"
"mov
r0, a0\n"
"mov
r1, a1\n"
"mov
r2, a2\n"
"mov
ip, #0\n"
"mcr
p15, 0, ip, c13, c0, 0\n"
/* zero PID */
"mcr
p15, 0, ip, c7, c7, 0\n"
/* invalidate I,D caches */
"mcr
p15, 0, ip, c7, c10, 4\n"
/* drain write buffer */
"mcr
p15, 0, ip, c8, c7, 0\n"
/* invalidate I,D TLBs */
"mrc
p15, 0, ip, c1, c0, 0\n"
/* get control register */
"bic
ip, ip, #0x0001\n"
/* disable MMU */
"mcr
p15, 0, ip, c1, c0, 0\n"
/* write control register */
"mov
pc, r2\n"
"nop\n"
"nop\n"
: /* no outpus */
: "r" (a0), "r" (a1), "r" (a2)
: "r0","r1","r2","ip"
);
}
引导内核最后一步,居然出现了未定义指令异常中断,看了半天,也没搞明白 |