aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorArd Biesheuvel2020-07-07 12:07:09 +0200
committerTom Rini2020-07-29 08:43:40 -0400
commit3fa914af821496bde52d8be510224f5e69c9c8b9 (patch)
tree12b8df2ef23d554ac0f52518aa0799001ddf5e17 /board
parent6a690c47ce16459d267e10d1d4ac337d3e3d04cc (diff)
arm: qemu: implement enable_caches()
Add an override for enable_caches to enable the I and D caches, along with the cached 1:1 mapping of all of DRAM. This is needed for running U-Boot under virtualization with QEMU/kvm. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'board')
-rw-r--r--board/emulation/qemu-arm/qemu-arm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 69e8ef46f1f..1b0d543b93c 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <fdtdec.h>
#include <init.h>
@@ -94,6 +95,12 @@ void *board_fdt_blob_setup(void)
return (void *)CONFIG_SYS_SDRAM_BASE;
}
+void enable_caches(void)
+{
+ icache_enable();
+ dcache_enable();
+}
+
#if defined(CONFIG_EFI_RNG_PROTOCOL)
#include <efi_loader.h>
#include <efi_rng.h>