coreboot/payloads/libpayload/arch/arm
Julius Werner 6d94f83301 arm: Fix up new cache flush algorithm and replace dcache_*_all() with it
This patch fixes the remaining few bugs in our shiny new cache iteration
by set/way/level algorithm to actually make it work: It makes it start
from cache level 0 (previously it would always start at LoC and be
"done" instantly), fixes up the two shifts that isolate the set bits at
the end (which didn't seem to account for the fact that the first shift
affects the second), and throws an S bit on that last shift so that it
actually affects the conditionals after it.

In addition, also moves the next_level block to the top so that we can
share (and thus eliminate) some code at initialization, and turns the
whole thing into a thrice-instantiated macro to create functions that
fit our existing interface.

BUG=None
TEST=Ran with cache_test code (see separate CL) and closely examined the
resulting output. Made sure results look as expected (iterating through
all sets (inner) and ways (outer) for L1 and then L2 cache, extracting
the right numbers from CLIDR and CCSIDR, not touching anything twice).
Time for a single dcache_clean_invalidate_all() on Nyan drops from 3.7ms
to 0.3ms.

Change-Id: I1338a589cbb37d74ea6e7a3d4f67ff827e24edbe
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/183879
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-01-29 04:58:17 +00:00
..
asmlib.h arm: Update mem* functions to newer versions 2014-01-14 03:29:44 +00:00
cache.c arm: Fix up new cache flush algorithm and replace dcache_*_all() with it 2014-01-29 04:58:17 +00:00
Config.in ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
coreboot.c libpayload: Add vboot handoff parsing on ARM 2013-12-17 03:15:39 +00:00
cpu.S arm: Fix up new cache flush algorithm and replace dcache_*_all() with it 2014-01-29 04:58:17 +00:00
dummy_media.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
exception.c arm: Remove exception_test() 2013-11-20 06:51:13 +00:00
exception_asm.S arm: Remove exception_test() 2013-11-20 06:51:13 +00:00
head.S arm: Move libgcc assembly macros to arch/asm.h 2014-01-14 03:29:41 +00:00
libpayload.ldscript ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
main.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
Makefile.inc arm: Fix up new cache flush algorithm and replace dcache_*_all() with it 2014-01-29 04:58:17 +00:00
memcpy.S arm: Update mem* functions to newer versions 2014-01-14 03:29:44 +00:00
memmove.S arm: Update mem* functions to newer versions 2014-01-14 03:29:44 +00:00
memset.S arm: Update mem* functions to newer versions 2014-01-14 03:29:44 +00:00
sysinfo.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
timer.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
util.S arm: Move libgcc assembly macros to arch/asm.h 2014-01-14 03:29:41 +00:00
virtual.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00