From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] armv8: caches: Disable dcache after flush
Date: Mon, 20 Apr 2015 11:18:29 +0100 [thread overview]
Message-ID: <20150420101829.GF15875@leverpostej> (raw)
In-Reply-To: <e3d1e6b8-9f4f-4316-bb59-2972bd4db645@BY2FFO11FD019.protection.gbl>
> > > Thanks for explanation.
> > > So in that case, the flushing of the required stack or any other data
> > > which needs to be flushed should be part of board specific. Am I
> > > correct?
> >
> > It could be done in generic code, assuming we know the bounds of memory
> > which will be used, because maintenance by VA should always work.
> >
> > Do we know which memory U-Boot might use (e.g. does it all fall within some
> > static carveout?), or can it dynamically allocate from anywhere in memory?
> >
> > > If yes, then this disable_dcache() should contain a asm call to a
> > > routine() (which might be board specific) after disabling the cache to
> > > flush the required data and then flush_dcache_all() followed by flush
> > > L3 cache..
> >
> > You could probably get away with:
> >
> > * Load the memory bounds that we need to flush into some registers, or
> > flush some datastructure containing these to memory.
> > * In assembly:
> > - disable the MMU.
> > - flush the PA range(s) we need to use to be able to use C safely.
> > - flush by Set/Way to empry the CPU-local caches
> > * Implementation-specific L3 flushing for anything else.
> >
> > If we only map a small amount of memory, we could simply flush this by VA
> > (knowing that this will drain the CPU and L3 caches, without any special
> > maintenance).
> I just looked at one of the old patch from York in the link below. Can you look at this.
> http://lists.denx.de/pipermail/u-boot/2015-January/200514.html
I'm not sure what you're expecting me to say w.r.t. that. Is there a
particular question you have?
Thanks,
Mark.
next prev parent reply other threads:[~2015-04-20 10:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 11:33 [U-Boot] [PATCH 1/2] armv8: caches: Disable dcache after flush Michal Simek
2015-04-15 11:33 ` [U-Boot] [PATCH 2/2] armv8: caches: Added routine to set non cacheable region zzz Michal Simek
2015-04-15 13:10 ` [U-Boot] [PATCH 1/2] armv8: caches: Disable dcache after flush Mark Rutland
2015-04-16 5:17 ` Siva Durga Prasad Paladugu
2015-04-16 9:58 ` Mark Rutland
2015-04-17 4:35 ` Siva Durga Prasad Paladugu
2015-04-17 10:06 ` Mark Rutland
2015-04-17 10:43 ` Siva Durga Prasad Paladugu
2015-04-20 10:18 ` Mark Rutland [this message]
2015-04-20 10:32 ` Siva Durga Prasad Paladugu
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=20150420101829.GF15875@leverpostej \
--to=mark.rutland@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.