Thread (5 messages) 5 messages, 4 authors, 2014-10-31
STALE4258d REVIEWED: 1 (0M)

[PATCH] ARM: decompressor: ensure I-side picks up relocated code

From: Julien Grall <hidden>
Date: 2014-10-30 23:09:16

Hi Will,

On 30/10/2014 16:54, Will Deacon wrote:
To speed up decompression, the decompressor sets up a flat, cacheable
mapping of memory. However, when there is insufficient space to hold
the page tables for this mapping, we don't bother to enable the caches
and subsequently skip all the cache maintenance hooks.

Skipping the cache maintenance before jumping to the relocated code
allows the processor to predict the branch and populate the I-cache
with stale data before the relocation loop has completed (since a
bootloader may have SCTLR.I set, which permits normal, cacheable
instruction fetches regardless of SCTLR.M).

This patch moves the cache maintenance check into the maintenance
routines themselves, allowing the v6/v7 versions to invalidate the
I-cache regardless of the MMU state.

Cc: Julien Grall <redacted>
Signed-off-by: Will Deacon <redacted>
---

This fixes boot on my TC2 w/ multi_v7_defconfig. Julien was also
reporting decompressor failures with a Xen payload, so hopefully this
helps him too. If so, this is probably a candidate for stable.
With this patch, I'm able to boot a multi_v7_defconfig guest on Xen.
It might also fix some issue that Christoffer Dall saw on KVM.

Tested-by: Julien Grall <redacted>

Regards,

-- 
Julien Grall
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help