From e5b78a6494b21501f90c62348c2319cdb2ad93b4 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 20 Jun 2014 15:27:30 +0200 Subject: [PATCH] hw: disable L2 cache for imx53 platform Currently the L2 cache for i.MX53 doesn't work correctly in the hw-kernel, so we temporarily disable it. Ref #1182 --- repos/base-hw/src/core/imx53/board.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/base-hw/src/core/imx53/board.h b/repos/base-hw/src/core/imx53/board.h index 65d19728e2..1f3aa9fa18 100644 --- a/repos/base-hw/src/core/imx53/board.h +++ b/repos/base-hw/src/core/imx53/board.h @@ -78,6 +78,13 @@ namespace Imx53 struct Board : Genode::Board_base { + static void disable_l2_cache() + { + asm volatile ("mrc p15, 0, r0, c1, c0, 1 \n" + "bic r0, r0, #2 \n" + "mcr p15, 0, r0, c1, c0, 1" ::: "r0" ); + } + /** * static AIPS 1 instance */ @@ -93,6 +100,8 @@ namespace Imx53 */ static void prepare_kernel() { + disable_l2_cache(); + aips_1()->prepare_kernel(); aips_2()->prepare_kernel(); }