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@xxxxxxx> --- Keep in mind that this code runs inside of the SPL blob that falls out of a u-boot build. So if anyone is working on a Chromebook u-boot that runs as second or third stage u-boot, this is going to bite him here as well, but the fix would look different. This patch is based on git://git.linaro.org/people/ronynandy/u-boot-arndale.git lue_arndale_13.1 --- board/samsung/smdk5250/monitor.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/board/samsung/smdk5250/monitor.S b/board/samsung/smdk5250/monitor.S index 8bc21d8..efa878a 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. + */ 2: + /* Fix up Exynos5250 errata */ + mrc p15, 0, r1, c1, c0, 1 + orr r1, r1, #(1 << 1) @ 773022 + orr r1, r1, #(1 << 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) -- 1.7.10.4 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm