efi: capsule: clean scatter-gather entries from the D-cache
authorArd Biesheuvel <ardb@kernel.org>
Mon, 7 Dec 2020 17:40:53 +0000 (18:40 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 9 Dec 2020 07:37:27 +0000 (08:37 +0100)
commit4dbe44fb538c59a4adae5abfa9ded2f310250315
treeda4f681ca5b596a899337141cf3cfadc185a98b9
parent91c1c092f27da4164d55ca81e0a483108f8a3235
efi: capsule: clean scatter-gather entries from the D-cache

Scatter-gather lists passed to UpdateCapsule() should be cleaned
from the D-cache to ensure that they are visible to the CPU after a
warm reboot before the MMU is enabled. On ARM and arm64 systems, this
implies a D-cache clean by virtual address to the point of coherency.

However, due to the fact that the firmware itself is not able to map
physical addresses back to virtual addresses when running under the OS,
this must be done by the caller.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/arm/include/asm/efi.h
arch/arm64/include/asm/efi.h
drivers/firmware/efi/capsule.c