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] Re: [PATCH] 8xx: fix initialization bug/race condition between u-boot & linux
Date: Thu, 19 Jun 2003 12:21:47 +0300	[thread overview]
Message-ID: <3EF180AB.3030304@intracom.gr> (raw)
In-Reply-To: <20030619083107.CF146C5FD7@atlas.denx.de>

Wolfgang Denk wrote:

>In message <3EF156E9.9000600@intracom.gr> you wrote:
>
>>OK. Shouldn't there be at least a comment in the code to mention that?
>>
>
>Feel free to submit a patch.
>
OK

>
>>>This is a common problem of all bootloaders that don't disable the
>>>Ethernet controller after they have performed the network load
>>>operation.  You must disable any kind of DMA operation that could
>>>write into memory while any software outside of the boot rom is
>>>initializing.  Performing the CPM reset in the kernel doesn't solve
>>>this problem, it only makes the window of opportunity smaller.
>>>With sufficient network traffic and coincidental buffer locations,
>>>you will always crash even with the CPM reset in the kernel.
>>>
>>Yep, it is a job for the bootloader. Wolfgang?
>>
>
>Can you please explain  again  under  which  conditions  the  problem
>happened?  As  Dan  explained  there  is good reason NOT to perform a
>global CPM reset, but to leave the console UART enabled (which should
>be not critical). Regarding network transfers  I  think  that  U-Boot
>will   call  eth_halt()  after  all  (attempted)  network  transfers;
>eth_halt()  in  turn  calls  driver  functions  (like  scc_halt()  or
>fec_halt()) that should disable the network controller.
>
>You wrote:
>
>
>>  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 have never seen a crash like the one you reported, and in fact I am
>not convinced that it is a global problem. Maybe the problem is  only
>introduced by your own SPI/UART driver code?
>
>In any case: if you find a place where a CPM device is not shut  down
>before booting Linux please submit a patch. But I would like to avoid
>a global CPM reset.
>
The problem was introduced while testing the SPI/UART driver
and using the SMC uart on u-boot.
Since the SMC uart was disabled in linux it's dpram memory area was used by
the next CP driver, the ethernet. However it was still active and both
the ethernet and SMC ended up using the same dpram.

When both u-boot and the kernel use the SPI/UART for console there is no
problem.

Granted it is an obscure case, but the whole thing was surprising.

And since the whole mess was produced by kgdb, which was not
configured in could we at least reset the CP if we don't use kgdb?
It will save some poor sucker some hair.

>
>Best regards,
>
>Wolfgang Denk
>
>
Regards

Pantelis

  reply	other threads:[~2003-06-19  9:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=3EF180AB.3030304@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