<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>there is a strange problem.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>extern inline void out_be32(volatile unsigned __iomem *addr, int val)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));<br>}<br><br>i replace "intc_out_be32(intc + IER, 0)" with the assemble statements and rerun, nothing changes.<br><br>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.<br><br>dividing the "sync" and "stw" into 2 __asm__ ones, "sync" is passed but "stw" makes a strange _delay() calling.<br><br>so strange it is, who can help me?<br><br>thanks.<br></div></div><br>


      <hr size=1><a href="http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline">雅虎邮箱传递新年祝福,个性贺卡送亲朋!</a> </body></html>