[U-Boot] mpc8313erdb: crash in image_print_type()

Matthew L. Creech mlcreech at gmail.com
Thu Jan 22 21:36:18 CET 2009


I'm building U-Boot 2009.01 for the MPC8313 ERDB.  The issue I'm
having is that when attempting to boot the kernel (or even when doing
an "imi" command), I either get a bunch of garbage dumped to the
screen or a machine check exception:

=> imi 100000

## Checking Image at 00100000 ...
   Legacy image found
   Image Name:   Linux-2.6.28
   Created:      2009-01-15  20:55:48 UTC
   Image Type:   Machine check in kernel mode.
Caused by (from msr): regs 07f2f7b8 Unknown values in msr
NIP: 00001124 XER: 00000000 LR: 07FE318C REGS: 07f2f7b8 TRAP: 0200 DAR: 00000000
MSR: 00001000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 07F2FD08 07F2F8A8 07F2FF54 572553E1 00000000 07F2F8E8 0013E043 FFFFFFFF
GPR08: 00000003 572553E1 00000000 00000003 07FF2D86 00000000 07FFC000 00000000
GPR16: 00000000 07FF1930 07FFA238 07FF66D8 07FF2DD0 FFFFFF10 00000000 00000020
GPR24: 07F2F8F4 07FF1CBF 572553E1 FFFFFFFF 00000000 07F30122 07FFD49C 07F2F8E8
Call backtrace: Machine check in kernel mode.
Caused by (from msr): regs 07f2f688 Unknown values in msr
NIP: 07FB7940 XER: 00000000 LR: 07FB792C REGS: 07f2f688 TRAP: 0200 DAR: 00000000
MSR: 00003002 EE: 0 PR: 0 FP: 1 ME: 1 IR/DR: 00
...

The backtrace never actually gets printed (it seems to hit another
exception instead), so I can't use the debugging instructions at
http://www.denx.de/wiki/DULG/DecodingUBootCrashDumps .  By adding some
printf()s, it seems that it's getting into image_print_type(), but the
last line:

printf ("%s %s %s (%s)\n", arch, os, type, comp);

is triggering the crash.  Replacing with:

printf("%s\n", os);

still prints garbage, but I found that if I print the actual address
that 'os' points to, and I do a "md" from the command-line, it
correctly shows the uimage_os table entry:

=> md 13e61d
0013e61d: 4c696e75 78006e65 74627364 004e6574    Linux.netbsd.Net
...

So there seems to be something going on within printf() or some
sub-function that's causing this issue.  FYI, replacing with puts(os)
didn't help, so the problem seems to be at a fairly low level (not
within vsprintf() arg processing).


Build details:

- Toolchain is CodeSourcery 4.3-50 (CROSS_COMPILE is set to powerpc-linux-gnu-).

- This patch:
  http://www.mail-archive.com/u-boot@lists.denx.de/msg06883.html
  has been applied to get U-Boot to build properly.

- Otherwise, I'm doing a standard "make MPC8313ERDB_NAND_33_config; make".

Any ideas on how to debug this are appreciated, thanks!

-- 
Matthew L. Creech


More information about the U-Boot mailing list