public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] 8xx: fix initialation bug/race condition between u-boot & linux
@ 2003-06-17 12:43 Pantelis Antoniou
  2003-06-17 18:54 ` [U-Boot-Users] " Tom Rini
  2003-06-18 18:56 ` Dan Malek
  0 siblings, 2 replies; 13+ messages in thread
From: Pantelis Antoniou @ 2003-06-17 12:43 UTC (permalink / raw)
  To: u-boot

Hi all

  Sorry in advance for cross-posting but this is
a problem that affects both the boot loader and
the kernel.

  In my 8xx board we use u-boot in order to boot linux.

  My troubles began when for dpram conflict reasons we
moved from using a console on an SMC to a max3100 SPI/UART
converter chip.

  I was still using the SMC console in u-boot, but when tried
to use this chip as a driver for the boot console and removing
the CPM console, strange panics appeared in the ethernet driver.

  After some interesting debugging sessions the problem
was discovered to be this:

  The u-boot loader upon finishing the decompression of the
kernel image it just jumps into the kernel without
resetting the CP. The kernel however resets the CP only when
configured to apply a u-patch. The UART in the CP is
still active however, and the descriptors in dpram
end up overlapping.

  The attached patch fixes the common problem by performing the CP
reset every time.
 
  This is only a bandaid however, because under network load
at the time of booting, i.e. broadcast packets or rebooting after
a crash and another end sending non TCP packets, we still crash.
  It is still possible for a packet to be received and placed
in memory by DMA before the kernel reaching the point where the
ethernet controller is initialized.

    [boot jumps into kernel  ]
    [kernel starts executing ]
                                 <--- incoming packet
        write in memory
    XXX possible corruption XXX   

    [init ethernet controller]

  The proper way to address the problem is for the loader
to stop any DMA capable peripherals before executing
the kernel.

  The fix for my case is a simple reset of the CP,
but I believe that this is a problem that should be looked
upon by the maintainers.

  IMHO it is good practice for the kernel too to issue a
reset to it's peripherals as soon as possible in order
to minimize the chances of that happening.

Regards

Pantelis

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: one-liner.diff
Url: http://lists.denx.de/pipermail/u-boot/attachments/20030617/a113ad9a/attachment.txt 

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

end of thread, other threads:[~2003-06-19 14:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-17 12:43 [U-Boot-Users] [PATCH] 8xx: fix initialation bug/race condition between u-boot & linux Pantelis Antoniou
2003-06-17 18:54 ` [U-Boot-Users] " Tom Rini
2003-06-18  7:00   ` Pantelis Antoniou
2003-06-18  7:16     ` Wolfgang Denk
2003-06-18  7:35       ` Pantelis Antoniou
2003-06-18  8:32       ` Jaap-Jan Boor
2003-06-18 14:18         ` Tom Rini
2003-06-18 18:56 ` Dan Malek
2003-06-19  6:23   ` [U-Boot-Users] Re: [PATCH] 8xx: fix initialization " Pantelis Antoniou
2003-06-19  8:31     ` Wolfgang Denk
2003-06-19  9:21       ` Pantelis Antoniou
2003-06-19 10:09         ` Wolfgang Denk
2003-06-19 14:40     ` Tom Rini

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