Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11162CD98F2 for ; Thu, 18 Jun 2026 10:47:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1waAH4-00023H-Gr; Thu, 18 Jun 2026 06:47:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1waAH1-00022Y-1G for qemu-arm@nongnu.org; Thu, 18 Jun 2026 06:47:03 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1waAGz-0003by-41 for qemu-arm@nongnu.org; Thu, 18 Jun 2026 06:47:02 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-460662fcb4eso576776f8f.0 for ; Thu, 18 Jun 2026 03:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781779619; x=1782384419; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bZ7SsVycbgZTnv8WK7JZ8rNkpuaFgDuXf7rpEI1F1Qc=; b=oWhdRgfVk89mgt3QElpWZ5hFw+2bD/I+wWjtMgqYNTpo1TfGVuV96FK+sI3XoTaDng fBkpEW+8fD+DuEBqII2TE5raY0a9l06DuCnZAVEXz6gWwZANNxehoADm+LG6mValY5Bo RfIRY8Q9DOdGhiGBG+bHBFucAoYOcr21MOUM/zopju4j015viKqtC8YJPBYaCS6rHLDI 2vvxKEUD2t/jTEyCkz79LGNMd5DH8ZzDaTRcncGk03XxqgLrrpZyKOqEWGOuP0ydgYef N4W+UFVWZ+lppjf+AYHXBj/YHIG/YimKSUuO3cIqGWjcLlghQtcaPBN9VhgdYFUiuQI9 AeTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781779619; x=1782384419; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bZ7SsVycbgZTnv8WK7JZ8rNkpuaFgDuXf7rpEI1F1Qc=; b=IERef2CXr5NRg5LCaSDUfXDNd09JTkS2Tb4c3eBiWCDIPu4itVMkypKfYRco7CVMbu XvH//gEPSa8WSOCNB5eNyHEV1AyJrMK+FUfCXFqyRHAPW8rjhMxOteAVVkveZdfs+kiT 4H14sikdlFAFilvdmSqLb3ZSYF6amhlI9/IO9bIIlY2SX8QDNpzfckhj/5xaK970mIlB Z5YkdOeYOjR2BuDub6ahZeER1dSKzEW1oQ/iu5h1Eb00MhJlxwEVVzQv2UZwIqxjeVY1 zayHb9WlwRO8Ete53WumG6Wx21O0QdRQlSaSgbIkNJG97TnqKskkA9dldEPZ+cDrQjbh myQg== X-Forwarded-Encrypted: i=1; AFNElJ9m3m2qdNhCEE4IHiumf8lZ0j8U9OVoGO959wTD1qYMLBB3/j2IpohSO+vdLqnPwxHhfTubz8lDtg==@nongnu.org X-Gm-Message-State: AOJu0Yyr9T9ZbwOwh0cZzymrA6GZ1F0IXo0WovsZT3KHYH5I1+uoTmqv S5rZ1gELxlA4gJXp7Z0I60PRqsd5CAgQk0xJZppoLMV7mseeo4lrhCrjKhds+QvlKYY= X-Gm-Gg: AfdE7cnXWpa10kOmTGeSufxFtgmX/jjRgUMsPhG5TBBbSbNt7qo7ns1liiiioyvhI+s +Wa6RP+jv7lXKgp/vhHVjhBd7ArrbetoPKECIFofiXjtEVmddp4eWUyFKEkFw7la9HLbP886db8 1RrPinCo1FUOfrZGOc1NQ8ziGUHB33NSMglKewkrQWnrhBSgGbMD7o6dRbS8NhppDfYh0BUOPJU bUbK9032ea1tl7dYrpuayXUuozHDjsmfakAGEwHTd9sCoEiZScGDMH2QLv53c4M6d2Ez2oG0wDt XLMIoEmoClmadGCZdtm4ohEuoqbWAFhDMWZ0efsBnVgc23ClYQzkxMtuY9Ne21/JzH8qNKQbqr1 oGnCbAnuNoRb9C6r1BeL2DwLCeR+spnKeIHf4Qd50gHRomJLg2HHoF0rTIQW1nCVXS76GRr/t7Z 3QUgnNcHoStkWF X-Received: by 2002:a05:6000:4285:b0:462:38d:c433 with SMTP id ffacd0b85a97d-462362764e9mr12666998f8f.12.1781779619194; Thu, 18 Jun 2026 03:46:59 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2c5266sm67885608f8f.29.2026.06.18.03.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 03:46:58 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 410295F905; Thu, 18 Jun 2026 11:46:57 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Arnd Bergmann , Tyrone Ting , Hao Wu , Peter Maydell , qemu-arm@nongnu.org (open list:Nuvoton NPCM7xx) Subject: [PATCH v2] hw/arm: use cortex-a9 mpcore base for CBAR on npcm7xx machines Date: Thu, 18 Jun 2026 11:46:54 +0100 Message-ID: <20260618104654.3840263-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org 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 Signed-off-by: Alex Bennée Suggested-by: Arnd Bergmann --- v2 - rewrote commit message for clarity, added links - used arnd's arndb.de address --- hw/arm/npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c index c2bbcd89dbc..c27f149c04a 100644 --- a/hw/arm/npcm7xx.c +++ b/hw/arm/npcm7xx.c @@ -492,7 +492,7 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp) /* CPUs */ for (i = 0; i < nc->num_cpus; i++) { object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar", - NPCM7XX_GIC_CPU_IF_ADDR, &error_abort); + NPCM7XX_CPUP_BA, &error_abort); object_property_set_bool(OBJECT(&s->cpu[i]), "reset-hivecs", true, &error_abort); -- 2.47.3