|author||Julius Werner <email@example.com>||2014-01-21 20:11:22 -0800|
|committer||Marc Jones <firstname.lastname@example.org>||2014-11-10 21:34:49 +0100|
arm: Redesign, clarify and clean up cache related code
This patch changes several cache-related pieces to be cleaner, faster or more correct. The largest point is removing the old arm_invalidate_caches() function and surrounding bootblock code to initialize SCTLR and replace it with an all-assembly function that takes care of cache and SCTLR initialization to bring the system to a known state. It runs without stack and before coreboot makes any write accesses to be as compatible as possible with whatever state the system was left in by preceeding code. This also finally fixes the dreaded icache bug that wasted hundreds of milliseconds during boot. Old-Change-Id: I7bb4995af8184f6383f8e3b1b870b0662bde8bd4 Signed-off-by: Julius Werner <email@example.com> Reviewed-on: https://chromium-review.googlesource.com/183890 (cherry picked from commit 07a35925dc957919bf88dfc90515971a36e81b97) nyan_big: apply cache-related changes from nyan This applies the same changes from 07a3592 that were applied to nyan. Old-Change-Id: Idcbe85436d7a2f65fcd751954012eb5f4bec0b6c Reviewed-on: https://chromium-review.googlesource.com/184551 Commit-Queue: David Hendricks <firstname.lastname@example.org> Tested-by: David Hendricks <email@example.com> Reviewed-by: David Hendricks <firstname.lastname@example.org> (cherry picked from commit 4af27f02614da41c611aee2c6d175b1b948428ea) Squashed the followup patch for nyan_big into the original patch. Change-Id: Id14aef7846355ea2da496e55da227b635aca409e Signed-off-by: Isaac Christensen <email@example.com> (cherry picked from commit 4cbf25f8eca3a12bbfec5b015953c0fc2b69c877) Signed-off-by: Marc Jones <firstname.lastname@example.org> Reviewed-on: http://review.coreboot.org/6993 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <email@example.com>
Diffstat (limited to 'src/arch/arm/stages.c')
1 files changed, 5 insertions, 13 deletions
diff --git a/src/arch/arm/stages.c b/src/arch/arm/stages.c
index 38d1b1928..47f13fa71 100644
@@ -20,12 +20,7 @@
* This file contains entry/exit functions for each stage during coreboot
* execution (bootblock entry and ramstage exit will depend on external
- * loading.
- * Unlike other files, this one should be compiled with a -m option to
- * specify a pre-determined instruction set. This is to ensure consistency
- * in the CPU operating mode (ARM or Thumb) when hand-off between stages
- * occurs.
+ * loading).
* Entry points must be placed at the location the previous stage jumps
* to (the lowest address in the stage image). This is done by giving
@@ -49,13 +44,10 @@ void stage_entry(void)
void stage_exit(void *addr)
void (*doit)(void) = addr;
- /* make sure any code we installed is written to memory. Not all ARM have
- * unified caches.
- /* Because most stages copy code to memory, it's a safe and hygienic thing
- * to flush the icache here.
+ * Most stages load code so we need to sync caches here. Should maybe
+ * go into cbfs_load_stage() instead...