public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Can't start Linux if U-Boot built with CONFIG_WATCHDOG
@ 2009-07-09  9:45 Matthew Lear
  2015-08-26 14:04 ` Paul Murphy
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Lear @ 2009-07-09  9:45 UTC (permalink / raw)
  To: u-boot

Hello all,

I've added watchdog support based on U-Boot (git) for the m68k coldfire
mcf54455evb platform. I've fed the patch to the maintainer to help in
development.

However, I am unable to start my m68k w/MMU coldfire Linux kernel from
U-Boot if U-Boot is built with CONFIG_WATCHDOG regardless if the
watchdog_enable(), watchdog_reset() and watchdog_disable() functions
touch hardware or not.

I initially thought this was a problem with enabling the watchdog
somehow (ie when Linux started, some hw configuration in the device was
getting upset or corrupted etc resulting in the failure), but when I
commented out the code from the above functions that actually accesses
the hw (ie to enable, kick and disable the watchdog timer hw block),
Linux is still unable to start.

In fact, I don't think Linux actually gets started! That's the problem.

If I rebuild the same U-Boot code base with CONFIG_WATCHDOG undefined,
Linux can start just fine. As far as I can tell, there are no functional
differences in building U-Boot with or without CONFIG_WATCHDOG enabled
when the functions above are stubs and do absolutely nothing at all.

If I build U-Boot with debug, what I see is as follows:


## Transferring control to Linux (at address 40020000) ...
BIV

...and then the board is dead. I occasionally see something like the
following from U-Boot:


*** Unexpected exception ***
Vector Number: 4 Format: 04 Fault Status: 0

PC: 4fdbfdc8 SR: 00002700 SP: 4fd72a64
D0: 00000004 D1: 000003f9 D2: 4fdb4202 D3: 004fa3da
D4: 00000000 D5: 4fdc7c8c D6: 122c0034 D7: 4fd82f76
A0: 4033cb98 A1: 4025aa39 A2: 40020000 A3: 4fdbfdc8
A4: 00000000 A5: 4fdc5800 A6: 4fd72afb

*** Please Reset Board! ***


The 'BIV' is relevant because in my 2.6.29 kernel src
arch/m68k/include/asm/bootinfo_mm.h, BOOTINFOV_MAGIC is defined to be
0x4249561A which is BIV^Z. This ascii text is located in the kernel
image header info:

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

* [U-Boot] Can't start Linux if U-Boot built with CONFIG_WATCHDOG
  2009-07-09  9:45 [U-Boot] Can't start Linux if U-Boot built with CONFIG_WATCHDOG Matthew Lear
@ 2015-08-26 14:04 ` Paul Murphy
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Murphy @ 2015-08-26 14:04 UTC (permalink / raw)
  To: u-boot

Matthew Lear <matt <at> bubblegen.co.uk> writes:

> 
> Hello all,
> 
> I've added watchdog support based on U-Boot (git) for the m68k coldfire
> mcf54455evb platform. I've fed the patch to the maintainer to help in
> development.
> 
> However, I am unable to start my m68k w/MMU coldfire Linux kernel from
> U-Boot if U-Boot is built with CONFIG_WATCHDOG regardless if the
> watchdog_enable(), watchdog_reset() and watchdog_disable() functions
> touch hardware or not.
> 

I had the same problem.
To any poor person who finds this in the future, the fix maybe this:

http://lists.denx.de/pipermail/u-boot/2009-July/055928.html

My problem was similar - it's not a problem with the watchdog exactly, but 
a bug in the common/image.c:memmove_wd, that overwrites parts of the 
source information when shifting the kernel from one location to the 
required location for booting.

-Paul

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

end of thread, other threads:[~2015-08-26 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09  9:45 [U-Boot] Can't start Linux if U-Boot built with CONFIG_WATCHDOG Matthew Lear
2015-08-26 14:04 ` Paul Murphy

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