public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] u-boot depends on toolchain
@ 2009-04-01 10:06 Stevan Ignjatovic
  2009-04-01 13:47 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Stevan Ignjatovic @ 2009-04-01 10:06 UTC (permalink / raw)
  To: u-boot

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
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] u-boot depends on toolchain
  2009-04-01 10:06 [U-Boot] u-boot depends on toolchain Stevan Ignjatovic
@ 2009-04-01 13:47 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2009-04-01 13:47 UTC (permalink / raw)
  To: u-boot

Dear Stevan Ignjatovic,

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:
...
> However, when I cross-compile it using older toolchain (gcc version
> 3.3.2) everything's fine:
...
> 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

-- 
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"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-01 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01 10:06 [U-Boot] u-boot depends on toolchain Stevan Ignjatovic
2009-04-01 13:47 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox