From patchwork Fri Jan 10 16:02:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 856264 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp304058wrc; Fri, 10 Jan 2025 08:06:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXx8uCEJrKef44MrOBN1z2YCrjTt3W8XWAK0VaVfccmdSuVq3GL/mpjZXJ1NCfCxtKZjXyyIg==@linaro.org X-Google-Smtp-Source: AGHT+IFUzqh82KOPcypqDfmMlWgYhAtKhZpKCBa3OQ3jp6inHSEtlXbrEh81RL7+8/thya3uONMf X-Received: by 2002:ac8:5903:0:b0:466:77d0:5941 with SMTP id d75a77b69052e-46c70fd484dmr165001051cf.10.1736525185969; Fri, 10 Jan 2025 08:06:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736525185; cv=none; d=google.com; s=arc-20240605; b=jL1BCNiDgQGiL6OdImShq1fLCtCu++cQGHe4yvJ2SWQHx1OxncQBjSgXnzr5BoXVRV /w79a3PEr4nesedIRDLauM11PM76k21DGT16C4DX8mPTUr6o745uc5j6kSYyj979Eic2 ogrVbQjLs0HGCHgbycitAN+RWKTNJUJYe41D8r3i9EYuCXbQWLBQSotcpKEt9GhoZQ6D jG77siGLcUKkkrIt1wC86kET/GRg9nF2Wy+3PRsd1kO5gLy7Ow/Cpk+ff2luDQ//LCzJ ux0BX1Bq0N2JzzcruoL0Kb/5G3nRlNF95NarLeGYwgzBiUlSrJQrj3nQXTW9sxdH6MSU npQw== 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:cc:to :from:dkim-signature; bh=7A9IXq/spVXRimdeXf09n3U9AxOdbCQvvzQ3zUBrjYg=; fh=Uq4CCH4qgIScoA1ZlzK6h1LD8Rw6xac8JtYTs6G5zlc=; b=cHu7IZjxSXLj7E+sHizDEHo6ZGYRwIFiYeCsL++bYGSwslwK8c0+fmfDpPCO5t/+aJ +Oz2STLkLteNT1j+WRbST+zH433oRvBmiZf3ONqFqKL0zEYvwx3QHMk4d6oj5/rwjWZR dQcI23n7iKy6DJqi+cx8WHzZNOw2jDslMmmQFvFfcMDPs1qzGIGwDerQo6x1IkRjDJtG CY7HstDdYrT92hC5k1s06Dj33JbymOe9aPuRok1Dv4dCUkKHEJWtijptTGKRmWzKrhub ffFDn14UI7NmRtZ0x1fMjRMAY+neVH+Ag6vBvDdVtBbUuciZB4GJv1ExpZZqjE10rNJf w5Sw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NrvxBTpI; 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-46c873e4c07si23978111cf.241.2025.01.10.08.06.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jan 2025 08:06:25 -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=NrvxBTpI; 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 1tWHTr-0007m1-UI; Fri, 10 Jan 2025 11:03:27 -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 1tWHTG-0007LR-VV for qemu-devel@nongnu.org; Fri, 10 Jan 2025 11:02:52 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWHTC-0004J7-5q for qemu-devel@nongnu.org; Fri, 10 Jan 2025 11:02:48 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-436202dd730so16589995e9.2 for ; Fri, 10 Jan 2025 08:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736524963; x=1737129763; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7A9IXq/spVXRimdeXf09n3U9AxOdbCQvvzQ3zUBrjYg=; b=NrvxBTpIYecmEp+OC5FxLT1oIMagjrbHBH9hjuUQoSnMyW70GfOJKuzw/R2UmwU07k YJ2p+V8e/rFsWNrB+sQuY0jje090jnkByFJw9+0KxTBUwpYQk5bZPS61N8t9UKoYfRKk FQ9reIGvN6z4BxgOQALGFxu2h5Hft9w2kQyGhYRZJgJoMcnRJklvsxdHH3zx/Zu9uxMY up2d8MHXVABEtfJeM4m54nbRDyZNcVN2dJqfWCcLXJaYqLLLUnjySE+4vPuUDn7+OSKz gBastfbd2YV+7vBCj1EEk2H6UZuRpa8Sl2CiT4VvVhdG9HHPkUtBmhfYNrKYGHW+F9Rr uiGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736524963; x=1737129763; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7A9IXq/spVXRimdeXf09n3U9AxOdbCQvvzQ3zUBrjYg=; b=krsPARw093K5AvT1CPGcpzjjbiOpNJI493clO4oGGu9lsJNnVQeBBtXwSBgtf82fog kqPFGdB8ab0UiNIs2jdm+1OJfpfvLKUr8Z8i+QGdde7wHScThOh0eAYfWAw7cy9UIKzd YWQR+nzw1pkIXdm1Qwvkzm4LQHiLKxr0l+EtQdaqvAHbwSv7kWdUBY/3sk/c5lvtywrA 38iWzFhJXQDW5uq72i+3QjyX2KYZ4PnHhjHrnrTYmQ5jCkgFOImL1PDV3YOUW5h6tC4/ hbDLzpp5RpMedZDAaPzTjzvprv7pwBZkkzd3RcaEKkKTNbMufC4zeW6uO2V2bo0uoDUc ODxA== X-Gm-Message-State: AOJu0YxcQxZUZYC3HvqU7d7Se4k1tLdMqZkvon6Kope2LpOeJB8A8OxE fJrQ0O6kDytTcfdyJx4Kr2TCm1fQW8QFs7eEk3PNelWj/VU8Kq3G1GfApLrhgwetpiFaxbv8MXt TP2Q= X-Gm-Gg: ASbGncv2g964JwyCm/gsYs875F2jI3pURaGDsRsyV51ssNu2exxvqpqFmRNVJNaPJGF wuBKwTAlaRdHKmnxlvM353DxMpbHgfnztaYf9Pgmyi4is3s/wuNXFUFJmqvATc3J/ZIBR82Ocq8 ZuNkN7mAzKqRhXEPlmPks+C8no1TNSO+cwz2hsVu6YrCYD+6yIisHjrQqff7jy976hQkbzF/WCC qFZ/61RU1VdDSN2G/otjwIcI7l6UsFG2lKi5e/m/SGh2FX2pTQZVQVVGyIGh59Y7H1Qy0nylqRV Me/ipwJY+vKbwC5s4ciuSpg6fy2PIno= X-Received: by 2002:a05:6000:4714:b0:374:c4e2:3ca7 with SMTP id ffacd0b85a97d-38a872f673cmr10174513f8f.5.1736524962661; Fri, 10 Jan 2025 08:02:42 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38397csm4794123f8f.24.2025.01.10.08.02.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Jan 2025 08:02:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 8/9] hw/arm/stellaris: Only map existing devices as unimplemented Date: Fri, 10 Jan 2025 17:02:03 +0100 Message-ID: <20250110160204.74997-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250110160204.74997-1-philmd@linaro.org> References: <20250110160204.74997-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index d87587225c2..c89522332e2 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1390,11 +1390,21 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) /* Add dummy regions for the devices we don't implement yet, * so guest accesses don't cause unlogged crashes. */ - create_unimplemented_device("PWM", 0x40028000, 0x1000); - create_unimplemented_device("QEI-0", 0x4002c000, 0x1000); - create_unimplemented_device("QEI-1", 0x4002d000, 0x1000); - create_unimplemented_device("analogue-comparator", 0x4003c000, 0x1000); - create_unimplemented_device("hibernation", 0x400fc000, 0x1000); + if (DEV_CAP(1, PWM)) { + create_unimplemented_device("PWM", 0x40028000, 0x1000); + } + if (DEV_CAP(2, QEI(0))) { + create_unimplemented_device("QEI-0", 0x4002c000, 0x1000); + } + if (DEV_CAP(2, QEI(0))) { + create_unimplemented_device("QEI-1", 0x4002d000, 0x1000); + } + if (DEV_CAP(2, COMP(0))) { + create_unimplemented_device("analogue-comparator", 0x4003c000, 0x1000); + } + if (DEV_CAP(1, HIB)) { + create_unimplemented_device("hibernation", 0x400fc000, 0x1000); + } create_unimplemented_device("flash-control", 0x400fd000, 0x1000); armv7m_load_kernel(ARM_CPU(first_cpu), ms->kernel_filename, 0, flash_size);