From: Ard Biesheuvel Date: Tue, 7 Jul 2020 10:07:09 +0000 (+0200) Subject: arm: qemu: implement enable_caches() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3fa914af821496bde52d8be510224f5e69c9c8b9;p=u-boot.git 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 Reviewed-by: Heinrich Schuchardt Reviewed-by: Andre Przywara --- diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index 69e8ef46f1..1b0d543b93 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -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 #include