hi, the latest information, by add printk to the do_ri function in traps.c, I found that the kernel panic after execute he simulate_sync function, the do_ri function was called more than seven hundreds of times.
asmlinkage void do_ri(struct pt_regs *regs) { unsigned int __user *epc = (unsigned int __user *)exception_epc(regs); unsigned long old_epc = regs->cp0_epc; unsigned int opcode = 0; int status = -1; static int count = 0; printk("%d:do_ri called** ", count++); if (notify_die(DIE_RI, "RI Fault", regs, SIGSEGV, 0, 0) == NOTIFY_STOP) { printk("notify_die"); return; } die_if_kernel("Reserved instruction in kernel code", regs); if (unlikely(compute_return_epc(regs) < 0)) { printk("unlikely(compute_return_epc(regs) < 0)"); return; } if (unlikely(get_user(opcode, epc) < 0)) { printk("unlikely(get_user(opcode, epc) < 0)"); status = SIGSEGV; } if (!cpu_has_llsc && status < 0) { printk("status = simulate_llsc(regs, %d)", opcode); status = simulate_llsc(regs, opcode); } if (status < 0) { printk("status = simulate_rdhwr(regs, %d)", opcode); / *******************print this message and the kernel panic********************/ status = simulate_rdhwr(regs, opcode); } if (status < 0) { printk("status = simulate_sync(regs, %d)", opcode); status = simulate_sync(regs, opcode); } if (status < 0) { printk("status = SIGILL"); status = SIGILL; } if (unlikely(status > 0)) { printk("unlikely(status > 0)"); regs->cp0_epc = old_epc; /* Undo skip-over. */ force_sig(status, current); printk("force_sig(status, current)"); } the out put of "printk("status = simulate_rdhwr(regs, %d)", opcode); " is status = simulate_rdhwr(regs, 2080565307), I don't known what the mean of opcode, if it is the machine code of instruction, can anyone tips me? today, i also did another experiments, with the help of busybox, I made a root file system, by using which I enter the shell in the android linux kernel, and I execute the init program of the android file system, the result is as follows: 1 do_ri called** status = simulate_rdhwr(regs, 2080565307)2 do_ri called** status = simulate_rdhwr(regs, 2080565307)3 do_ri called** status = simulate_rdhwr(regs, 2080565307) ......... 700 do_ri called** status = simulate_rdhwr(regs, 2080565307)701 do_ri called** status = simulate_rdhwr(regs, 2080565307) A N D R O I D Segmentation failure. any suggestion? andy -- You received this message because you are subscribed to the Google Groups "loongson-dev" group. To post to this group, send email to loongson-dev@googlegroups.com. To unsubscribe from this group, send email to loongson-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.