@samitouri / QOSamiQemu / commits / 62b425bec3

hw/arm: use cortex-a9 mpcore base for CBAR on npcm7xx machines

CBAR is an IMPDEF register and according to the A9 TRM [1]: In Cortex-A9 MPCore implementations, the base address is reset to PERIPHBASE[31:13] so that software can determine the location of the private memory region [2]. If it doesn't we will confuse the Linux kernel as it probes the system SCU registers [3] and erroneously assumes the system is a buggy Aegis SOC and nerf the emission of SEV instructions, deadlocking any WFE's in the kernel (or QEMU smpboot code). [1] https://developer.arm.com/documentation/ddi0388/i/system-control/register-descriptions/configuration-base-address-register [2] https://developer.arm.com/documentation/ddi0407/g/Introduction/Private-Memory-Region [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/kernel/head.S?h=v7.1#n550 Fixes: 2d8f048c25ab ("hw/arm: Add NPCM730 and NPCM750 SoC models") Cc: qemu-stable@nongnu.org Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-id: 20260624103049.884930-2-alex.bennee@linaro.org Suggested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Alex Bennée committed Jun 24, 2026 at 11:30 UTC 62b425bec3d52a326781025d1c51eb4d65ece49e
1 file changed +1 -1
hw/arm/npcm7xx.c
+1 -1
@@ -492,7 +492,7 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
492 /* CPUs */
493 for (i = 0; i < nc->num_cpus; i++) {
494 object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar",
495 - NPCM7XX_GIC_CPU_IF_ADDR, &error_abort);
495 + NPCM7XX_CPUP_BA, &error_abort);
496 object_property_set_bool(OBJECT(&s->cpu[i]), "reset-hivecs", true,
497 &error_abort);
498