public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] SoCFPGA PL330 DMA driver and ECC scrubbing
Date: Wed, 11 Jul 2018 17:30:09 +0000	[thread overview]
Message-ID: <1531330208.2283.74.camel@impinj.com> (raw)
In-Reply-To: <efa66d89-25b3-5109-3722-c74eea18a950@gmail.com>

On Wed, 2018-07-11 at 08:56 -0500, Jason Rush wrote:
> On 7/11/2018 8:48 AM, Marek Vasut wrote:
> > On 07/11/2018 03:49 PM, Jason Rush wrote:
> > > 
> > > My mistake.  I did disable the dcache after scrubbing too.  The
> > > code is almost identical to the Arria10 code where after
> > > scrubbing it flushes the dcache, then turns it off.
> > > 
> > > The weird reset problems happens if I scrub the area where
> > > u-boot relocates to with the dcache on, then turn dcache off.
> > > 
> > > I tried to also tried turning the MMU off, but that didn't help.
> > 
> > Maybe there are some data used by the SPL there ? I think the SPL has
> > malloc area in RAM at some point.
> > 
> 
> I thought something similar, so I narrowed it down to clearing
> just from where U-Boot relocates to the end of DRAM.  If I'm
> correct, that includes where U-Boot relocates and where the
> MMU tables are normally stored.

I wonder if the reset does not properly reset the CPU caches?  The idea
being that the CPU cache has stale data from before the reset, or maybe
just stale tag bits, and the hang is due to using this bad data from
the cache.

Or perhaps there is always something done incorrectly, but it is only
the state of DRAM after a reset, vs a power cycle, that consistently
triggers a hang?

If possible, try to add code before the hang point to invalidate both
the i-cache and d-cache for the problem region above.  Perhaps the SPL
is doing something wrong w.r.t. cache invalidation, e.g. moving code
around and not updating the i-cache, because it assumes nothing has yet
used the caches, which is now no longer the case since you turn them on
for scrubbing.

  parent reply	other threads:[~2018-07-11 17:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 14:31 [U-Boot] SoCFPGA PL330 DMA driver and ECC scrubbing Jason Rush
2018-06-29 14:34 ` Marek Vasut
2018-06-29 14:44   ` Jason Rush
2018-06-29 14:52     ` Marek Vasut
2018-06-29 15:06       ` Jason Rush
2018-06-29 15:17         ` Marek Vasut
2018-07-03 13:58           ` Jason Rush
2018-07-03 14:08             ` Marek Vasut
2018-07-03 23:45               ` Jason Rush
2018-07-04  7:23                 ` Marek Vasut
2018-07-05 23:11                   ` Jason Rush
2018-07-05 23:10                     ` Marek Vasut
2018-07-05 23:28                       ` Jason Rush
2018-07-06 22:56                       ` Jason Rush
2018-07-09  8:08                         ` Marek Vasut
2018-07-10 12:10                           ` Jason Rush
2018-07-10 16:11                             ` Marek Vasut
2018-07-11  3:11                               ` Jason Rush
2018-07-11  8:55                                 ` Marek Vasut
2018-07-11 13:49                                   ` Jason Rush
2018-07-11 13:48                                     ` Marek Vasut
2018-07-11 13:56                                       ` Jason Rush
2018-07-11 14:05                                         ` Marek Vasut
2018-07-11 17:30                                         ` Trent Piepho [this message]
2018-07-11 18:54                                           ` Marek Vasut
2018-07-13 12:50                                             ` Jason Rush
2018-07-13 14:54                                               ` Marek Vasut

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=1531330208.2283.74.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --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