grub/grub-core/kern/arm
Marc Zyngier 6a34fdb76a arm: Fix 32-bit ARM handling of the CTR register
When booting on an ARMv8 core that implements either CTR.IDC or CTR.DIC
(indicating that some of the cache maintenance operations can be
removed when dealing with I/D-cache coherency, GRUB dies with a
"Unsupported cache type 0x........" message.

This is pretty likely to happen when running in a virtual machine
hosted on an arm64 machine (I've triggered it on a system built around
a bunch of Cortex-A55 cores, which implements CTR.IDC).

It turns out that the way GRUB deals with the CTR register is a bit
harsh for anything from ARMv7 onwards. The layout of the register is
backward compatible, meaning that nothing that gets added is allowed to
break earlier behaviour. In this case, ignoring IDC is completely fine,
and only results in unnecessary cache maintenance.

We can thus avoid being paranoid, and align the 32bit behaviour with
its 64bit equivalent.

This patch has the added benefit that it gets rid of a (gnu-specific)
case range too.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-05-25 15:02:51 +02:00
..
coreboot Missing parts of previous commit 2017-05-09 09:02:15 +02:00
efi arm: Delete unused efi support from loader/arm 2018-07-25 14:18:11 +02:00
uboot Refactor arm-uboot code to make it genereic. 2017-05-08 17:47:57 +02:00
cache.c arm: Fix 32-bit ARM handling of the CTR register 2020-05-25 15:02:51 +02:00
cache.S Fix ARM cache maintainance. 2013-12-23 04:27:53 +01:00
cache_armv6.S * grub-core/kern/arm/cache_armv6.S: Remove .arch directive. 2013-12-25 23:31:42 +01:00
cache_armv7.S arm_coreboot: Support DMA. 2017-05-08 22:06:04 +02:00
compiler-rt.S Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
dl.c Fix thumb compilation with clang. 2017-02-02 00:59:49 +01:00
dl_helper.c dl_helper: Cleanup 2015-03-27 14:37:16 +01:00
startup.S arm-coreboot: Start new port. 2017-05-08 20:53:28 +02:00