there is a strange problem.

my platform is ml410, port linux-2.6.23rc2 vertex kernel to it. the toolchain 
is generated by crosstool. the cross-gcc is powerpc-405-linux-gnu-gcc 
4.0.2.when i complete the kernel compiling and download it to the board to run, 
there are a few questions.

at first, i can't see anything output after "Now booting the kernel". through 
debugging i found that init_IRQ() function in init/main.c can't run to the end. 
so i cut it and rerun the kernel. it runs so long until the rootfs is mounted. 
the problem occurs in executing /linuxrc. it says "init has generated signal 4 
but has no handler for it". the reason, i've known, is that i disabled the 
init_IRQ() function. then i get down to search for the wrong point.

the init_IRQ() called in init/main.c is defined in arch/powerpc/kernel/irq.c. 
init_IRQ() calls ppc_md.init_IRQ(). ppc_md is a variable of "struct 
machdep_calls". the ppc_md.init_IRQ is evaluated in 
arch/ppc/syslib/ppc4xx_setup.c. the statement is ppc_md.init_IRQ = 
ppc4xx_init_IRQ. and the ppc4xx_init_IRQ() calls ppc4xx_pic_init() defined in 
arch/ppc/syslib/xilinx_pic.c.

tracing into ppc4xx_pic_init() function, i located the problem at 
"intc_out_be32(intc + IER, 0)". "intc_out_be32" is a macro as the real form 
"out_be32((addr), (mask))". the out_be32() is a function defined in 
include/asm-ppc/io.h.

extern inline void out_be32(volatile unsigned __iomem *addr, int val)
{
        __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" 
(val));
}

i replace "intc_out_be32(intc + IER, 0)" with the assemble statements and 
rerun, nothing changes.

XPS's debugger points out that the kernel stop in _delay() function. but there 
is not any call to this function. only the 2 assemble statements are there.

dividing the "sync" and "stw" into 2 __asm__ ones, "sync" is passed but "stw" 
makes a strange _delay() calling.

so strange it is, who can help me?

thanks.




      ___________________________________________________________ 
雅虎邮箱传递新年祝福,个性贺卡送亲朋! 
http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Reply via email to