Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-04-08 Thread Ard Biesheuvel
On Mon, 8 Apr 2019 at 11:20, Vladimir Murzin wrote: > > On 4/7/19 7:19 PM, Ard Biesheuvel wrote: > > Actually, the CP15 ISB is not usable here, and using the v7 ISB breaks > > v6. Would reading back SCTLR suffice? > > > I think instr_sync macro should do the trick. > This code should run on v7

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-04-08 Thread Vladimir Murzin
On 4/7/19 7:19 PM, Ard Biesheuvel wrote: > Actually, the CP15 ISB is not usable here, and using the v7 ISB breaks > v6. Would reading back SCTLR suffice? I think instr_sync macro should do the trick. Cheers Vladimir

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-04-08 Thread Marc Zyngier
On 07/04/2019 19:19, Ard Biesheuvel wrote: > On Sun, 31 Mar 2019 at 10:47, Marc Zyngier wrote: >> >> On Sat, 30 Mar 2019 13:10:58 +, >> Ard Biesheuvel wrote: >>> >>> On Sat, 30 Mar 2019 at 10:50, Marc Zyngier wrote: Hi Ard, On Fri, 29 Mar 2019 18:24:18 +, Ard

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-04-07 Thread Ard Biesheuvel
On Sun, 31 Mar 2019 at 10:47, Marc Zyngier wrote: > > On Sat, 30 Mar 2019 13:10:58 +, > Ard Biesheuvel wrote: > > > > On Sat, 30 Mar 2019 at 10:50, Marc Zyngier wrote: > > > > > > Hi Ard, > > > > > > On Fri, 29 Mar 2019 18:24:18 +, > > > Ard Biesheuvel wrote: > > > > > > > > The EFI

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-03-31 Thread Marc Zyngier
On Sat, 30 Mar 2019 13:10:58 +, Ard Biesheuvel wrote: > > On Sat, 30 Mar 2019 at 10:50, Marc Zyngier wrote: > > > > Hi Ard, > > > > On Fri, 29 Mar 2019 18:24:18 +, > > Ard Biesheuvel wrote: > > > > > > The EFI stub is entered with the caches and MMU enabled by the > > > firmware, and

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-03-30 Thread Ard Biesheuvel
On Sat, 30 Mar 2019 at 10:50, Marc Zyngier wrote: > > Hi Ard, > > On Fri, 29 Mar 2019 18:24:18 +, > Ard Biesheuvel wrote: > > > > The EFI stub is entered with the caches and MMU enabled by the > > firmware, and once the stub is ready to hand over to the decompressor, > > we clean and disable

Re: [PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-03-30 Thread Marc Zyngier
Hi Ard, On Fri, 29 Mar 2019 18:24:18 +, Ard Biesheuvel wrote: > > The EFI stub is entered with the caches and MMU enabled by the > firmware, and once the stub is ready to hand over to the decompressor, > we clean and disable the caches. > > The cache clean routines use CP15 barrier

[PATCH] efi/arm: enable CP15 DMB instructions before cleaning the cache

2019-03-29 Thread Ard Biesheuvel
The EFI stub is entered with the caches and MMU enabled by the firmware, and once the stub is ready to hand over to the decompressor, we clean and disable the caches. The cache clean routines use CP15 barrier instructions, which can be disabled via SCTLR. Normally, when using the provided cache