mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] Arm: i.MX5: Do not disable L2 cache
Date: Fri, 26 Jun 2020 06:47:39 +0200	[thread overview]
Message-ID: <20200626044739.GC19105@pengutronix.de> (raw)
In-Reply-To: <8ed6835fbd1cb8e35117ff87f49502ef35d455d2.camel@pengutronix.de>

On Thu, Jun 18, 2020 at 02:21:08PM +0200, Lucas Stach wrote:
> Am Donnerstag, den 18.06.2020, 14:12 +0200 schrieb Sascha Hauer:
> > Disabling the L2 cache is not working in imx5_init_lowlevel() because
> > the necessary cache maintenance operations are missing. This often
> > results in cache corruption in a chainloaded barebox.
> > Disabling the cache is unnecessary: when we come from the ROM the L2
> > cache is disabled anyway, so disabling it is a no-op. When we get here
> > in a chainloaded barebox the L2 cache is already enabled and correctly
> > configured. So instead of initializing it again we can take an enabled
> > L2 cache as a sign to skip initialization and just return from the
> > function.
> 
> While this won't hurt much, shouldn't we also disable the L2 cache on
> Barebox shutdown, like we do on other SoCs?

Documentation/arm/booting.rst clearly states:

Data cache must be off.

So yes, to do it correctly we should disable the L2 cache.

So far I am happy that my QSB board no longer randomly crashes in a
secondary barebox.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2020-06-26  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 12:12 Sascha Hauer
2020-06-18 12:21 ` Lucas Stach
2020-06-26  4:47   ` Sascha Hauer [this message]

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=20200626044739.GC19105@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.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