From patchwork Thu Jun 5 14:18:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 894176 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:430c:b0:3a4:ee3f:8f15 with SMTP id eq12csp372366wrb; Thu, 5 Jun 2025 07:19:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUp+80GQcDWDpnnjTaa1lsl6IokUDEulA89bCCINpYVJLk7zFfogb7lBtUlizzxl3s0aoxVg==@linaro.org X-Google-Smtp-Source: AGHT+IEpvFsb3Ra6lGSNIEXOUlRGvcR9WOvPYbI1qsH20QJuD5uV4FxmqfnhQ90B8lQiW8L0Iux1 X-Received: by 2002:ad4:5fce:0:b0:6fa:c3e4:4251 with SMTP id 6a1803df08f44-6faf6fef99dmr97704956d6.15.1749133176622; Thu, 05 Jun 2025 07:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749133176; cv=none; d=google.com; s=arc-20240605; b=iQtRhrkUskC+L92UsX+bQzdMPHw3w8xHSgmPjeQJNjVGcTNO1YeEqMn+Llcu3N7h3+ 18aMF0gl0ZUjtlYgEbYRiUdb9YAY9Fh/F+ad3EOQ2bMLMeBeu51iQWa4LrJKNhxKKsL2 9oW45bnYxXWjYXX2PYxL3mv9Z/BHK8Ppam1y6AOmeSkSAHa0gSJzR4UiQb0hFU6OI4xH 8qJxjp5OxK5VwzKzF8XCwMTfLcb+9gmYxtnHnGYAVI6ptdsRnKB5ozsyx82jjLLJ6St/ MXheur0dFkcWLIFjj/1byfFFpTRzpRXgGfIfNtLROR5gQS3XQPBOdvdcD8x0NaUh2EEn 46vg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=UzSqdQKz9aJ2vSPHh9ioBp0u/bmrqqTbXn12Ae53pTU=; fh=H9rRhnd9pahDDXHnA80352YZ46NB/WuQ2IFxNm+8me0=; b=RRCzq2MaBHxC/keoU2YOMJBYEFn/RITQ0EQ2DVXPsddLQxtId0uZCPyx+iu91QOduz k/qX1dT8bX2ZcC4EDx1JF3oc5arEzFJgxFLxTmWSfOJz2bh53YnsEBp2EIB9AzrK3+L5 4GfvHKGBOj1nILbT1rCNs6D5hn9JgqnUyMEcjKfVPfYE2EyP4YykSIlPack/FElB4Y5Q fFBvNpESWtNKQbeFznYARV9y7IqyKk/TSpKR9VfLgshCI3SWXQBaHrqvHcnOMbMv+Pc+ BrLrr5eUskOztR5bIKVj8iHZGt9mWg/juTyH+by5+KXtJBrYt77eTZ4UFjkZROikxP5c ZsQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YiAioirb; 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 6a1803df08f44-6fac6dac7c2si171003856d6.40.2025.06.05.07.19.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 07:19:36 -0700 (PDT) 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=YiAioirb; 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 1uNBQ8-0005Hb-P3; Thu, 05 Jun 2025 10:18:16 -0400 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 1uNBQ4-0005Gr-KE for qemu-devel@nongnu.org; Thu, 05 Jun 2025 10:18:13 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNBPy-000188-AS for qemu-devel@nongnu.org; Thu, 05 Jun 2025 10:18:12 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-451d6ade159so8741395e9.1 for ; Thu, 05 Jun 2025 07:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749133084; x=1749737884; 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=UzSqdQKz9aJ2vSPHh9ioBp0u/bmrqqTbXn12Ae53pTU=; b=YiAioirbqDV+UauyiB+5521GHs+QBPL0jFNLJ1gcaFl6/uerwd7u9ORyw55lhzaVNI npywytcgJy2zYe0g4sP9OPHpqV+Du1uMH041Twgb0xs+m9znzu8vCHjkx37ZzzNgQhg7 CmgvVIFGYoDj016Eb7/oLxobtRpkVxaK92TKYQD5tJHDSR0N8pjccEDtn8MFj1gIplRW HajYaSI6Q5zSFPxJHSfp3b1hhnESGWeQ+yUOC5sKM/nbQ1EeXrP00w3tF+6NQ9mIuwZ8 YOQRjC9MNAvjdAD0joHRxeEJir1CE445aNZf30kHXcuSNwvVW2iGqUeiXPZKDhWh1MaJ eoxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749133084; x=1749737884; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UzSqdQKz9aJ2vSPHh9ioBp0u/bmrqqTbXn12Ae53pTU=; b=FwNXXWx0x96l8QZjElzMpf+RBrKsWFeBXyLLfqgVcSDzlDPyKM5UzeTv7DjHRLTl4Q mmy+9hdWt8owS+S/ZlMP7ZVdiFWOM2LnXiXsVZoY64Vm0pfPA95IOxFz7FPsKd/uSaY4 HfJ1/0+AS3OIfla8kkC4WpfsuJiiSHNEqxUW0aTzyrUp6YxOFU8j1qCbxoCTuGRq5IfX frd/y7/vO6aaxb1ddgWaioIfnDPKftwvCEslwE0gGAoPMqnGkknfuO/BQyVhTGkA1gHn 4LE6KllZL1l0YGtpPGiqz6tskMv1VgBFYHS1KooFyVG2y6E1V+iTWV8ibzrMdfaun0gi 4yVQ== X-Forwarded-Encrypted: i=1; AJvYcCVopFOLlB2CCW32pT4PfkVS5g2X5Z9pkFZugTmzwjgLnSo+JvWBBb7Q0WNTZBovpGrlBKgFUmMZkQ37@nongnu.org X-Gm-Message-State: AOJu0Yy+bzUJJjJleXDk/4SyZaLamdO2/uknJnDlM7Zgsu2l2tILWKo4 4bPpUrkRSvYa7s1gkeTGfKwcbK/NpjH5eP0Y7S4LPlCAaNdZI4xRb50uClvH5UxH2i8= X-Gm-Gg: ASbGnctmtXgbbUOe/kPF6C1NUQLZuBmPapj7zKeHG6vXfQarL3KBcNNIH/Rbtu6wyB0 +J0iJl4EMjq1xw/uVvAf5PmtnyJ+dPfJUJsvsUiTaagbA1nSOj4pjDA9XkMiPgdAnzpFoA3JMk2 5k1A3c4e/DT0gaVN+7bX5r+btYZvuaZqJLVNsy0TpacdHrPm2Zd8RfLWiaLaLxCMdSK7ZzDXuIc D6l7aM/DiEtmj9xi+G7qKHWp2FjNSAnho5OKCYOcls4DVHw8U/ER5tXpSKYq/wklU/8CF/ON7Pk IdDqwPG+wf1YZ6szPQlK8bHdqQA5XK546cya1MbzFaxkv13OBdozggKtPQ== X-Received: by 2002:a05:600c:1548:b0:43c:f8fc:f697 with SMTP id 5b1f17b1804b1-451f0a72bf1mr74933005e9.9.1749133083780; Thu, 05 Jun 2025 07:18:03 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-451fb2213c1sm19756095e9.34.2025.06.05.07.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 07:18:02 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Corentin GENDRE Subject: [PATCH] hw/arm/mps2: Configure the AN500 CPU with 16 MPU regions Date: Thu, 5 Jun 2025 15:18:01 +0100 Message-ID: <20250605141801.1083266-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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-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 The AN500 application note documents that it configures the Cortex-M7 CPU to have 16 MPU regions. We weren't doing this in our emulation, so the CPU had only the default 8 MPU regions. Set the mpu-ns-regions property to 16 for this board. This bug doesn't affect any of the other board types we model in this source file, because they all use either the Cortex-M3 or Cortex-M4. Those CPUs do not have an RTL configurable number of MPU regions, and always provide 8 regions if the MPU is built in. Cc: qemu-stable@nongnu.org Reported-by: Corentin GENDRE Signed-off-by: Peter Maydell --- hw/arm/mps2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 58efb41e6db..50e1a1c1c80 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -224,7 +224,11 @@ static void mps2_common_init(MachineState *machine) switch (mmc->fpga_type) { case FPGA_AN385: case FPGA_AN386: + qdev_prop_set_uint32(armv7m, "num-irq", 32); + break; case FPGA_AN500: + /* The AN500 configures its Cortex-M7 with 16 MPU regions */ + qdev_prop_set_uint32(armv7m, "mpu-ns-dregions", 16); qdev_prop_set_uint32(armv7m, "num-irq", 32); break; case FPGA_AN511: