Hi, I get a big headache when porting u-boot to the MPC8540 system. the problem
is in the "printf" function of the "console.c" file, the following is the dump
file
------------------------------------------------------------------------
void printf (const char *fmt, ...)
{
fff99308: 94 21 fe 50 stwu r1,-432(r1)
fff9930c: 7c 08 02 a6 mflr r0
fff99310: 90 01 01 b4 stw r0,436(r1)
fff99314: 39 61 00 0c addi r11,r1,12
va_list args;
uint i;
char printbuffer[CFG_PBSIZE];
va_start (args, fmt);
fff99318: 38 00 00 01 li r0,1
fff9931c: 7c 8b e5 aa stswi r4,r11,28
fff99320: 98 01 00 70 stb r0,112(r1)
fff99324: bf 81 01 a0 stmw r28,416(r1)
fff99328: 38 00 00 00 li r0,0
... ... ... ... ... ... ...
--------------------------------------------------------------------------
when I traced into this function, unexpected interrupt occurs on the
"fff99318 38 00 00 01 li r0,1"
and the compiling log is as follows:
ppc-linux-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__
-DTEXT_BASE=0xfff80000 -I/home/aubrey/ppc-linux/u-boot/include
-fno-builtin -ffreestanding -nostdinc -isystem
/home/aubrey/ppc-linux/eldk/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/include
-pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500
-ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -DCONFIG_MPC85xx=1
-DCONFIG_MPC8540=1 -DCONFIG_E500=1 -Wall -Wstrict-prototypes -c -o
console.o console.c I don't know how to solve
this problem.
Any comment and suggestion will be welcome!