From: Ferdinand Schober <[email protected]> The a64fx CPU model wrongfully set GIC bits in the processor feature register (ID_AA64PFR0).
I traced this back to e31c70ac04001df5e540b79843834277e283fa71, where A64FX got added. This bit is supposed to get set conditionally in id_aa64pfr0_read, depending on whether or not a gicv3 is present, from what I can tell. Qemu picks gic-version=2 by default, while v3 gets advertised due to this flag. Recent EDK2 firmware accesses ICC_SRE_EL2 in this case and crashes. Clear the GIC field, as the other CPU models do. Cc: [email protected] Fixes: e31c70ac0400 ("target-arm: Add support for Fujitsu A64FX") Signed-off-by: Ferdinand Schober <[email protected]> Message-id: [email protected] Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Peter Maydell <[email protected]> (cherry picked from commit e7666745773fb6680e46f716335e18dc5102fe32) (Mjt: back-port across v10.0.0-1806-gd1a3cc963454 "arm/cpu: Store aa64pfr0/1 into the idregs array" (SET_IDREG() conversion)) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index 29ab0ac79da..f3f89711960 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -422,7 +422,8 @@ static void aarch64_a64fx_initfn(Object *obj) cpu->revidr = 0x00000000; cpu->ctr = 0x86668006; cpu->reset_sctlr = 0x30000180; - cpu->isar.id_aa64pfr0 = 0x0000000101111111; /* No RAS Extensions */ + /* No RAS Extensions, GIC filled in later */ + cpu->isar.id_aa64pfr0 = 0x0000000100111111; cpu->isar.id_aa64pfr1 = 0x0000000000000000; cpu->isar.id_aa64dfr0 = 0x0000000010305408; cpu->isar.id_aa64dfr1 = 0x0000000000000000; -- 2.47.3
