blob: e8f4cc44dc122e7d49166c2a69bea2d76ab20904 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001Upstream-Status: Pending [Not submitted to upstream yet]
2Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
3
4From 0c3ce4c09cd7d2ff4cd2e62acab899dd88dc9514 Mon Sep 17 00:00:00 2001
5From: Vishnu Banavath <vishnu.banavath@arm.com>
6Date: Wed, 20 Jul 2022 16:45:59 +0100
7Subject: [PATCH] HACK: disable instruction cache and data cache.
8
9For some reason, n1sdp fails to boot with instruction cache and
10data cache enabled. This is a temporary change to disable I cache
11and D cache until a proper fix is found.
12
13Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
14
15%% original patch: 0003-HACK-disable-instruction-cache-and-data-cache.patch
16
17diff --git a/core/arch/arm/kernel/entry_a64.S b/core/arch/arm/kernel/entry_a64.S
18index 875b6e69..594d6928 100644
19--- a/core/arch/arm/kernel/entry_a64.S
20+++ b/core/arch/arm/kernel/entry_a64.S
21@@ -52,7 +52,7 @@
22
23 .macro set_sctlr_el1
24 mrs x0, sctlr_el1
25- orr x0, x0, #SCTLR_I
26+ bic x0, x0, #SCTLR_I
27 orr x0, x0, #SCTLR_SA
28 orr x0, x0, #SCTLR_SPAN
29 #if defined(CFG_CORE_RWDATA_NOEXEC)
30@@ -490,11 +490,11 @@ LOCAL_FUNC enable_mmu , : , .identity_map
31 isb
32
33 /* Enable I and D cache */
34- mrs x1, sctlr_el1
35+ /* mrs x1, sctlr_el1
36 orr x1, x1, #SCTLR_I
37 orr x1, x1, #SCTLR_C
38 msr sctlr_el1, x1
39- isb
40+ isb */
41
42 /* Adjust stack pointers and return address */
43 msr spsel, #1
44--
452.17.1
46