public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@intracom.gr>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] 8xx: fix initialation bug/race condition between u-boot & linux
Date: Tue, 17 Jun 2003 15:43:34 +0300	[thread overview]
Message-ID: <3EEF0CF6.70004@intracom.gr> (raw)

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 

             reply	other threads:[~2003-06-17 12:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17 12:43 Pantelis Antoniou [this message]
2003-06-17 18:54 ` [U-Boot-Users] Re: [PATCH] 8xx: fix initialation bug/race condition between u-boot & linux 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EEF0CF6.70004@intracom.gr \
    --to=panto@intracom.gr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox