diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-15 21:11:47 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-23 09:29:52 +0200 |
commit | 28278839116d9e29132a61c2c0c612900c244708 (patch) | |
tree | 9fc879b4a385d899515e908b007b96a214032b90 /arch/arm/cpu/start-pbl.c | |
parent | 465950ee64f6fbeb0daf138c2d43ad71be159375 (diff) | |
download | barebox-28278839116d9e29132a61c2c0c612900c244708.tar.gz barebox-28278839116d9e29132a61c2c0c612900c244708.tar.xz |
ARM: invalidate data caches during early init
Some SoCs come up with invalid entries in the data cache. This can
lead to memory corruption when we enable them later, so invalidate
the caches early.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/start-pbl.c')
-rw-r--r-- | arch/arm/cpu/start-pbl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c index 6f03c4a7df..3ef0118521 100644 --- a/arch/arm/cpu/start-pbl.c +++ b/arch/arm/cpu/start-pbl.c @@ -59,6 +59,8 @@ static noinline __noreturn void __barebox_arm_entry(uint32_t membase, endmem -= STACK_SIZE; /* stack */ + arm_early_mmu_cache_invalidate(); + if (IS_ENABLED(CONFIG_PBL_RELOCATABLE)) relocate_to_current_adr(); |