From patchwork Thu Feb 20 16:21:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 866778 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f85:b0:38f:210b:807b with SMTP id hj5csp291920wrb; Thu, 20 Feb 2025 08:26:32 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVZwu7artjBF1S0AeEI/c8gMOsdzb0j61D6uyvDFLBOpG2IzTPeaVKp1IzbP5ZC+puC1O5Nkw==@linaro.org X-Google-Smtp-Source: AGHT+IHCWnXtzR7Jq928y7/e6Apq/Uywdx30BXi+ox4uFR2hvzs5lE7hb99UtX9S9ic5F/S3IN+h X-Received: by 2002:a05:6214:246b:b0:6e6:5f0b:94bc with SMTP id 6a1803df08f44-6e66cc8c405mr282792606d6.11.1740068792713; Thu, 20 Feb 2025 08:26:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740068792; cv=none; d=google.com; s=arc-20240605; b=QeQc3SZZI/fcrv5SxSzFDXarQHMQOvsIIkrFwNhs9KnXVl7Q+LCqz2eUNL9kBtiyhe qmWvLfV2Wn2tmWXe8qRruf4pp6dBVp3fPikxSouIn7O/JNx/mOIzYuLDfmJ85MotQ2Ie 2jDcrLCg00RSpJ8zLxNf8rdw32diN6SP/r2qrlUPh6aVxSDrXnNiB+OtVtksMZZoo9YV ZZHRKpzVSjCSdALzZ0EkkMng0B7uA5gJMA+UQRoNOlZj4jI3/GGa1l4EYJLa061MyM9G 8MJaXl1usRBuHseqpCKCD0gqT6c7klQdl8sbgX8oKOOfrLSvq844wmCiG2oGvzhqqE+j TtBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=2xzlx3968bfdrpUp2Jk8ctNVyMvRf/G0SSZ1PJAAEec=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=KYxvnB5jls/EMa4VEhopQKSUNfGolZEzkw3J4yOUr7yJge11l+0/FYSkGqX9nrt6hT P7C9L2aV+3pNELPOV/LZfumjTGPpLvN/tz9lpi3L7HUDrDg2ZNf4ObYlf9FS8a5LzW/Q kOpaHgpJwrsYm8zC++WCaWLoFUlgJBhkRPS0BUtgeT8LPMvC2h5CwOOfFcJvdJ5Nmus9 sVPzsP25okMcYOfFVL8ta7m6XoJIr/EcK5XZzZc2w1Mxb58djk5bt/pWetw5jwBAbEaw Oux4WUYmdNb7OcSnl7nJeCHsWQOTSKhWE4Nq3JazzHGgKBZ/OHNeNGKNo4a4GSG5msUn sK1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PP0EEca3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-471ea196391si89509361cf.199.2025.02.20.08.26.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Feb 2025 08:26:32 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PP0EEca3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tl9JD-000748-5q; Thu, 20 Feb 2025 11:21:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tl9JB-00070i-0R for qemu-devel@nongnu.org; Thu, 20 Feb 2025 11:21:53 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tl9J9-0008Do-9g for qemu-devel@nongnu.org; Thu, 20 Feb 2025 11:21:52 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-439a1e8ba83so11053335e9.3 for ; Thu, 20 Feb 2025 08:21:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740068510; x=1740673310; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2xzlx3968bfdrpUp2Jk8ctNVyMvRf/G0SSZ1PJAAEec=; b=PP0EEca3MtJMh7jJhT8V0T9Wp27rwr8f8gpE4EOAYwCjpejPZC0apXcUxNckm4kdQY jwDPf0Yuv8G5pg9qPY6NKcTXwuZziJoafopSm1WvC2dHl7HgSXF3enIX/xx4BNmYKwiE wNs1ScAgfjfbuCbPcdqq+A7eMjzHZ4YJr8uICJVybxbcRJOyT0yW5DKLY31UDscL2CCv CQT8r+rAgHBsBTGy7qtg8RCIJFWnGoTPiKwXmuRPVBBPpO+FfbtmkTAhcIMHeHgDtwc1 7YR+gkBUbIu2gac/4FUaJMWMbLX1tzvtrQx1T83ey0h3QCUrORdzNIr2fhuNzr34piF5 1FPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740068510; x=1740673310; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2xzlx3968bfdrpUp2Jk8ctNVyMvRf/G0SSZ1PJAAEec=; b=FOo/+0O+vBt8yU6Xu27lhhK7w79zy5ytPSx5liGVjmPGteRqsA4akkdgVLoFA+pkV2 L70VfeCKJHFP/bgHT3QtzRxpEMQwj8LUozyFWeRNHMdalpAICfpq3T7k5+37Tk7IhGkn 5yF4Lz+dxXU661Xqg28tR589bFd8q1yEK81ShlWmEr44BI8h2oa2xNtJy2Hrh5b91umf 7Et5/PTTpt17lPV7w859U6UseB6TZCBRrSI8tKpy6eMvrRHqqkaTHMcU7AaaMTHQXuT3 Ov5u/8JETo4whJb++uTDKBsbE5fH6w8+K+5R8KNd0tCKj43r7IkMucxbXat+p6dexEyp IS6Q== X-Gm-Message-State: AOJu0Yz3BHYUljT91KfT2TXP8en1h6GTEntHrZjetf1gVAUEIbCqNKbw IPNtmKNEieLV4cDdlYoXqOCYZ16n/XClMqYVGe53vw6ZBYCfJi/SWTVbIazCR3Qd8UQ6TwCkHN/ H X-Gm-Gg: ASbGncuv4B/7nOFD2DULJlaG611NjjutJFhTtP1LPeB5STjvWVMI6yD+pER5oWh94Su o+G91o8PVVs2SSETyZA+dbDWKvGbv31dfUW0DKUdaS10NRPRZn4iaF+u3pIr3c2iwUqFM1k3EZn 2UlooL6xuHMSRuy02N5CAImM1MuDMyfeohY++IVKZWNwgYZ0v7UcsGtLlYjRYObYj2uSCeTFBMi ngb5SUmVrEE/W6d6Gv2En9QhV1oOvah3LxAT3d8oDN60anFeAW+CCTnJdTRy2OnlS37QW4EcSfL Yjj8PS4F7nRMpmpTL5MHQQ== X-Received: by 2002:a05:600c:1e11:b0:439:86fb:7326 with SMTP id 5b1f17b1804b1-43986fb7498mr141178345e9.22.1740068509560; Thu, 20 Feb 2025 08:21:49 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4399d55fc1asm48806415e9.35.2025.02.20.08.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2025 08:21:48 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/41] hw/arm/xilinx_zynq: Specify explicitly the GIC has 64 external IRQs Date: Thu, 20 Feb 2025 16:21:00 +0000 Message-ID: <20250220162123.626941-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250220162123.626941-1-peter.maydell@linaro.org> References: <20250220162123.626941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Looking at the Zynq 7000 SoC Technical Reference Manual (UG585 v1.14) on Appendix A: Register Details, the mpcore Interrupt Controller Type Register (ICDICTR) has the IT_Lines_Number field read-only with value 0x2, described as: IT_Lines_Number b00010 = the distributor provides 96 interrupts, 64 external interrupt lines. Add a GIC_EXT_IRQS definition (with a comment) to make the number of GIC external IRQs explicit. Except explicitly setting a property value to its same implicit value, there is no logical change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20250212154333.28644-6-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/arm/xilinx_zynq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 22c0bb17262..b8916665ed6 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -57,6 +57,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(ZynqMachineState, ZYNQ_MACHINE) #define MPCORE_PERIPHBASE 0xF8F00000 #define ZYNQ_BOARD_MIDR 0x413FC090 +#define GIC_EXT_IRQS 64 /* Zynq 7000 SoC */ + static const int dma_irqs[8] = { 46, 47, 48, 49, 72, 73, 74, 75 }; @@ -205,7 +207,7 @@ static void zynq_init(MachineState *machine) MemoryRegion *ocm_ram = g_new(MemoryRegion, 1); DeviceState *dev, *slcr; SysBusDevice *busdev; - qemu_irq pic[64]; + qemu_irq pic[GIC_EXT_IRQS]; int n; unsigned int smp_cpus = machine->smp.cpus; @@ -261,6 +263,7 @@ static void zynq_init(MachineState *machine) dev = qdev_new(TYPE_A9MPCORE_PRIV); qdev_prop_set_uint32(dev, "num-cpu", smp_cpus); + qdev_prop_set_uint32(dev, "num-irq", GIC_EXT_IRQS + GIC_INTERNAL); busdev = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE); @@ -275,7 +278,7 @@ static void zynq_init(MachineState *machine) qdev_get_gpio_in(cpudev, ARM_CPU_FIQ)); } - for (n = 0; n < 64; n++) { + for (n = 0; n < GIC_EXT_IRQS; n++) { pic[n] = qdev_get_gpio_in(dev, n); } @@ -458,7 +461,7 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data) }; MachineClass *mc = MACHINE_CLASS(oc); ObjectProperty *prop; - mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9"; + mc->desc = "Xilinx Zynq 7000 Platform Baseboard for Cortex-A9"; mc->init = zynq_init; mc->max_cpus = ZYNQ_MAX_CPUS; mc->ignore_memory_transaction_failures = true;