[U-Boot] [RFC] command/cache: Add flush_cache command

Scott Wood
2013-03-20T23:48:38Z

On 03/20/2013 06:33:41 PM, Michael Cashwell wrote:
> On Mar 20, 2013, at 6:35 PM, Scott Wood <scottwood@freescale.com>
> wrote:
>
> > Really, instead of adding one command, you want to modify *two*
> commands to do the same thing separately, which involves changing the
> syntax of both commands to accept memory range information?
>
> What is the purpose of limiting the memory range to be flushed? Is
> there a reason one might want to NOT flush certain data sitting in a
> dirty cache line out to memory before doing a go or boot command?

Because it would take a while to flush all of RAM?

> If you drive the operation as a "walk the cache" process rather than
> a "iterate over all SDRAM physical address space to cherry pick
> within a range" it wouldn't seem that slow. I mean, there's only so
> much cache memory.

There's no way to "walk the cache" on many chips, including ours.
There are generally ways to flush the entire thing, but they are (more)
hardware-specific than using the architected method of flushing a
memory range, and sometimes these methods have errata associated with
them.

-Scott