diff options
authorAlexander Graf <agraf@suse.de>2013-03-21 18:19:39 +0100
committerFathi Boudra <fathi.boudra@linaro.org>2013-03-27 10:13:59 +0200
commit921ce9c32de5561c27e000b11218de74437d462e (patch)
parent9029fee1c788443a60f4a3a537eaf976b64f4ab7 (diff)
Exynos5: Fix errata 773022 and 774769 on Exynos52502013.02.3
The exynos5250 chip is affected by the errata 773022 (disable loop buffer) 774769 (refrain streaming-write to ever allocate into the L2 cache) and needs to get the respective fixes as mentioned above applied. This is done in the Samsung downstream kernel within Linux. However, that approach fails to work when we run the guest kernel in HYP mode, as in now Linux's errata fixup code runs without privileges to access the aux control register. So instead, let's patch up u-boot (where CPU errata fixes belong to anyways), so that we can happily run a kernel. This fixes random segmentation faults on Arndale for me, that mostly occured because of the broken loop buffer. Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 11 insertions, 1 deletions
diff --git a/board/samsung/smdk5250/monitor.S b/board/samsung/smdk5250/monitor.S
index 8bc21d8f5..adf0b4a32 100644
--- a/board/samsung/smdk5250/monitor.S
+++ b/board/samsung/smdk5250/monitor.S
@@ -48,8 +48,18 @@ mon_vectors:
1: mrs lr, elr_hyp
mov pc, lr
-/* In monitor mode, set up HVBAR and SCR then return to caller in NS-SVC. */
+ * In monitor mode, fix errata, set up HVBAR and SCR then return to caller in
+ * NS-SVC.
+ */
+ /* Fix up Exynos5250 errata */
+ mrc p15, 0, r1, c1, c0, 1
+ orr r1, r1, #(1 &lt;&lt; 1) @ 773022
+ orr r1, r1, #(1 &lt;&lt; 25) @ 774769
+ mcr p15, 0, r1, c1, c0, 1
+ isb
mrc p15, 0, r1, c1, c1, 0 @ SCR
* Set SCR.NS=1 (needed for setting HVBAR and also returning to NS state)