summaryrefslogtreecommitdiff
path: root/src/arch/arm64/armv8/mmu.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-04-21 14:32:36 -0700
committerJulius Werner <jwerner@chromium.org>2017-05-30 22:17:57 +0200
commitbaa3e70084bac00885667b20efde3e69901cda70 (patch)
treeceea5f55a386f4d94ff16fd203aa2191a8680c50 /src/arch/arm64/armv8/mmu.c
parent3db7653aabb98b02b9dbea0231fa68eacbbb5991 (diff)
downloadcoreboot-baa3e70084bac00885667b20efde3e69901cda70.tar.xz
arm64: Align cache maintenance code with libpayload and ARM32
coreboot and libpayload currently use completely different code to perform a full cache flush on ARM64, with even different function names. The libpayload code is closely inspired by the ARM32 version, so for the sake of overall consistency let's sync coreboot to that. Also align a few other cache management details to work the same way as the corresponding ARM32 parts (such as only flushing but not invalidating the data cache after loading a new stage, which may have a small performance benefit). Change-Id: I9e05b425eeeaa27a447b37f98c0928fed3f74340 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/19785 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/arm64/armv8/mmu.c')
-rw-r--r--src/arch/arm64/armv8/mmu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/arch/arm64/armv8/mmu.c b/src/arch/arm64/armv8/mmu.c
index 9280fc2d7c..55bd703d44 100644
--- a/src/arch/arm64/armv8/mmu.c
+++ b/src/arch/arm64/armv8/mmu.c
@@ -37,7 +37,6 @@
#include <arch/mmu.h>
#include <arch/lib_helpers.h>
#include <arch/cache.h>
-#include <arch/cache_helpers.h>
/* This just caches the next free table slot (okay to do since they fill up from
* bottom to top and can never be freed up again). It will reset to its initial
@@ -295,7 +294,7 @@ void mmu_enable(void)
*/
void mmu_disable(void)
{
- flush_dcache_all(DCCISW);
+ dcache_clean_invalidate_all();
uint32_t sctlr = raw_read_sctlr_el3();
sctlr &= ~(SCTLR_C | SCTLR_M);
raw_write_sctlr_el3(sctlr);