Skip to contentSkip to conversation

u-boot depends on toolchain

U-Boot Stevan Ignjatovic 2 participants 2 messages Apr 1, 2009

lore
Share & tools
lore
#0 lore raw

When I cross-compile u-boot prepared for my custom made board with mpc885 (CROSS_COMPILE=ppc_8xx-) using the toolchain found in eldk 4.2 (gcc version 4.2.2) u-boot doesn't boot because of an exception:

U-Boot 2009.03 (Apr 01 2009 - 10:27:03)

CPU: MPC885ZPnn at 66 MHz [66.0...133.0 MHz]
8 kB I-Cache 8 kB D-Cache FEC present
Board: MPC885FSM
DRAM: 16 MB
Machine check in kernel mode.
Caused by (from msr): regs 00d3be48 Unknown values in msr
NIP: 00FD1260 XER: 20000C00 LR: 00FD1208 REGS: 00d3be48 TRAP: 0200 DAR:
01000000
MSR: 00001002 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 5D59FFFF 00D3BF38 00D3BF8C 00FCD000 00FD1208 00FF8DD2 00000010 00FF93E4
GPR08: 5A5D2FFF 02FCD000 00D3BF8C 00FFFFEC F0002C38 00000251 00FFE000 02FCD000
GPR16: 48512009 C31C0C00 00202000 2AA0C000 00001002 00000001 00000000 00FCF09C
GPR24: 00FCFC68 47100000 00000001 00FCD000 00D3BF68 00FCD000 00FFE12C 00D3BFC4
Call backtrace:
00FD1200 00FCF3B0
machine check

However, when I cross-compile it using older toolchain (gcc version 3.3.2) everything's fine:

U-Boot 2009.03 (Apr 01 2009 - 11:40:33)

CPU: MPC885ZPnn at 66 MHz [66.0...133.0 MHz]
8 kB I-Cache 8 kB D-Cache FEC present
Board: MPC885FSM

DRAM:  16 MB
FLASH: 16 MB

*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET, FEC2 ETHERNET
Hit any key to stop autoboot:  0

=>

Why does this happen?

Regards,
Stevan

#1 lore raw

Dear Stevan Ignjatovic,

Quoted 3 lines · In message <1238580375.15731.11.camel@stevan> you wrote:

When I cross-compile u-boot prepared for my custom made board with mpc885 (CROSS_COMPILE=ppc_8xx-) using the toolchain found in eldk 4.2 (gcc version 4.2.2) u-boot doesn't boot because of an exception:

...

Quoted 2 lines

However, when I cross-compile it using older toolchain (gcc version 3.3.2) everything's fine:

...

Quoted 1 line

Why does this happen?

Well, we don't know your code, so it is difficult to comment on it?

One likely problem might be that you access device registers through pointers instead of using the correct accessor functions, thus missing required memory barrier / eieio / sync instructions etc. Recent compiler versions optimize much better that older ones, so they might optimize away certain parts of such incorrect code.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe, they said, depended for its operation on the balance of
four forces which they identified as charm,  persuasion,  uncertainty
and bloody-mindedness.      -- Terry Pratchett, "The Light Fantastic"