From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066980; cv=none; d=zohomail.com; s=zohoarc; b=h4r/nnpGIPJGmMDMlH6hvefvdt+mcEDQnzkQfaOyqdL3u2gwt2s1feba5O7a4koY6DlPTB5IKnMes8oMLkyg6abKHjOKv1phWSlYSSM4AeEFVjW1yq3kQDZtLHScXm81wRK32FPvZtms1K5hVD0w7zNgK9JrPAjlx+nSxx3b1/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066980; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GpVJAmlJwramNm3qfiT4Q7sCEUthF+ooqYIvVl17HUA=; b=A1h5vZg73bpQawHjRvmAuVh8pzu6nkI1WzoBHA0iCK28QYIv20AHVRl4Br4v1nBwi4X2WigMMxi4THts3kChmLjofFcLetmBSq2UcWtjYmkJ7AITeRyVSdJrYI+l69BxPL+hyGGGZR7OJoWeHUSTQwVAsAJubjNV2J2Nwfx6azA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066980095314.37115440354046; Thu, 15 Oct 2026 05:23:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTG-0004oe-N8; Thu, 15 Oct 2026 08:22:07 -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 1xHKTD-0004j1-Ry for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTC-0005Wb-4r for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:03 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-xxRPv0g5OwaSdwUKZRzb8g-1; Thu, 15 Oct 2026 12:21:58 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E4C2D19560B8; Thu, 15 Oct 2026 12:21:56 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 05EF77D5; Thu, 15 Oct 2026 12:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GpVJAmlJwramNm3qfiT4Q7sCEUthF+ooqYIvVl17HUA=; b=Bn9Et028oZO/bHMv4UpjkL1/uU8FgB8FUTQPPzqTvPO24eWzIECp14HJLQ5y1NYYHUT+D2 8tZri9qHqib4sxahNwpAdNQz1eXSVjlfX2OWVOKpIc3EfEZirDSZSmuD73v34ytkkyBTnn oN+Ft7u84fCD/1MB3wVRknXUr6rKSRM= X-MC-Unique: xxRPv0g5OwaSdwUKZRzb8g-1 X-Mimecast-MFC-AGG-ID: xxRPv0g5OwaSdwUKZRzb8g_1792066917 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Christopher Boker , Jamin Lin Subject: [PULL 01/21] hw/misc/aspeed_hace: Fix OOB read in has_padding() Date: Thu, 15 Oct 2026 14:21:31 +0200 Message-ID: <20261015122151.889017-2-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066982053158500 When total_msg_len equals total_req_len, padding_size is 0, making pad_offset equal to req_len. The subsequent padding[pad_offset] read accesses one byte past the buffer. Return false early when padding_size is zero. Fixes: 5cd7d8564a8b ("aspeed/hace: Support AST2600 HACE") Reported-by: Christopher Boker Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260908053101.1149625-1-clg@redha= t.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_hace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index 8de05a9d98b3..bf8af710335d 100644 --- a/hw/misc/aspeed_hace.c +++ b/hw/misc/aspeed_hace.c @@ -225,7 +225,7 @@ static bool has_padding(AspeedHACEState *s, struct iove= c *iov, uint32_t padding_size =3D s->total_req_len - *total_msg_len; uint8_t *padding =3D iov->iov_base; =20 - if (padding_size > req_len) { + if (padding_size =3D=3D 0 || padding_size > req_len) { return false; } =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066982; cv=none; d=zohomail.com; s=zohoarc; b=ZPCs8htzRaVX1S2gaGzTU8ipJZT9uUeW4hJBN6ZP6TIdVLx0ovuromUwljvKn4W/AScSy8K5y16ZwvJWWiYl6lyeYyUENYl2No/JllYa+j2UTqDTW/XwWDHa611AfU/WMGyi98YcXZ4jt6U6O0RQSo5mKhvDKDlGUm8BBiWRpgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066982; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CkRVfEpXYMnyfG9yh5h4tsLjoXXIzPwfDpnhTe/js40=; b=db73ltdI3zDmQPo1O4BphW7TeDJyxkRmp1ZIP8yRfOk8fWIt36cKaKE5+BANoI/SMyRcmHwTkGPng/JEB/eXHbE31+BXwU148E90cITHZNuM2yyZas8QXjASuIDj5hRVtWuAHb6d4E5K8aV+GRkKH7H/O5ndIWyDTehSU6XqblA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066982846899.4539851561752; Thu, 15 Oct 2026 05:23:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTK-0004y6-Lo; Thu, 15 Oct 2026 08:22:10 -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 1xHKTI-0004sC-G0 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTG-0005Xt-PQ for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:08 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-252-tR66jFoRPXqP7sAsRkSNSQ-1; Thu, 15 Oct 2026 12:22:00 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4E0D71956072; Thu, 15 Oct 2026 12:21:59 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5BB8A7D5; Thu, 15 Oct 2026 12:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CkRVfEpXYMnyfG9yh5h4tsLjoXXIzPwfDpnhTe/js40=; b=dTgYsEmOFUPFbmQUH+SlIPVRzjLs2F9onjxUVZBdtsYjVshnAm0slJ/HENSW0DOgw36IJM e0kAXkqvWgXinY8OaqEDoQAbJzvGJsntawViGXDBpUSrZ7qNIfKOqhNeGJxE2Q14Kk/c4m B+otPZRTLBHqRVFsQUt7TMrXFBFAiKE= X-MC-Unique: tR66jFoRPXqP7sAsRkSNSQ-1 X-Mimecast-MFC-AGG-ID: tR66jFoRPXqP7sAsRkSNSQ_1792066919 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 02/21] tests/qtest/aspeed-acry: Allocate SRAM buffers on the heap Date: Thu, 15 Oct 2026 14:21:32 +0200 Message-ID: <20261015122151.889017-3-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066984100158500 From: Jamin Lin The ACRY RSA qtest allocates two ACRY_SRAM_SIZE buffers on the stack. Since each buffer is nearly 9 KiB, this unnecessarily increases the stack usage of test_modexp_rsa() and may cause unexpected failures on environments with a limited stack size. This reduces the stack usage while preserving the existing test behavior. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260910012422.4065857-1-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- tests/qtest/aspeed-acry-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/aspeed-acry-test.c b/tests/qtest/aspeed-acry-test.c index ec348c220664..51048d697cf6 100644 --- a/tests/qtest/aspeed-acry-test.c +++ b/tests/qtest/aspeed-acry-test.c @@ -327,8 +327,8 @@ static void test_modexp_rsa(const void *opaque) .alg =3D QCRYPTO_AK_CIPHER_ALGO_RSA, .u.rsa.padding_alg =3D QCRYPTO_RSA_PADDING_ALGO_RAW, }; - uint8_t dram_buf[ACRY_SRAM_SIZE] =3D { 0 }; - uint8_t sram_buf[ACRY_SRAM_SIZE] =3D { 0 }; + g_autofree uint8_t *dram_buf =3D g_malloc0(ACRY_SRAM_SIZE); + g_autofree uint8_t *sram_buf =3D g_malloc0(ACRY_SRAM_SIZE); uint8_t result[ACRY_MAX_BYTES] =3D { 0 }; QTestState *qts; =20 @@ -345,7 +345,7 @@ static void test_modexp_rsa(const void *opaque) put_bignum_be_bytes(dram_buf, ACRY_MOD_OFFSET, t->n, t->n_len); put_bignum_be_bytes(dram_buf, ACRY_DATA_OFFSET, t->m, t->m_len); =20 - qtest_memwrite(qts, c->dram_addr, dram_buf, sizeof(dram_buf)); + qtest_memwrite(qts, c->dram_addr, dram_buf, ACRY_SRAM_SIZE); =20 qtest_writel(qts, c->acry_addr + ACRY_DMA_CMD, ACRY_DMA_CMD_DMEM_AHB); qtest_writel(qts, c->acry_addr + ACRY_DMA_SRC, c->dram_addr); @@ -362,7 +362,7 @@ static void test_modexp_rsa(const void *opaque) g_assert_cmphex(qtest_readl(qts, c->acry_addr + ACRY_STATUS), =3D=3D, ACRY_STATUS_RSA_DONE); =20 - qtest_memread(qts, c->sram_addr, sram_buf, sizeof(sram_buf)); + qtest_memread(qts, c->sram_addr, sram_buf, ACRY_SRAM_SIZE); get_bignum_be_bytes(sram_buf, ACRY_DATA_OFFSET, result, t->c_len); g_assert_cmpmem(result, t->c_len, t->c, t->c_len); =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066976; cv=none; d=zohomail.com; s=zohoarc; b=f5uEBZwAQE4jZmDyjUHBnhvy+NExhEtoN/y6MB6L85UlfgpaWU3tOXVIm4rMhPCshLTieRLHLc44+AwX4Ohz55PW23KtMpCQOkOb5I/ro68uJ9k/Drtb5zE3WWAxphPZ7fDfY0zi7oboR6XV7bX/6+GcVvpuZW5DlXCGGTqTbsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066976; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ftEMjTCPBHxRYxwUjhjRcVDB9wdmRD/+znyo8qNYU4s=; b=GmGw8AOpxw+72f5JcpSfxW1bgRb60uxlEWuKIdKVB+9Kdgalr5g1YPtY6CENRG9wayeV89aYTUmRQBJRSQH1t1le07H2hoW7yOi21OUM3gxRbCt7JHvHZ0vxteKSVCpZLHXXwl+0OidKlwKnjv4Rj+4tVnob1OXAyOv2Ggdwphc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066976388672.5240422441399; Thu, 15 Oct 2026 05:22:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTL-00050D-68; Thu, 15 Oct 2026 08:22:11 -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 1xHKTI-0004rs-AM for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTG-0005Xj-Cc for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:08 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-484-ROh4FiA3PQGgt55f96Wj3Q-1; Thu, 15 Oct 2026 12:22:02 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 591BE1955F7F; Thu, 15 Oct 2026 12:22:01 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B9F2D7D5; Thu, 15 Oct 2026 12:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ftEMjTCPBHxRYxwUjhjRcVDB9wdmRD/+znyo8qNYU4s=; b=S3chiDHMix7I0KP0tj4E0QgNXEY0dC0T70mLqzgj9U4AEK5CM+ji4rInV+fLqwYFA49Idd EigzA6A41hMYXhX3wg+YVNv3lxKENNM1ZGpdIFNnGRrDw6lKCmCIH0onYB3afBLFMyvgr3 ClaGPsD2oNoEQLEajtvVi7N5EgiLsZQ= X-MC-Unique: ROh4FiA3PQGgt55f96Wj3Q-1 X-Mimecast-MFC-AGG-ID: ROh4FiA3PQGgt55f96Wj3Q_1792066921 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 03/21] hw/nvram/aspeed_otp, hw/misc/aspeed_sbc: Consolidate OTP layout definitions Date: Thu, 15 Oct 2026 14:21:33 +0200 Message-ID: <20261015122151.889017-4-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066978567158500 From: Kane Chen Move the OTP address-space layout definitions from aspeed_sbc.c to aspeed_otp.h, as they describe the OTP device layout. Add an aspeed_otp_read() helper to reduce duplicated OTP read code. Remove the redundant OTP address bounds checks, as invalid accesses are already handled by the OTP address space. No functional change. Signed-off-by: Kane-Chen-AS Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260918065347.3713868-2-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/nvram/aspeed_otp.h | 13 +++++++++ hw/misc/aspeed_sbc.c | 52 +++++++++++------------------------ 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/include/hw/nvram/aspeed_otp.h b/include/hw/nvram/aspeed_otp.h index 375235386079..2b6c2eaaa353 100644 --- a/include/hw/nvram/aspeed_otp.h +++ b/include/hw/nvram/aspeed_otp.h @@ -16,6 +16,19 @@ #define TYPE_ASPEED_OTP "aspeed-otp" OBJECT_DECLARE_SIMPLE_TYPE(AspeedOTPState, ASPEED_OTP) =20 +#define OTP_MEMORY_SIZE 0x4000 + +/* + * The OTP address space is indexed by dword address and is split into + * two regions: + * + * - [0, OTP_DATA_DWORD_COUNT]: the data region. Each address contains + * 64 bits of data. + * - [OTP_DATA_DWORD_COUNT, OTP_MEMORY_SIZE / 4]: the configuration + * region. Each address contains 32 bits of data. + */ +#define OTP_DATA_DWORD_COUNT (0x800) + typedef struct AspeedOTPState { DeviceState parent_obj; =20 diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c index 5c193d9086ed..3402cef5c3ec 100644 --- a/hw/misc/aspeed_sbc.c +++ b/hw/misc/aspeed_sbc.c @@ -66,15 +66,11 @@ #define QSR_RSA_MASK (0x3 << 12) #define QSR_HASH_MASK (0x3 << 10) =20 -#define OTP_MEMORY_SIZE 0x4000 /* OTP command */ #define SBC_OTP_CMD_READ 0x23b1e361 #define SBC_OTP_CMD_WRITE 0x23b1e362 #define SBC_OTP_CMD_PROG 0x23b1e364 =20 -#define OTP_DATA_DWORD_COUNT (0x800) -#define OTP_TOTAL_DWORD_COUNT (0x1000) - /* Voltage mode */ #define MODE_REGISTER (0x1000) #define MODE_REGISTER_A (0x3000) @@ -96,43 +92,34 @@ static uint64_t aspeed_sbc_read(void *opaque, hwaddr ad= dr, unsigned int size) return s->regs[addr]; } =20 -static bool aspeed_sbc_otp_read(AspeedSBCState *s, - uint32_t otp_addr) +static bool aspeed_otp_read(AspeedSBCState *s, uint32_t otp_addr, + uint32_t *value) { - MemTxResult ret; - AspeedOTPState *otp =3D &s->otp; - uint32_t value, otp_offset; - bool is_data =3D false; - - if (otp_addr < OTP_DATA_DWORD_COUNT) { - is_data =3D true; - } else if (otp_addr >=3D OTP_TOTAL_DWORD_COUNT) { + if (address_space_read(&s->otp.as, otp_addr << 2, MEMTXATTRS_UNSPECIFI= ED, + value, sizeof(*value)) !=3D MEMTX_OK) { qemu_log_mask(LOG_GUEST_ERROR, - "Invalid OTP addr 0x%x\n", + "Failed to read OTP memory, addr =3D %x\n", otp_addr); return false; } =20 - otp_offset =3D otp_addr << 2; - ret =3D address_space_read(&otp->as, otp_offset, MEMTXATTRS_UNSPECIFIE= D, - &value, sizeof(value)); - if (ret !=3D MEMTX_OK) { - qemu_log_mask(LOG_GUEST_ERROR, - "Failed to read OTP memory, addr =3D %x\n", - otp_addr); + return true; +} + +static bool aspeed_sbc_otp_read(AspeedSBCState *s, + uint32_t otp_addr) +{ + uint32_t value; + bool is_data =3D otp_addr < OTP_DATA_DWORD_COUNT; + + if (!aspeed_otp_read(s, otp_addr, &value)) { return false; } s->regs[R_CAMP1] =3D value; trace_aspeed_sbc_otp_read(otp_addr, value); =20 if (is_data) { - ret =3D address_space_read(&otp->as, otp_offset + 4, - MEMTXATTRS_UNSPECIFIED, - &value, sizeof(value)); - if (ret !=3D MEMTX_OK) { - qemu_log_mask(LOG_GUEST_ERROR, - "Failed to read OTP memory, addr =3D %x\n", - otp_addr); + if (!aspeed_otp_read(s, otp_addr + 1, &value)) { return false; } s->regs[R_CAMP2] =3D value; @@ -181,13 +168,6 @@ static bool aspeed_sbc_otp_prog(AspeedSBCState *s, uint32_t value =3D s->regs[R_CAMP1]; uint32_t otp_offset =3D otp_addr << 2; =20 - if (otp_addr >=3D OTP_TOTAL_DWORD_COUNT) { - qemu_log_mask(LOG_GUEST_ERROR, - "Invalid OTP addr 0x%x\n", - otp_addr); - return false; - } - ret =3D address_space_write(&otp->as, otp_offset, MEMTXATTRS_UNSPECIFI= ED, &value, sizeof(value)); if (ret !=3D MEMTX_OK) { --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066985; cv=none; d=zohomail.com; s=zohoarc; b=fvRxTA3aL2IEkInivpWO7DgwcFixbdws2/xolT4C4JyVAd6IaGFaVPtQoMOl/cyBkaJ/4y2PODh0U6vZNJk2NFpxmgI2u540knfag1N1UDDFqQ8yYlgaeW+MTAQP/vZdcQfPrDr+cE0wBdi04Pm2AH9lnHuzEBkbuac4fLkYvrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066985; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iYgfizVqdWMDMTKM4CCB+/+PsL+nYOxez2FzvRJ+U7I=; b=AcwWYCFZJsRhlQF5xP0kjlNq6X6mobSsRlZHuW+C88UAdDzXySxrwfFUteeRzsM36Lx5L1HFAKFfYCi6AGp0j7cZiaz9/QpkMIgp7KfjQTMVXpwyJTjkx7AaxjSICGuCv5rYCy9XHfz5HmLLN2IHntItIkCLPkUkV2FZolHMNVU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066985291587.09839212687; Thu, 15 Oct 2026 05:23:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTY-0005lx-2l; Thu, 15 Oct 2026 08:22:24 -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 1xHKTQ-0005Jh-5S for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTM-0005Zk-Gq for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:15 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-JvSFIEk-P3ytsOTe_jc-yA-1; Thu, 15 Oct 2026 12:22:04 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5DBCE1956076; Thu, 15 Oct 2026 12:22:03 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C4BE27D5; Thu, 15 Oct 2026 12:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iYgfizVqdWMDMTKM4CCB+/+PsL+nYOxez2FzvRJ+U7I=; b=PX3cSQZbJ3fKN4Xqw8V6335V1LyhD7VqT+O1uCaGC/Teu/XgOUngTfGV5s/blYqnQchD20 PWL5pD1et0lBrDnV82RVAPMfAWxfY16zupLxfgbj1utGc4n7Us/YjXVy5O6/FYmrjlwGuF sdgzQSdISohr35lXG0uSWEbHFS8x2U0= X-MC-Unique: JvSFIEk-P3ytsOTe_jc-yA-1 X-Mimecast-MFC-AGG-ID: JvSFIEk-P3ytsOTe_jc-yA_1792066923 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 04/21] hw/misc/aspeed_sbc: Derive ABR state from OTP config straps Date: Thu, 15 Oct 2026 14:21:34 +0200 Message-ID: <20261015122151.889017-5-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066986089158500 From: Kane Chen The eMMC ABR enable state is currently controlled by the "emmc-abr" machine property instead of the OTP configuration. Add helpers to read the OTP configuration and resolve strap values. Use the ABR strap value to update ABR_EN when R_STATUS is read. Remove the "emmc-abr" property as the ABR state is now derived from OTP. Signed-off-by: Kane-Chen-AS Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260918065347.3713868-3-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/aspeed_sbc.h | 1 - include/hw/nvram/aspeed_otp.h | 23 +++++++++++-- hw/misc/aspeed_sbc.c | 29 ++++++++++++---- hw/nvram/aspeed_otp.c | 63 +++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 10 deletions(-) diff --git a/include/hw/misc/aspeed_sbc.h b/include/hw/misc/aspeed_sbc.h index 756c61235697..b210ffb8aa86 100644 --- a/include/hw/misc/aspeed_sbc.h +++ b/include/hw/misc/aspeed_sbc.h @@ -32,7 +32,6 @@ OBJECT_DECLARE_TYPE(AspeedSBCState, AspeedSBCClass, ASPEE= D_SBC) struct AspeedSBCState { SysBusDevice parent; =20 - bool emmc_abr; uint32_t signing_settings; =20 MemoryRegion iomem; diff --git a/include/hw/nvram/aspeed_otp.h b/include/hw/nvram/aspeed_otp.h index 2b6c2eaaa353..f91af12ea9ef 100644 --- a/include/hw/nvram/aspeed_otp.h +++ b/include/hw/nvram/aspeed_otp.h @@ -24,11 +24,27 @@ OBJECT_DECLARE_SIMPLE_TYPE(AspeedOTPState, ASPEED_OTP) * * - [0, OTP_DATA_DWORD_COUNT]: the data region. Each address contains * 64 bits of data. - * - [OTP_DATA_DWORD_COUNT, OTP_MEMORY_SIZE / 4]: the configuration - * region. Each address contains 32 bits of data. + * - [OTP_DATA_DWORD_COUNT(OTP_CFG0), OTP_MEMORY_SIZE / 4]: the + * configuration region. Each address contains 32 bits of data. */ #define OTP_DATA_DWORD_COUNT (0x800) =20 +/* Start of the OTP configuration/strap region. */ +#define OTP_CFG0 (0x800) + +/* + * OTP straps are a 64-bit value packed as two 32-bit halves starting at + * config word OTP_STRAP_START_INDEX (OTPCFG16 and OTPCFG17). Each strap + * bit is stored redundantly in OTP_STRAP_COPY_NUM config words, spaced + * (OTP_STRAP_BIT_NUM / 32) words apart -- i.e. one word per 32-bit half, + * so the two halves interleave; the effective bit value is the XOR of + * all copies, matching how the real hardware and the ast-otp reference + * tool resolve straps. + */ +#define OTP_STRAP_START_INDEX 16 +#define OTP_STRAP_BIT_NUM 64 +#define OTP_STRAP_COPY_NUM 6 + typedef struct AspeedOTPState { DeviceState parent_obj; =20 @@ -43,4 +59,7 @@ typedef struct AspeedOTPState { uint8_t *storage; } AspeedOTPState; =20 +uint32_t aspeed_otp_read_config(AspeedOTPState *s, unsigned int cfg_word); +bool aspeed_otp_read_strap(AspeedOTPState *s, unsigned int bit); + #endif /* ASPEED_OTP_H */ diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c index 3402cef5c3ec..6cec9ad3daf0 100644 --- a/hw/misc/aspeed_sbc.c +++ b/hw/misc/aspeed_sbc.c @@ -71,6 +71,9 @@ #define SBC_OTP_CMD_WRITE 0x23b1e362 #define SBC_OTP_CMD_PROG 0x23b1e364 =20 +/* OTP strap bits */ +#define OTP_STRAP_ABR_EN 0x2b + /* Voltage mode */ #define MODE_REGISTER (0x1000) #define MODE_REGISTER_A (0x3000) @@ -89,7 +92,21 @@ static uint64_t aspeed_sbc_read(void *opaque, hwaddr add= r, unsigned int size) return 0; } =20 - return s->regs[addr]; + switch (addr) { + case R_STATUS: { + uint32_t val =3D s->regs[R_STATUS]; + + if (aspeed_otp_read_strap(&s->otp, OTP_STRAP_ABR_EN)) { + val |=3D ABR_EN; + } else { + val &=3D ~ABR_EN; + } + + return val; + } + default: + return s->regs[addr]; + } } =20 static bool aspeed_otp_read(AspeedSBCState *s, uint32_t otp_addr, @@ -388,13 +405,12 @@ static void aspeed_sbc_reset_hold(Object *obj, ResetT= ype type) =20 memset(s->regs, 0, sizeof(s->regs)); =20 - /* Set secure boot enabled with RSA4096_SHA256 and enable eMMC ABR */ + /* + * ABR_EN is derived from OTP on every read, see aspeed_sbc_read(). + * Set secure boot enabled with RSA4096_SHA256. + */ s->regs[R_STATUS] =3D OTP_IDLE | OTP_MEM_IDLE; =20 - if (s->emmc_abr) { - s->regs[R_STATUS] &=3D ABR_EN; - } - if (s->signing_settings) { s->regs[R_STATUS] &=3D SECURE_BOOT_EN; } @@ -452,7 +468,6 @@ static const VMStateDescription vmstate_aspeed_sbc =3D { }; =20 static const Property aspeed_sbc_properties[] =3D { - DEFINE_PROP_BOOL("emmc-abr", AspeedSBCState, emmc_abr, 0), DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_setting= s, 0), DEFINE_PROP_LINK("sram", AspeedSBCState, sram, TYPE_MEMORY_REGION, MemoryRegion *), diff --git a/hw/nvram/aspeed_otp.c b/hw/nvram/aspeed_otp.c index 81304bda3abe..127da15642f2 100644 --- a/hw/nvram/aspeed_otp.c +++ b/hw/nvram/aspeed_otp.c @@ -106,6 +106,69 @@ static void aspeed_otp_write(void *opaque, hwaddr otp_= offset, trace_aspeed_otp_prog(otp_offset, val, value); } =20 +/* + * Each OTP configuration setting contains 32 bits of data. + * Configuration words are grouped in banks of 8, with banks spaced + * 0x200 dwords apart and words within a bank spaced 2 dwords apart: + * + * offset(n) =3D OTP_CFG0 + (n / 8) * 0x200 + (n % 8) * 2 + * + * Returns 0 if the OTP read fails. + */ +uint32_t aspeed_otp_read_config(AspeedOTPState *s, unsigned int cfg_word) +{ + uint32_t otp_addr =3D OTP_CFG0 + (cfg_word / 8) * 0x200 + (cfg_word % = 8) * 2; + uint32_t value =3D 0; + + if (address_space_read(&s->as, otp_addr << 2, MEMTXATTRS_UNSPECIFIED, + &value, sizeof(value)) !=3D MEMTX_OK) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Failed to read OTP config word %u\n", + __func__, cfg_word); + return 0; + } + + return value; +} + +/* + * OTP straps are a 64-bit value split across two 32-bit config words, + * each of which is repeated OTP_STRAP_COPY_NUM times for reliability. + * The two words interleave starting at OTP_STRAP_START_INDEX: + * + * cfg_word: 16 17 18 19 20 21 22 23 24 25 26 27 + * +----+----+----+----+----+----+----+----+----+----+----+--= --+ + * | L0 | H0 | L1 | H1 | L2 | H2 | L3 | H3 | L4 | H4 | L5 | H= 5 | + * +----+----+----+----+----+----+----+----+----+----+----+--= --+ + * + * Lx =3D copy #x of bit 0-31, Hx =3D copy #x of bit 32-63 + * (x =3D 0 .. OTP_STRAP_COPY_NUM - 1) + * + * To resolve strap bit `n` (0 <=3D n < OTP_STRAP_BIT_NUM): + * half =3D n / 32 -- 0 selects the L* words, 1 selects the H* words + * bit_pos =3D n % 32 -- bit position within the word + * word(i) =3D OTP_STRAP_START_INDEX + half + i * (OTP_STRAP_BIT_NUM / 3= 2) + * + * The effective value of bit `n` is the XOR of bit `bit_pos` across all + * OTP_STRAP_COPY_NUM copies of word(i). + */ +bool aspeed_otp_read_strap(AspeedOTPState *s, unsigned int bit) +{ + uint32_t cfg_word =3D OTP_STRAP_START_INDEX + bit / 32; + uint32_t bit_pos =3D bit % 32; + bool enable =3D false; + int i; + + assert(bit < OTP_STRAP_BIT_NUM); + + for (i =3D 0; i < OTP_STRAP_COPY_NUM; i++) { + enable ^=3D (aspeed_otp_read_config(s, cfg_word) >> bit_pos) & 0x1; + cfg_word +=3D OTP_STRAP_BIT_NUM / 32; + } + + return enable; +} + static bool aspeed_otp_init_storage(AspeedOTPState *s, Error **errp) { uint32_t *p; --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066950; cv=none; d=zohomail.com; s=zohoarc; b=XK5R32z1fDfbLPyf2PhP3Zeb0eoM0g1qhHonlTwaWZzM6YGFD9QHdUDSyqMdpvOoBx/g9QuVfkQeC7EjzeFtB/bOuSqrrxEpROeGbJe6/AxyQ+jUiix/V1eq4xERbFxrrIBxF/cqLvIv7HO6dLnIssCPc4IesT/jtNuwvcJzeCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066950; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9M2xBgQWPWaVKo67VqFCMKG1rJuA68OyjWlVr/7Q7pw=; b=lDRSZGz+lXTWfqTDAKu7l54KoBqERuQOHJzipEkxLNOWcWSOYqQfH3Gu01ccVRLuiRaVBBFrHGARRS4v2a7ZCnz9aQxNKrdgR9ljZ8c0ZTELyI/YW7NKWsvSzrkH5FuTo9wakITqNxgv0QK20nyuqoJPw5PGWcWbOPkPRNOzTU0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066950219882.9154742222506; Thu, 15 Oct 2026 05:22:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTQ-0005KT-M3; Thu, 15 Oct 2026 08:22:16 -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 1xHKTL-00053A-UF for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTK-0005ZA-2e for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:11 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-eLSo1SugP4KErEfol1qAYQ-1; Thu, 15 Oct 2026 12:22:06 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37AFE1944D20; Thu, 15 Oct 2026 12:22:05 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C9B4F7D8; Thu, 15 Oct 2026 12:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9M2xBgQWPWaVKo67VqFCMKG1rJuA68OyjWlVr/7Q7pw=; b=TtolOz9innCRYZf8whl6/wJSB2VDW45lS+IMjmB1IJIlboP54I/elBovP4AI72mIvNmISR AdhEg0ZvPIMvBKtOZgq27R2TIGgashfiFihRhnbX/YSvZrddmXgTn/UvxFYbtCpJjQdej8 SLwqedLH7Zke1SARaDFDL/dNYE6/6SI= X-MC-Unique: eLSo1SugP4KErEfol1qAYQ-1 X-Mimecast-MFC-AGG-ID: eLSo1SugP4KErEfol1qAYQ_1792066925 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 05/21] hw/misc/aspeed_sbc: Derive secure boot state from OTP config Date: Thu, 15 Oct 2026 14:21:35 +0200 Message-ID: <20261015122151.889017-6-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066951755158500 From: Kane Chen The secure boot state is currently controlled by the "signing-settings" machine property instead of the OTP configuration. Derive SECURE_BOOT_EN and R_QSR from the OTP configuration when the registers are read. Remove the "signing-settings" property as the secure boot state is now derived from OTP. Signed-off-by: Kane-Chen-AS Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260918065347.3713868-4-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/aspeed_sbc.h | 2 -- hw/misc/aspeed_sbc.c | 22 +++++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/hw/misc/aspeed_sbc.h b/include/hw/misc/aspeed_sbc.h index b210ffb8aa86..7f3fa7062f96 100644 --- a/include/hw/misc/aspeed_sbc.h +++ b/include/hw/misc/aspeed_sbc.h @@ -32,8 +32,6 @@ OBJECT_DECLARE_TYPE(AspeedSBCState, AspeedSBCClass, ASPEE= D_SBC) struct AspeedSBCState { SysBusDevice parent; =20 - uint32_t signing_settings; - MemoryRegion iomem; =20 uint32_t regs[ASPEED_SBC_NR_REGS]; diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c index 6cec9ad3daf0..ad4c2b4b1d0c 100644 --- a/hw/misc/aspeed_sbc.c +++ b/hw/misc/aspeed_sbc.c @@ -79,6 +79,8 @@ #define MODE_REGISTER_A (0x3000) #define MODE_REGISTER_B (0x5000) =20 +static bool aspeed_sbc_otp_read(AspeedSBCState *s, uint32_t otp_addr); + static uint64_t aspeed_sbc_read(void *opaque, hwaddr addr, unsigned int si= ze) { AspeedSBCState *s =3D ASPEED_SBC(opaque); @@ -102,8 +104,16 @@ static uint64_t aspeed_sbc_read(void *opaque, hwaddr a= ddr, unsigned int size) val &=3D ~ABR_EN; } =20 + if (aspeed_otp_read_config(&s->otp, 0) & BIT(1)) { + val |=3D SECURE_BOOT_EN; + } else { + val &=3D ~SECURE_BOOT_EN; + } + return val; } + case R_QSR: + return aspeed_otp_read_config(&s->otp, 0); default: return s->regs[addr]; } @@ -406,16 +416,11 @@ static void aspeed_sbc_reset_hold(Object *obj, ResetT= ype type) memset(s->regs, 0, sizeof(s->regs)); =20 /* - * ABR_EN is derived from OTP on every read, see aspeed_sbc_read(). - * Set secure boot enabled with RSA4096_SHA256. + * ABR_EN and SECURE_BOOT_EN are derived from OTP on every read, see + * aspeed_sbc_read(), since the SBC status register is just a + * reflection of the OTP fuse state. */ s->regs[R_STATUS] =3D OTP_IDLE | OTP_MEM_IDLE; - - if (s->signing_settings) { - s->regs[R_STATUS] &=3D SECURE_BOOT_EN; - } - - s->regs[R_QSR] =3D s->signing_settings; } =20 static void aspeed_sbc_instance_init(Object *obj) @@ -468,7 +473,6 @@ static const VMStateDescription vmstate_aspeed_sbc =3D { }; =20 static const Property aspeed_sbc_properties[] =3D { - DEFINE_PROP_UINT32("signing-settings", AspeedSBCState, signing_setting= s, 0), DEFINE_PROP_LINK("sram", AspeedSBCState, sram, TYPE_MEMORY_REGION, MemoryRegion *), }; --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067064; cv=none; d=zohomail.com; s=zohoarc; b=BlQVJ1SXGkGxKyxo7qWoYV+DBvCksxhk1ukagl+56k0zMfCgyhwKNbyYbZ0N0yUB4E9T5zM2L6vMV6D4UpFqMRKQoZRRbp+LVj8f3F/GwCoRnKSgOP55BbxmXx9Fk+HknYTuGVWByAmaUPJrqnzlwVIRamj9hVbAr8qk7xbh2lc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067064; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ARFFXC2/ymVhZH3WtCkVYfkqKj6V6tiDGlg5gQ88kqU=; b=JD+MUhe4DIwirG0y2j4A5CUqx1rS5lXkhbXU9QOTCSbe8UUtA2Y8wAmG0qlV8v8pD9YFoQlyKKmVEV6RxJMHNNww5QQv4AaCzguAQRvxscIQFfm9WAdkSAD4Sg2ZvYtBBw2XoNPHPC3zYi1IHfZ9izplq+gIshpVNMiIv9cG1JE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067064348246.4459141279989; Thu, 15 Oct 2026 05:24:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTR-0005Oj-6c; Thu, 15 Oct 2026 08:22:17 -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 1xHKTO-00058m-71 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTM-0005ZZ-6Y for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:13 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-345-6kj69M9XPBueJhI7ItblLA-1; Thu, 15 Oct 2026 12:22:08 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 12E221801352; Thu, 15 Oct 2026 12:22:07 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A374A7D8; Thu, 15 Oct 2026 12:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ARFFXC2/ymVhZH3WtCkVYfkqKj6V6tiDGlg5gQ88kqU=; b=QpSL/51+YK2not95kvnvk9v3f6tdqRToGfr45iygZRiNodIFOwm8p/73fEJpSX5VtJJf0F F9PePzlRj4wT4TY4xkBe0sfkyou2NFHfVxsW22FI8g5UHpKqDBSfpAUCw4uZP3yIITsx+B sX03l2UFKHTvWrceC5Gxj3gKCXX9hm4= X-MC-Unique: 6kj69M9XPBueJhI7ItblLA-1 X-Mimecast-MFC-AGG-ID: 6kj69M9XPBueJhI7ItblLA_1792066927 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 06/21] hw/arm/aspeed: Sort device IDs alphabetically Date: Thu, 15 Oct 2026 14:21:36 +0200 Message-ID: <20261015122151.889017-7-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, 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_PASS=-0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067065658158500 From: Jamin Lin The ASPEED device ID enum has grown over time without a consistent ordering rule. This makes it difficult to determine where new device IDs should be added and reduces readability and maintainability as more devices are introduced. Sort the device IDs alphabetically to provide a consistent ordering rule. Keep related numbered devices together, such as SPI0, SPI1 and SPI2. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261005020428.3496039-2-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 176 ++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 38226d9b8049..a11038574338 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -195,64 +195,56 @@ struct AspeedSoCClass { }; =20 enum { - ASPEED_DEV_VBOOTROM, - ASPEED_DEV_SPI_BOOT, - ASPEED_DEV_IOMEM, - ASPEED_DEV_IOMEM0, - ASPEED_DEV_IOMEM1, - ASPEED_DEV_UART0, - ASPEED_DEV_UART1, - ASPEED_DEV_UART2, - ASPEED_DEV_UART3, - ASPEED_DEV_UART4, - ASPEED_DEV_UART5, - ASPEED_DEV_UART6, - ASPEED_DEV_UART7, - ASPEED_DEV_UART8, - ASPEED_DEV_UART9, - ASPEED_DEV_UART10, - ASPEED_DEV_UART11, - ASPEED_DEV_UART12, - ASPEED_DEV_UART13, - ASPEED_DEV_VUART, - ASPEED_DEV_FMC, - ASPEED_DEV_SPI0, - ASPEED_DEV_SPI1, - ASPEED_DEV_SPI2, + ASPEED_DEV_ACRY, + ASPEED_DEV_ADC, + ASPEED_DEV_DP, + ASPEED_DEV_DPMCU, ASPEED_DEV_EHCI1, ASPEED_DEV_EHCI2, ASPEED_DEV_EHCI3, ASPEED_DEV_EHCI4, - ASPEED_DEV_VIC, - ASPEED_DEV_INTC, - ASPEED_DEV_INTCIO, - ASPEED_DEV_SDMC, - ASPEED_DEV_SCU, - ASPEED_DEV_ADC, - ASPEED_DEV_SBC, + ASPEED_DEV_EMMC, ASPEED_DEV_EMMC_BC, - ASPEED_DEV_VIDEO, - ASPEED_DEV_SRAM0, - ASPEED_DEV_SRAM1, - ASPEED_DEV_SDHCI, + ASPEED_DEV_ESPI, + ASPEED_DEV_ETH1, + ASPEED_DEV_ETH2, + ASPEED_DEV_ETH3, + ASPEED_DEV_ETH4, + ASPEED_DEV_FMC, + ASPEED_DEV_FSI1, + ASPEED_DEV_FSI2, ASPEED_DEV_GPIO, ASPEED_DEV_GPIO_1_8V, - ASPEED_DEV_SGPIOM0, - ASPEED_DEV_SGPIOM1, - ASPEED_DEV_RTC, - ASPEED_DEV_TIMER1, - ASPEED_DEV_TIMER2, - ASPEED_DEV_TIMER3, - ASPEED_DEV_TIMER4, - ASPEED_DEV_TIMER5, - ASPEED_DEV_TIMER6, - ASPEED_DEV_TIMER7, - ASPEED_DEV_TIMER8, - ASPEED_DEV_WDT, - ASPEED_DEV_PWM, - ASPEED_DEV_LPC, - ASPEED_DEV_IBT, + ASPEED_DEV_HACE, ASPEED_DEV_I2C, + ASPEED_DEV_I3C, + ASPEED_DEV_IBT, + ASPEED_DEV_INTC, + ASPEED_DEV_INTCIO, + ASPEED_DEV_IOMEM, + ASPEED_DEV_IOMEM0, + ASPEED_DEV_IOMEM1, + ASPEED_DEV_IOEXP0_I2C, + ASPEED_DEV_IOEXP1_I2C, + ASPEED_DEV_IOEXP0_I3C, + ASPEED_DEV_IOEXP1_I3C, + ASPEED_DEV_IOEXP0_INTCIO, + ASPEED_DEV_IOEXP1_INTCIO, + ASPEED_DEV_IPC0, + ASPEED_DEV_IPC1, + ASPEED_DEV_JTAG0, + ASPEED_DEV_JTAG1, + ASPEED_DEV_KCS, + ASPEED_DEV_LPC, + ASPEED_DEV_LTPI_CTRL1, + ASPEED_DEV_LTPI_CTRL2, + ASPEED_DEV_LTPI_IO0, + ASPEED_DEV_LTPI_IO1, + ASPEED_DEV_MII1, + ASPEED_DEV_MII2, + ASPEED_DEV_MII3, + ASPEED_DEV_MII4, + ASPEED_DEV_OTP, ASPEED_DEV_PCIE0, ASPEED_DEV_PCIE1, ASPEED_DEV_PCIE2, @@ -263,49 +255,57 @@ enum { ASPEED_DEV_PCIE_MMIO1, ASPEED_DEV_PCIE_MMIO2, ASPEED_DEV_PECI, - ASPEED_DEV_ETH1, - ASPEED_DEV_ETH2, - ASPEED_DEV_ETH3, - ASPEED_DEV_ETH4, - ASPEED_DEV_MII1, - ASPEED_DEV_MII2, - ASPEED_DEV_MII3, - ASPEED_DEV_MII4, - ASPEED_DEV_SDRAM, - ASPEED_DEV_XDMA, - ASPEED_DEV_EMMC, - ASPEED_DEV_KCS, - ASPEED_DEV_HACE, - ASPEED_DEV_ACRY, - ASPEED_DEV_DPMCU, - ASPEED_DEV_DP, - ASPEED_DEV_I3C, - ASPEED_DEV_ESPI, - ASPEED_DEV_UDC, - ASPEED_DEV_JTAG0, - ASPEED_DEV_JTAG1, - ASPEED_DEV_FSI1, - ASPEED_DEV_FSI2, + ASPEED_DEV_PRIC0, + ASPEED_DEV_PRIC1, + ASPEED_DEV_PWM, + ASPEED_DEV_RTC, + ASPEED_DEV_SBC, + ASPEED_DEV_SCU, ASPEED_DEV_SCUIO, + ASPEED_DEV_SDHCI, + ASPEED_DEV_SDMC, + ASPEED_DEV_SDRAM, + ASPEED_DEV_SGPIOM0, + ASPEED_DEV_SGPIOM1, ASPEED_DEV_SLI, ASPEED_DEV_SLIIO, + ASPEED_DEV_SPI_BOOT, + ASPEED_DEV_SPI0, + ASPEED_DEV_SPI1, + ASPEED_DEV_SPI2, + ASPEED_DEV_SRAM0, + ASPEED_DEV_SRAM1, + ASPEED_DEV_TIMER1, + ASPEED_DEV_TIMER2, + ASPEED_DEV_TIMER3, + ASPEED_DEV_TIMER4, + ASPEED_DEV_TIMER5, + ASPEED_DEV_TIMER6, + ASPEED_DEV_TIMER7, + ASPEED_DEV_TIMER8, + ASPEED_DEV_UART0, + ASPEED_DEV_UART1, + ASPEED_DEV_UART2, + ASPEED_DEV_UART3, + ASPEED_DEV_UART4, + ASPEED_DEV_UART5, + ASPEED_DEV_UART6, + ASPEED_DEV_UART7, + ASPEED_DEV_UART8, + ASPEED_DEV_UART9, + ASPEED_DEV_UART10, + ASPEED_DEV_UART11, + ASPEED_DEV_UART12, + ASPEED_DEV_UART13, + ASPEED_DEV_UDC, + ASPEED_DEV_VBOOTROM, + ASPEED_DEV_VIC, + ASPEED_DEV_VIDEO, + ASPEED_DEV_VUART, + ASPEED_DEV_WDT, + ASPEED_DEV_XDMA, ASPEED_GIC_DIST, ASPEED_GIC_REDIST, - ASPEED_DEV_IPC0, - ASPEED_DEV_IPC1, - ASPEED_DEV_LTPI_CTRL1, - ASPEED_DEV_LTPI_CTRL2, - ASPEED_DEV_LTPI_IO0, - ASPEED_DEV_LTPI_IO1, - ASPEED_DEV_IOEXP0_I2C, - ASPEED_DEV_IOEXP1_I2C, - ASPEED_DEV_IOEXP0_INTCIO, - ASPEED_DEV_IOEXP1_INTCIO, - ASPEED_DEV_IOEXP0_I3C, - ASPEED_DEV_IOEXP1_I3C, - ASPEED_DEV_PRIC0, - ASPEED_DEV_PRIC1, - ASPEED_DEV_OTP, }; =20 const char *aspeed_soc_cpu_type(const char * const *valid_cpu_types); --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066940; cv=none; d=zohomail.com; s=zohoarc; b=XLgu7VPK2vlwMJ0b3gRAHrlZc1/oIleN8BKjWcKkMs7uWXqbCZ7ignZ46YaTumbD37wTk0uAA3a7dQUKgj7uH4/JNFy0RCoOoZ0OuH9MphrHmNF1bRLzq2yVZF6/rP/xLy9nm7cUxyG24lJP2/S6wyW9JLFZfuck+U5oTNdhjNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066940; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nikO7j5K9fVfPT0fkp8mDt89DDyDpcJmpo1hVyQ/7SA=; b=IF8B5o8bisRkel4XmGUnKb3L8DO36HewYps028K2I8oodc3th37v9EHhNCJYo+rlXenIGuVGEyPuSq1qVN0/Z98rVqtchvGd5ELStLFGoUSOUu/ZuGPvKqMV1FKkPZGWiWsvHAnaC7sRDcgYon9rJo26aStoZuwNNjbcif5P6o4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066940802246.7507197944102; Thu, 15 Oct 2026 05:22:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTS-0005Qf-5V; Thu, 15 Oct 2026 08:22:19 -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 1xHKTP-0005Ik-UX for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTN-0005Zx-UL for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:15 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-418-g6p1yBEtP_-MbJE0li8HIQ-1; Thu, 15 Oct 2026 12:22:10 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E30411800765; Thu, 15 Oct 2026 12:22:08 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7E6B17D5; Thu, 15 Oct 2026 12:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nikO7j5K9fVfPT0fkp8mDt89DDyDpcJmpo1hVyQ/7SA=; b=ipzIklTUx+caIZsmqmuOsoWGGSMweJ/J+ph0gBKIVM46EtZ+igbAzNuZz4RbWEbnpAsoO5 A12+wXka2LSO56fjPbgwtBBNpSq7NWuhqPJJFzeR5pacCZUy6wXcggcs6/hXPIAR/hzpyS 28Rzw8TTsrJ0Zo9sjh1RKtVfQcoY434= X-MC-Unique: g6p1yBEtP_-MbJE0li8HIQ-1 X-Mimecast-MFC-AGG-ID: g6p1yBEtP_-MbJE0li8HIQ_1792066929 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 07/21] tests/functional/aarch64/test_aspeed_ast2700a2: Add I2C test for IO expander 1 Date: Thu, 15 Oct 2026 14:21:37 +0200 Message-ID: <20261015122151.889017-8-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066943348158500 From: Jamin Lin The IO expander test only checks the I2C bus of IO expander 0. The I2C buses of IO expander 1 are not tested, so a wrong interrupt wiring for IO expander 1 can not be detected. Add a TMP105 device on the first I2C bus of IO expander 1 and check that it can be read from firmware. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261005020428.3496039-3-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/aarch64/test_aspeed_ast2700a2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/aarch64/test_aspeed_ast2700a2.py b/tests/func= tional/aarch64/test_aspeed_ast2700a2.py index 01c7c4fdbe35..74ef93fc0d57 100755 --- a/tests/functional/aarch64/test_aspeed_ast2700a2.py +++ b/tests/functional/aarch64/test_aspeed_ast2700a2.py @@ -196,10 +196,13 @@ def test_aarch64_ast2700a2_evb_ioexp_v11_03(self): self.vm.set_machine('ast2700a2-evb,fmc-model=3Dw25q512jv') self.vm.add_args('-device', 'tmp105,bus=3Dioexp0.0,address=3D0x4d,id=3Dtmp-te= st-16') + self.vm.add_args('-device', + 'tmp105,bus=3Dioexp1.0,address=3D0x4d,id=3Dtmp-te= st-32') self.start_ast2700_test('ast2700-dcscm-image', 8) self.verify_openbmc_boot_and_login('ast2700-dcscm', False) self.do_ast2700_i2c_test(8) self.do_ast2700_i2c_test(16) + self.do_ast2700_i2c_test(32) =20 if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067007; cv=none; d=zohomail.com; s=zohoarc; b=gtBP5HdJ3v2ya21QNqYULjT7+bah51q0Hc9vktt0//aI2ww6E6tPmomJ6RZKyTSYsMgh69L0mjKRU5D/O/D41Zlliomh554aFlun0Hno+TNzZuijbpSb0dHGQf7PUGB5ds1mlxzcQ+m1gs/laPWRrQrpNBkrgX5z2WsR99ugFZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067007; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C4jeaIL5qBVLkK/sDCwk13zw4P82+yF+4WP6MfAHbPY=; b=BOFJSFY2QOWoXIu1XGWeIFH72ZMxOT6e6ReXEI9GnH0pmix0dkumDYfXxQALRTqp4nuecCtX6brJCjieZCPy1lpPopmx3vu67RFa6BiYs6qZszu1+W333rEju3QOm039YtSTH9OlBbAFafOQRD6ekk7ppDD/0zmRjeDCIgAp3IU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067007540605.6800238268071; Thu, 15 Oct 2026 05:23:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTW-0005bG-2j; Thu, 15 Oct 2026 08:22:22 -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 1xHKTQ-0005Jy-7q for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTO-0005a2-9W for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:15 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-375-WBb08xioPmab2Y6OnpRxtA-1; Thu, 15 Oct 2026 12:22:12 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 03A501956063; Thu, 15 Oct 2026 12:22:11 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5932B7D5; Thu, 15 Oct 2026 12:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4jeaIL5qBVLkK/sDCwk13zw4P82+yF+4WP6MfAHbPY=; b=O5fEKWFbV/eYzuVTmUcomYq5IJMXKrBj5a/TXe4GMKELVKL8aYYj2NsI+RKIuQltQjxJvT vh3v8XOz8ifHh+92tO9G8M6HA+GFiHHz7Fq+LHuedDzAfUo27mIoIIkw6uy6W1jE+1gNSK E6JVouliG+In3wPcD/YEsCaRu5W8S1M= X-MC-Unique: WBb08xioPmab2Y6OnpRxtA-1 X-Mimecast-MFC-AGG-ID: WBb08xioPmab2Y6OnpRxtA_1792066931 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 08/21] MAINTAINERS: Update ASPEED BMCs reviewers Date: Thu, 15 Oct 2026 14:21:38 +0200 Message-ID: <20261015122151.889017-9-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067008408158500 From: Jamin Lin Update the ASPEED BMCs reviewer list to reflect the current active reviewers. Signed-off-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20261005015015.3466808-1-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- MAINTAINERS | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fc60193aa3fb..1ee661cc23ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1265,12 +1265,8 @@ F: tests/functional/arm/test_emcraft_sf2.py ASPEED BMCs M: C=C3=A9dric Le Goater M: Peter Maydell -R: Steven Lee -R: Troy Lee R: Jamin Lin R: Kane Chen -R: Andrew Jeffery -R: Joel Stanley L: qemu-arm@nongnu.org S: Maintained F: hw/*/*aspeed* --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067047; cv=none; d=zohomail.com; s=zohoarc; b=F/e/w6NE9w0tNKjhJet7DzCY/5lbX0uTNO/9JPrsEjSUXGboj2FIro3rIwFm7K/7ZapLaX/FblL2/TG/ZDEj3AMj5tmHpCkX7CbboQNmioBHkpDh2/R4UAXMAZoEFWeSPXeKFIK4ZShGG6po0K0nPFvfWA2Va53q0e2W36cVI2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067047; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uNoELrlgMsrXFiUnOLWVdQdQwMaebCX35+/HiwhaaW0=; b=Fc7KUq72Wop06JOOMeGiXHVlQkJ/0wfgComuD6vsJmWuoYgB9TXSsIEu/9WiXXr2cd/3DvpO57cFNGiNRma8WGoXj6G3hHqBfm8YbkmnkXcsaFBUV7xM76YmMKwEzrJ6n2hLeao2+17A8Q8XV0hgIxgyzc4OA5NZxGRlH78lIyI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067047071795.7778515924816; Thu, 15 Oct 2026 05:24:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTZ-0005sK-Ns; Thu, 15 Oct 2026 08:22:25 -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 1xHKTU-0005Ya-Bp for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTS-0005bP-32 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:20 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-XgBs26-VNJeLWQcVFCZsBQ-1; Thu, 15 Oct 2026 12:22:14 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2A9081955F0C; Thu, 15 Oct 2026 12:22:13 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6DF817D9; Thu, 15 Oct 2026 12:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uNoELrlgMsrXFiUnOLWVdQdQwMaebCX35+/HiwhaaW0=; b=WS/nMZ6lj3uYSXk8zjSvDE+fBRsEMJFMp3x9j6Se7eYkM4omFLM5hqHa9/idbA5E1sUoay x90pS2h+xG6McW482a6B6n1oXntcZUf4grI9Ugk3Jxv2jKeIGdImYzbwf32uT4XgTLudNa X1DvlfcRB/6367jWvIflm4mF6xuYg+k= X-MC-Unique: XgBs26-VNJeLWQcVFCZsBQ-1 X-Mimecast-MFC-AGG-ID: XgBs26-VNJeLWQcVFCZsBQ_1792066933 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 09/21] hw/misc/unimp: Add create_unimplemented_devices() helper Date: Thu, 15 Oct 2026 14:21:39 +0200 Message-ID: <20261015122151.889017-10-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067049462158500 From: Jamin Lin Several boards and SoCs create many unimplemented devices. Each of them uses its own structure and helper to describe and map these devices. Add an UnimplementedDeviceConfig structure and a create_unimplemented_devices() helper. The helper creates an unimplemented device for each entry of a table, adds it as a QOM child of the parent object, and maps it in a memory region container with the given priority. The table is terminated by an empty entry. Suggested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-2-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/unimp.h | 21 +++++++++++++++++++++ hw/misc/unimp.c | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h index 77a5077511f2..073575159d60 100644 --- a/include/hw/misc/unimp.h +++ b/include/hw/misc/unimp.h @@ -25,6 +25,27 @@ struct UnimplementedDeviceState { uint64_t size; }; =20 +typedef struct UnimplementedDeviceConfig { + const char *qom_name; + const char *region_name; + uint64_t offset; + uint64_t size; + int priority; +} UnimplementedDeviceConfig; + +/** + * create_unimplemented_devices: + * @parentobj: the parent object + * @container: a #MemoryRegion within which @addr is a relative address + * @devconfigs: NULL terminated array of #UnimplementedDeviceConfig + * + * For each entries in @devconfigs, create a TYPE_UNIMPLEMENTED_DEVICE + * and mmap it in @container at UnimplementedDeviceConfig::offset. + * @container is expected to be a QOM child of @parentobj. + */ +void create_unimplemented_devices(Object *parentobj, MemoryRegion *contain= er, + const UnimplementedDeviceConfig *devconf= igs); + /** * create_unimplemented_device: create and map a dummy device * @name: name of the device for debug logging diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index 521b84bf20bf..4c8dcbdff336 100644 --- a/hw/misc/unimp.c +++ b/hw/misc/unimp.c @@ -96,3 +96,23 @@ static void unimp_register_types(void) } =20 type_init(unimp_register_types) + +void create_unimplemented_devices(Object *parentobj, MemoryRegion *contain= er, + const UnimplementedDeviceConfig *devconf= igs) +{ + const UnimplementedDeviceConfig *cfg; + + for (cfg =3D devconfigs; cfg->qom_name; cfg++) { + DeviceState *dev =3D qdev_new(TYPE_UNIMPLEMENTED_DEVICE); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); + + object_property_add_child(parentobj, cfg->qom_name, OBJECT(dev)); + qdev_prop_set_string(dev, "name", cfg->region_name); + qdev_prop_set_uint64(dev, "size", cfg->size); + sysbus_realize_and_unref(sbd, &error_fatal); + + memory_region_add_subregion_overlap(container, cfg->offset, + sysbus_mmio_get_region(sbd, 0), + cfg->priority); + } +} --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067057; cv=none; d=zohomail.com; s=zohoarc; b=lOxN7ztVAHW6eXUgfbgUqPvb7EHQG2xe9BtZREVK6jqRwJgX1cumx0ZKk6YwirMKmI2zn9tXNUvfRG26zjp4ktuxT0QL2HAoU2GmCuE/g+uitH2xB92JQtwEr/Wv3Khzx+mSu15F1V+X79KkIipwlAo/ToVfxzYwwTnV3wxIYBo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067057; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=N0hmxwpk5OQKcEu/LT0JvkEk5nqGRSJbPFS7UQjNSvE=; b=hHIBzgm8TmMYCLq6Pb50JhGZFSivVhQwFP/g5x3K3EQHyN2XhYa/ObCQwy2zzh/ct6yBZNOmldKRmmyjs7BZ7FNIJm0PPpXglf2qAfOovjoGiLqHrtLHqKgBM7eVNTV613C/8SndJqsJ1RYbnjw9dTLIlqXpu0aIBzavc316biQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067057140569.5391970198442; Thu, 15 Oct 2026 05:24:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTb-0005zb-Dx; Thu, 15 Oct 2026 08:22:27 -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 1xHKTW-0005f5-CO for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTU-0005bo-5A for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:21 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-498-B5vRx68aMRGK1dVrGgGHKw-1; Thu, 15 Oct 2026 12:22:16 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 28CC4195606C; Thu, 15 Oct 2026 12:22:15 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 80B2B7D5; Thu, 15 Oct 2026 12:22:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N0hmxwpk5OQKcEu/LT0JvkEk5nqGRSJbPFS7UQjNSvE=; b=OCLIZ04jemXMs5ZIt+eYF7lPH10A9evFvdVsT5xe1aVsd1YYKmufqGY52CLHizLcZZ0CVk mpi8uc7l0lp4cmdF4dW0BKoDYogjVx5AUoSI77HW9XOnieGuCfZaoIQq+gvta3S9z5i9MU qzUcaRnhKucw6IqEwh4lEvCi5V9dMWY= X-MC-Unique: B5vRx68aMRGK1dVrGgGHKw-1 X-Mimecast-MFC-AGG-ID: B5vRx68aMRGK1dVrGgGHKw_1792066935 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 10/21] hw/arm/aspeed_ast2400: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:40 +0200 Message-ID: <20261015122151.889017-11-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067059395158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in AspeedSoCState. This made the variable names confusing. For example, AspeedSoCState has "udc" as an unimplemented device, but Aspeed2600SoCState also has "udc" as the real UDC model. Add an unimp_devs table in AspeedSoCClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST2400/AST2500 to use them. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-3-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast2400.c | 25 ++++++++++--------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index a11038574338..82e394f08539 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -190,6 +190,7 @@ struct AspeedSoCClass { int ioexp_num; const int *irqmap; const hwaddr *memmap; + const UnimplementedDeviceConfig *unimp_devs; uint32_t num_cpus; bool (*boot_from_emmc)(AspeedSoCState *s); }; diff --git a/hw/arm/aspeed_ast2400.c b/hw/arm/aspeed_ast2400.c index 79a653f65f09..fa2782da6180 100644 --- a/hw/arm/aspeed_ast2400.c +++ b/hw/arm/aspeed_ast2400.c @@ -23,8 +23,6 @@ #include "system/system.h" #include "target/arm/cpu-qom.h" =20 -#define ASPEED_SOC_IOMEM_SIZE 0x00200000 - static const hwaddr aspeed_soc_ast2400_memmap[] =3D { [ASPEED_DEV_SPI_BOOT] =3D 0x00000000, [ASPEED_DEV_IOMEM] =3D 0x1E600000, @@ -134,6 +132,12 @@ static const int aspeed_soc_ast2400_irqmap[] =3D { =20 #define aspeed_soc_ast2500_irqmap aspeed_soc_ast2400_irqmap =20 +static const UnimplementedDeviceConfig aspeed_soc_ast2400_unimp_devs[] =3D= { + { "iomem", "aspeed.io", 0x1E600000, 0x00200000, -1000 }, + { "video", "aspeed.video", 0x1E700000, 0x1000, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast2400_get_irq(AspeedSoCState *s, int dev) { Aspeed2400SoCState *a =3D ASPEED2400_SOC(s); @@ -239,9 +243,6 @@ static void aspeed_ast2400_soc_init(Object *obj) =20 snprintf(typename, sizeof(typename), "aspeed.hace-%s", socname); object_initialize_child(obj, "hace", &s->hace, typename); - - object_initialize_child(obj, "iomem", &s->iomem, TYPE_UNIMPLEMENTED_DE= VICE); - object_initialize_child(obj, "video", &s->video, TYPE_UNIMPLEMENTED_DE= VICE); } =20 static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp) @@ -259,16 +260,8 @@ static void aspeed_ast2400_soc_realize(DeviceState *de= v, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SPI_BOOT], &s->spi_boot_container); =20 - /* IO space */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem), - "aspeed.io", - sc->memmap[ASPEED_DEV_IOMEM], - ASPEED_SOC_IOMEM_SIZE); - - /* Video engine stub */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->video), - "aspeed.video", - sc->memmap[ASPEED_DEV_VIDEO], 0x1000); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); =20 /* CPU */ for (i =3D 0; i < sc->num_cpus; i++) { @@ -542,6 +535,7 @@ static void aspeed_soc_ast2400_class_init(ObjectClass *= oc, const void *data) sc->uarts_base =3D ASPEED_DEV_UART1; sc->irqmap =3D aspeed_soc_ast2400_irqmap; sc->memmap =3D aspeed_soc_ast2400_memmap; + sc->unimp_devs =3D aspeed_soc_ast2400_unimp_devs; sc->num_cpus =3D 1; } =20 @@ -569,6 +563,7 @@ static void aspeed_soc_ast2500_class_init(ObjectClass *= oc, const void *data) sc->uarts_base =3D ASPEED_DEV_UART1; sc->irqmap =3D aspeed_soc_ast2500_irqmap; sc->memmap =3D aspeed_soc_ast2500_memmap; + sc->unimp_devs =3D aspeed_soc_ast2400_unimp_devs; sc->num_cpus =3D 1; } =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066977; cv=none; d=zohomail.com; s=zohoarc; b=aRK+DsrbH8FT0n7VC274ACPmC8omQgDQDANd994gkDKZHz9ZQr8/kppy971ixY8I6BTlYY2XocczcAEP/7ddvPsvpDn+N1YFCsv0RaM/6UpyW0r1LaNkQPiUjlLWzXPavD26WeR2hMmsmo6ROFltwIqooYPUBeB5EKEUhKfVsXM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066977; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=22TDwxXlHOPFJDlkPvlOsjmq8m1lAHrkYC3232mXZus=; b=Qu25zyJUJqMMCN4kFcpn3UYv0ycfqXvKfYuTyySPPr9M4zzeu+YNBOLc8AUPZd7CeXL2dJUronWQoKgnTwtNDCz8yaPs2rXtealJpTWNrMMV02COy/WWnls+6IHYTjLzL53rMDEgmDB6XdgYKZBToVTltVNkOPHvAvoMedxZuP4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066977942617.6405627377435; Thu, 15 Oct 2026 05:22:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTc-00063h-L0; Thu, 15 Oct 2026 08:22:28 -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 1xHKTX-0005mQ-Qe for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTU-0005bu-DT for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:23 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-327-vng_rm0KMsqezXVutMGlfw-1; Thu, 15 Oct 2026 12:22:18 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 39FC918011D5; Thu, 15 Oct 2026 12:22:17 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 938B37D5; Thu, 15 Oct 2026 12:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=22TDwxXlHOPFJDlkPvlOsjmq8m1lAHrkYC3232mXZus=; b=ZQW0y9odDnnqN7bbQIOFT2eE5OexKUBV2mtcWCw9Uax+lmhmKySKBTdalpGb3eJE2DTVCk PcG/C5L93CgolmAQlk+rd0JfiH8OpAyFClx1c5aM3IM9JlottbIG1et+lFrZVrpN453Qcn sY43i3yQKfcdBh99phq9nr6Rb1BGxpE= X-MC-Unique: vng_rm0KMsqezXVutMGlfw-1 X-Mimecast-MFC-AGG-ID: vng_rm0KMsqezXVutMGlfw_1792066937 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 11/21] hw/arm/aspeed_ast2600: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:41 +0200 Message-ID: <20261015122151.889017-12-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, 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_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066979923158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in AspeedSoCState. This made the variable names confusing. For example, AspeedSoCState has "udc" as an unimplemented device, but Aspeed2600SoCState also has "udc" as the real UDC model. Use the unimp_devs table in AspeedSoCClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST2600 to use them. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-4-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast2600.c | 44 +++++++++++------------------------------ 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 1a10d0fe1ecc..ebaf07d3128a 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -19,9 +19,6 @@ #include "system/system.h" #include "target/arm/cpu-qom.h" =20 -#define ASPEED_SOC_IOMEM_SIZE 0x00200000 -#define ASPEED_SOC_DPMCU_SIZE 0x00040000 - static const hwaddr aspeed_soc_ast2600_memmap[] =3D { [ASPEED_DEV_SPI_BOOT] =3D 0x00000000, [ASPEED_DEV_SRAM0] =3D 0x10000000, @@ -149,6 +146,15 @@ static const int aspeed_soc_ast2600_irqmap[] =3D { [ASPEED_DEV_ACRY] =3D 160, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast2600_unimp_devs[] =3D= { + { "iomem", "aspeed.io", 0x1E600000, 0x00200000, -1000 }, + { "video", "aspeed.video", 0x1E700000, 0x1000, -1000 }, + { "dpmcu", "aspeed.dpmcu", 0x18000000, 0x00040000, -1000 }, + { "emmc-boot-controller", "aspeed.emmc-boot-controller", + 0x1E6F5000, 0x1000, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast2600_get_irq(AspeedSoCState *s, int dev) { Aspeed2600SoCState *a =3D ASPEED2600_SOC(s); @@ -282,13 +288,6 @@ static void aspeed_soc_ast2600_init(Object *obj) =20 object_initialize_child(obj, "sbc", &s->sbc, TYPE_ASPEED_AST2600_SBC); =20 - object_initialize_child(obj, "iomem", &s->iomem, TYPE_UNIMPLEMENTED_DE= VICE); - object_initialize_child(obj, "video", &s->video, TYPE_UNIMPLEMENTED_DE= VICE); - object_initialize_child(obj, "dpmcu", &s->dpmcu, TYPE_UNIMPLEMENTED_DE= VICE); - object_initialize_child(obj, "emmc-boot-controller", - &s->emmc_boot_controller, - TYPE_UNIMPLEMENTED_DEVICE); - for (i =3D 0; i < ASPEED_FSI_NUM; i++) { object_initialize_child(obj, "fsi[*]", &s->fsi[i], TYPE_ASPEED_APB= 2OPB); } @@ -382,22 +381,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *de= v, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SPI_BOOT], &s->spi_boot_container); =20 - /* IO space */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem), - "aspeed.io", - sc->memmap[ASPEED_DEV_IOMEM], - ASPEED_SOC_IOMEM_SIZE); - - /* Video engine stub */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->video), - "aspeed.video", - sc->memmap[ASPEED_DEV_VIDEO], 0x1000); - - /* eMMC Boot Controller stub */ - aspeed_mmio_map_unimplemented(s->memory, - SYS_BUS_DEVICE(&s->emmc_boot_controller), - "aspeed.emmc-boot-controller", - sc->memmap[ASPEED_DEV_EMMC_BC], 0x1000); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); =20 /* CPU */ for (i =3D 0; i < sc->num_cpus; i++) { @@ -469,12 +454,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *de= v, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM1], &s->sram_container[1]); =20 - /* DPMCU */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->dpmcu), - "aspeed.dpmcu", - sc->memmap[ASPEED_DEV_DPMCU], - ASPEED_SOC_DPMCU_SIZE); - /* SCU */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { return; @@ -838,6 +817,7 @@ static void aspeed_soc_ast2600_class_init(ObjectClass *= oc, const void *data) sc->uarts_base =3D ASPEED_DEV_UART1; sc->irqmap =3D aspeed_soc_ast2600_irqmap; sc->memmap =3D aspeed_soc_ast2600_memmap; + sc->unimp_devs =3D aspeed_soc_ast2600_unimp_devs; sc->num_cpus =3D 2; sc->boot_from_emmc =3D aspeed_soc_ast2600_boot_from_emmc; } --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066957; cv=none; d=zohomail.com; s=zohoarc; b=niI/mpx0nxUcuHsaEpG614/3/qNGTLsvr+ON4fID2WUJQkL3hdID9LVC7ogHjl8f1yNHMQP1slA2NPxIa5EV6AF6lTA6DSdOfJK7qyieKkBYSvrrIMj8c/LosfrRmg2QPs297ijnlpEpXwfKcG47OlCnvuG8UXXcfilnzdnBQkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066957; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UbHdsbD+UMw1rg2dwdbPIZly5FNZ2fGF7EZZV6CD/ic=; b=QfuSJUfGvgfpvU+1C3A/T1XaNHuKQpSXQOseVnjI51j+kgpe8hDjlEQ/oWrPwDBf/8zbjoW816GtpH1SAPzUQZiBlKtvGxbICDdErfvgXEWx2NDLWRJi/7NawBbLf2tluQ7BsjhiJk+64ifb/xtpaU16yVmw+rsVg3u7ziU3xuE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066957007288.8164748323363; Thu, 15 Oct 2026 05:22:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTf-0006H4-FC; Thu, 15 Oct 2026 08:22:31 -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 1xHKTa-0005x7-A0 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTY-0005cn-Ac for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:25 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-48-8LUAOALBMFqTdbmNKMdBdw-1; Thu, 15 Oct 2026 12:22:20 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4F7A51954235; Thu, 15 Oct 2026 12:22:19 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A77827D5; Thu, 15 Oct 2026 12:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UbHdsbD+UMw1rg2dwdbPIZly5FNZ2fGF7EZZV6CD/ic=; b=F/ocWLgIYHoEvcImvXvErzjzGyV4AbtDVDZnq4yET25g2ZlZIziUENQq5734vRXRTMd1YS Y5SPX7H2JSSRmk9wm/THVyVb6dUJ8mo3ta3xFu9Ze72a+JKzm5FSjZb469mpvtP3VLBAT5 CtluSWOncXx+ts0ljgsNnovyaa6Pvk8= X-MC-Unique: 8LUAOALBMFqTdbmNKMdBdw-1 X-Mimecast-MFC-AGG-ID: 8LUAOALBMFqTdbmNKMdBdw_1792066939 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 12/21] hw/arm/aspeed_ast27x0: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:42 +0200 Message-ID: <20261015122151.889017-13-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066957461158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in AspeedSoCState. This made the variable names confusing. For example, AspeedSoCState has "udc" as an unimplemented device, but Aspeed2600SoCState also has "udc" as the real UDC model. Use the unimp_devs table in AspeedSoCClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST2700 to use them. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-5-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast27x0.c | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 6365dbd638b5..2ef29e31e9a5 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -24,10 +24,6 @@ #include "qobject/qlist.h" #include "qemu/log.h" =20 -#define AST2700_SOC_IO_SIZE 0x00FE0000 -#define AST2700_SOC_IOMEM_SIZE 0x01000000 -#define AST2700_SOC_DPMCU_SIZE 0x00040000 - static const hwaddr aspeed_soc_ast2700_memmap[] =3D { [ASPEED_DEV_VBOOTROM] =3D 0x00000000, [ASPEED_DEV_IOMEM] =3D 0x00020000, @@ -263,6 +259,14 @@ static const struct gic_intc_irq_info ast2700_gic_intc= map[] =3D { {201, 3, 1, ast2700_gic201_intcmap}, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast2700_unimp_devs[] =3D= { + { "dpmcu", "aspeed.dpmcu", 0x11000000, 0x00040000, -1000 }, + { "iomem", "aspeed.io", 0x00020000, 0x00FE0000, -1000 }, + { "iomem0", "aspeed.iomem0", 0x12000000, 0x01000000, -1000 }, + { "iomem1", "aspeed.iomem1", 0x14000000, 0x01000000, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast2700_get_irq(AspeedSoCState *s, int dev) { Aspeed27x0SoCState *a =3D ASPEED27X0_SOC(s); @@ -558,15 +562,6 @@ static void aspeed_soc_ast2700_init(Object *obj) qdev_prop_set_uint32(DEVICE(&s->ioexp[i]), "silicon-rev", sc->silicon_rev); } - - object_initialize_child(obj, "dpmcu", &s->dpmcu, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "iomem", &s->iomem, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "iomem0", &s->iomem0, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "iomem1", &s->iomem1, - TYPE_UNIMPLEMENTED_DEVICE); } =20 /* @@ -1137,22 +1132,8 @@ static void aspeed_soc_ast2700_realize(DeviceState *= dev, Error **errp) } } =20 - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->dpmcu), - "aspeed.dpmcu", - sc->memmap[ASPEED_DEV_DPMCU], - AST2700_SOC_DPMCU_SIZE); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem), - "aspeed.io", - sc->memmap[ASPEED_DEV_IOMEM], - AST2700_SOC_IO_SIZE); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem0), - "aspeed.iomem0", - sc->memmap[ASPEED_DEV_IOMEM0], - AST2700_SOC_IOMEM_SIZE); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem1), - "aspeed.iomem1", - sc->memmap[ASPEED_DEV_IOMEM1], - AST2700_SOC_IOMEM_SIZE); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); } =20 static void aspeed_soc_ast2700a1_class_init(ObjectClass *oc, const void *d= ata) @@ -1183,6 +1164,7 @@ static void aspeed_soc_ast2700a1_class_init(ObjectCla= ss *oc, const void *data) sc->uarts_base =3D ASPEED_DEV_UART0; sc->irqmap =3D aspeed_soc_ast2700a1_irqmap; sc->memmap =3D aspeed_soc_ast2700_memmap; + sc->unimp_devs =3D aspeed_soc_ast2700_unimp_devs; } =20 static void aspeed_soc_ast2700a2_class_init(ObjectClass *oc, const void *d= ata) @@ -1213,6 +1195,7 @@ static void aspeed_soc_ast2700a2_class_init(ObjectCla= ss *oc, const void *data) sc->uarts_base =3D ASPEED_DEV_UART0; sc->irqmap =3D aspeed_soc_ast2700a1_irqmap; sc->memmap =3D aspeed_soc_ast2700_memmap; + sc->unimp_devs =3D aspeed_soc_ast2700_unimp_devs; } =20 static const TypeInfo aspeed_soc_ast27x0_types[] =3D { --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066990; cv=none; d=zohomail.com; s=zohoarc; b=m3L6aEnngdqpHmquFPSS8jFIQhr9dqmBMul+7W2uhIes43PAjJ3Ep4WQNyNwWCGgSqXPzBBiknVTaifLnZWW9AeTZCW46VggzmWa4S/Z5HtFQ5hrsBamBHb+bBUYyfV1MUbXTSMANRSpF2ePwBODwcv357L5Yy0kb7Z9FptLc04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066990; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TdSDI4L0PkUyATVEQukscE+KxGua2cTbmsX02E7F6Kc=; b=B4LdQHhQybtOzzehpThDUBhzu1Q7f+dd83i/JNtI2L+vU9RkTlgd/69lGkjHuMvMgNkUf/0a+RocctFY2jxWn42uPq969ta75Ax0H3ypNL3CIPhnisuo7qpiMpnqZlgN5LO1Fw7pLNMDNZTvSbeZ8jn1MRwVxVMk25iFePLwnF4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066990477419.6859721445619; Thu, 15 Oct 2026 05:23:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTi-0006MD-Q2; Thu, 15 Oct 2026 08:22:36 -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 1xHKTc-00065N-Dd for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTa-0005dN-Bd for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:28 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-utoW-PNDPrOLLkUlEonxYg-1; Thu, 15 Oct 2026 12:22:22 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 63A8F1956076; Thu, 15 Oct 2026 12:22:21 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BC3907D8; Thu, 15 Oct 2026 12:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TdSDI4L0PkUyATVEQukscE+KxGua2cTbmsX02E7F6Kc=; b=MISqT0+KBKhGFlKbTg5Trj2gpOA65B8/Pu1y7Fobnw1kSIb+NyJwIg5FHyhQD+l7T0oY2J fRjlmLZDlTWmggmwN3UvEwzTJy1VxsdatFLxcxeOdasZyAhW3aSl8rIFGXnLtZrXSxWChv G6aslIY9FMw9Amlq9YAdwbCaP8kbJk8= X-MC-Unique: utoW-PNDPrOLLkUlEonxYg-1 X-Mimecast-MFC-AGG-ID: utoW-PNDPrOLLkUlEonxYg_1792066941 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 13/21] hw/arm/aspeed_ast10x0: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:43 +0200 Message-ID: <20261015122151.889017-14-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066992212158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in AspeedSoCState. This made the variable names confusing. For example, AspeedSoCState has "udc" as an unimplemented device, but Aspeed2600SoCState also has "udc" as the real UDC model. Use the unimp_devs table in AspeedSoCClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST1030/AST1060 to use them. This also fixes a type mismatch. AST10x0 used the "pwm" field (AspeedPWMState) and the "sgpiom" field (AspeedSGPIOState array) to create unimplemented devices. They are not used for that anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-6-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast10x0.c | 55 +++++++++++------------------------------ 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index aeb5a4423dd3..07908597351a 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -17,8 +17,6 @@ #include "hw/misc/unimp.h" #include "hw/arm/aspeed_soc.h" =20 -#define ASPEED_SOC_IOMEM_SIZE 0x00200000 - static const hwaddr aspeed_soc_ast1030_memmap[] =3D { [ASPEED_DEV_SRAM0] =3D 0x00000000, [ASPEED_DEV_SRAM1] =3D 0x79000000, /* SEC SRAM */ @@ -99,6 +97,17 @@ static const int aspeed_soc_ast1030_irqmap[] =3D { [ASPEED_DEV_JTAG1] =3D 53, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast10x0_unimp_devs[] =3D= { + { "iomem", "aspeed.io", 0x7E600000, 0x00200000, -1000 }, + { "pwm", "aspeed.pwm", 0x7E610000, 0x100, -1000 }, + { "espi", "aspeed.espi", 0x7E6EE000, 0x800, -1000 }, + { "udc", "aspeed.udc", 0x7E6A2000, 0x1000, -1000 }, + { "sgpiom", "aspeed.sgpiom", 0x7E780500, 0x100, -1000 }, + { "jtag[0]", "aspeed.jtag0", 0x7E6E4000, 0x20, -1000 }, + { "jtag[1]", "aspeed.jtag1", 0x7E6E4100, 0x20, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast1030_get_irq(AspeedSoCState *s, int dev) { Aspeed10x0SoCState *a =3D ASPEED10X0_SOC(s); @@ -161,17 +170,6 @@ static void aspeed_soc_ast10x0_init(Object *obj, const= char *socname) =20 snprintf(typename, sizeof(typename), "aspeed.hace-%s", socname); object_initialize_child(obj, "hace", &s->hace, typename); - - object_initialize_child(obj, "iomem", &s->iomem, TYPE_UNIMPLEMENTED_DE= VICE); - object_initialize_child(obj, "pwm", &s->pwm, TYPE_UNIMPLEMENTED_DEVICE= ); - object_initialize_child(obj, "espi", &s->espi, TYPE_UNIMPLEMENTED_DEVI= CE); - object_initialize_child(obj, "udc", &s->udc, TYPE_UNIMPLEMENTED_DEVICE= ); - object_initialize_child(obj, "sgpiom", &s->sgpiom, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "jtag[0]", &s->jtag[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "jtag[1]", &s->jtag[1], - TYPE_UNIMPLEMENTED_DEVICE); } =20 static void aspeed_soc_ast1030_init(Object *obj) @@ -215,11 +213,8 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCSt= ate *a, Error **errp) return false; } =20 - /* General I/O memory space to catch all unimplemented device */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->iomem), - "aspeed.io", - sc->memmap[ASPEED_DEV_IOMEM], - ASPEED_SOC_IOMEM_SIZE); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); /* AST10x0 CPU Core */ armv7m =3D DEVICE(&a->armv7m); qdev_prop_set_uint32(armv7m, "num-irq", 256); @@ -394,28 +389,6 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCSt= ate *a, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio), 0, aspeed_soc_ast1030_get_irq(s, ASPEED_DEV_GPIO)); =20 - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->pwm), - "aspeed.pwm", - sc->memmap[ASPEED_DEV_PWM], 0x100); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->espi), - "aspeed.espi", - sc->memmap[ASPEED_DEV_ESPI], 0x800); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->udc), - "aspeed.udc", - sc->memmap[ASPEED_DEV_UDC], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->sgpiom), - "aspeed.sgpiom", - sc->memmap[ASPEED_DEV_SGPIOM0], 0x100); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[0]), - "aspeed.jtag", - sc->memmap[ASPEED_DEV_JTAG0], 0x20); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[1]), - "aspeed.jtag", - sc->memmap[ASPEED_DEV_JTAG1], 0x20); - return true; } =20 @@ -503,6 +476,7 @@ static void aspeed_soc_ast1030_class_init(ObjectClass *= klass, const void *data) sc->uarts_base =3D ASPEED_DEV_UART1; sc->irqmap =3D aspeed_soc_ast1030_irqmap; sc->memmap =3D aspeed_soc_ast1030_memmap; + sc->unimp_devs =3D aspeed_soc_ast10x0_unimp_devs; sc->num_cpus =3D 1; } =20 @@ -529,6 +503,7 @@ static void aspeed_soc_ast1060_class_init(ObjectClass *= klass, const void *data) sc->uarts_base =3D ASPEED_DEV_UART5; sc->irqmap =3D aspeed_soc_ast1030_irqmap; sc->memmap =3D aspeed_soc_ast1030_memmap; + sc->unimp_devs =3D aspeed_soc_ast10x0_unimp_devs; sc->num_cpus =3D 1; } =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067002; cv=none; d=zohomail.com; s=zohoarc; b=dldxSBu7npyplqAKWh49xMQlNdbmHto/BTSbIla6QM99UQ7PiIaR1CdiraLjJX6TlgRAmYbMcG6XqiuRJleQYDBnaW29pha4yj2tzC1mm3SRRuNkseZcWeHMVUnKIPfAH7X0NIFICw41kqWby3HT2fqTkmYmYn6sVZezNCoVoO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067002; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PRxtsBUaS7eHPjNmFbqad0JSrWMq5v0udk1YgsjAYcY=; b=j0NAqhd1P0ySa6rfyURCigawJsHqTvHmqCIiHixI+X81Cf2I/x85s9Dh2u33kb8f06T+tUk9dFrubFE0rMgYG6MYsr6m/UU4nbQjhWkGvZRaaKeddR/EymZ/6wGb5vivW/I21R/mZvDI1wcIDUTr2XcAwV7ZFExBNKH0ypypi2A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067002145332.7211463003074; Thu, 15 Oct 2026 05:23:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKTu-0006Y7-53; Thu, 15 Oct 2026 08:22:47 -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 1xHKTd-0006DO-Tt for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTa-0005dV-V6 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:29 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-332-m9Yy6YsePLGWm4VhgaC5Tg-1; Thu, 15 Oct 2026 12:22:24 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 762EF1955DBD; Thu, 15 Oct 2026 12:22:23 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CEE087D8; Thu, 15 Oct 2026 12:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PRxtsBUaS7eHPjNmFbqad0JSrWMq5v0udk1YgsjAYcY=; b=Vz4wELBqEp1tBhVHRCMDDQz80xygvQck422uoeOWH0M5VR+LLL5akIinBk2BmzqiJ8cRIE KFyh6szBPfT3JkAKNevKig148HKrWUnF4CfPrDi0DfKQnNlah51aPO5nKP8wJgp3FClSZ9 mYXrXz1TcLQwQpAq9cZ9iVpwaSnix18= X-MC-Unique: m9Yy6YsePLGWm4VhgaC5Tg-1 X-Mimecast-MFC-AGG-ID: m9Yy6YsePLGWm4VhgaC5Tg_1792066943 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 14/21] hw/arm/aspeed_ast1040: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:44 +0200 Message-ID: <20261015122151.889017-15-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067004342158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in AspeedSoCState. This made the variable names confusing. For example, AspeedSoCState has "udc" as an unimplemented device, but Aspeed2600SoCState also has "udc" as the real UDC model. Use the unimp_devs table in AspeedSoCClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST1040 to use them. This also fixes a type mismatch. AST1040 used the "pwm" field (AspeedPWMState) to create an unimplemented device. It is not used for that anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-7-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast1040.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/hw/arm/aspeed_ast1040.c b/hw/arm/aspeed_ast1040.c index 57ffc0807ab7..0b078f10c403 100644 --- a/hw/arm/aspeed_ast1040.c +++ b/hw/arm/aspeed_ast1040.c @@ -81,6 +81,15 @@ static const int aspeed_soc_ast1040_irqmap[] =3D { [ASPEED_DEV_PECI] =3D 164, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast1040_unimp_devs[] =3D= { + { "pwm", "aspeed.pwm", 0x740C0000, 0x10000, -1000 }, + { "espi", "aspeed.espi", 0x74C05000, 0x1000, -1000 }, + { "udc", "aspeed.udc", 0x74120000, 0x4000, -1000 }, + { "jtag[0]", "aspeed.jtag0", 0x74C01000, 0x100, -1000 }, + { "jtag[1]", "aspeed.jtag1", 0x74C09000, 0x100, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast1040_get_irq(AspeedSoCState *s, int dev) { Aspeed10x0SoCState *a =3D ASPEED10X0_SOC(s); @@ -123,14 +132,6 @@ static void aspeed_soc_ast1040_init(Object *obj) object_initialize_child(obj, "wdt[*]", &s->wdt[i], "aspeed.wdt-ast2700"); } - - object_initialize_child(obj, "pwm", &s->pwm, TYPE_UNIMPLEMENTED_DEVICE= ); - object_initialize_child(obj, "espi", &s->espi, TYPE_UNIMPLEMENTED_DEVI= CE); - object_initialize_child(obj, "udc", &s->udc, TYPE_UNIMPLEMENTED_DEVICE= ); - object_initialize_child(obj, "jtag[0]", &s->jtag[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "jtag[1]", &s->jtag[1], - TYPE_UNIMPLEMENTED_DEVICE); } =20 static void aspeed_soc_ast1040_realize(DeviceState *dev_soc, Error **errp) @@ -267,26 +268,8 @@ static void aspeed_soc_ast1040_realize(DeviceState *de= v_soc, Error **errp) aspeed_mmio_map(s->memory, SYS_BUS_DEVICE(&s->wdt[i]), 0, wdt_offs= et); } =20 - /* Unimplemented peripherals */ - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->pwm), - "aspeed.pwm", - sc->memmap[ASPEED_DEV_PWM], 0x10000); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->espi), - "aspeed.espi", - sc->memmap[ASPEED_DEV_ESPI], 0x1000); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->udc), - "aspeed.udc", - sc->memmap[ASPEED_DEV_UDC], 0x4000); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[0]), - "aspeed.jtag0", - sc->memmap[ASPEED_DEV_JTAG0], 0x100); - - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[1]), - "aspeed.jtag1", - sc->memmap[ASPEED_DEV_JTAG1], 0x100); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); } =20 static void aspeed_soc_ast1040_class_init(ObjectClass *klass, const void *= data) @@ -312,6 +295,7 @@ static void aspeed_soc_ast1040_class_init(ObjectClass *= klass, const void *data) sc->uarts_base =3D ASPEED_DEV_UART0; sc->irqmap =3D aspeed_soc_ast1040_irqmap; sc->memmap =3D aspeed_soc_ast1040_memmap; + sc->unimp_devs =3D aspeed_soc_ast1040_unimp_devs; sc->num_cpus =3D 1; } =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067098; cv=none; d=zohomail.com; s=zohoarc; b=OYFeEBselIG+CVEfWEIFNt1R4pbylYFeglVLbvS+X8B5ams5ZrvKGjRooas7jRXqlUf9+CyJJ1UWbMS332P8x+tTMYeO9702Kh9jFLR66XXGFf+wO64qKqMytpfFWLhT88IDOnubrtAFG38wGypGBZhoExlx2ahfYUuEe2hgDrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067098; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fxlJtqmlJvIWo994dWX3nFn/piew3FHGHM33tiIRTdI=; b=KWuv9ZEeRsc2c3pPJUdJ+TELpYP+OqBCG0F8N/Kkkor1dLiRViCaTQXbdIHTCQcKpD+A/O7LWaXJ9zpH5EFfdhI4NUMlAekgu3DCsnSN0NW/NDMlb6iyOb+6fFAWVMZvpu6JyM2py95xlrs2pWxPCKuIXntaM4FJTGaL+4kiZ8w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067098585644.893877526899; Thu, 15 Oct 2026 05:24:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKU1-0006nl-8l; Thu, 15 Oct 2026 08:22:53 -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 1xHKTe-0006H6-MF for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTc-0005e2-Mw for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:30 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661--0Jaii1oPcuvzwXwqu9wug-1; Thu, 15 Oct 2026 12:22:26 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 898E61955F78; Thu, 15 Oct 2026 12:22:25 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E2B8A7D5; Thu, 15 Oct 2026 12:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fxlJtqmlJvIWo994dWX3nFn/piew3FHGHM33tiIRTdI=; b=Y0yb/+zAe9XlPpmkz0aElOLWVhQ/Cq38joojjO0Fz8PgmWH4kH1YccWM5iYcsix1EV7zrV +gDMTuxy2cTE+Ivj8Om5VJQTNW954i4N8vZsXmRI0YQkZsNjfuZLdh+xAN8ZtpBIE9dD1g 5gPd0tZ0dxVb/6Zwr8Byq3OzwDOxzQg= X-MC-Unique: -0Jaii1oPcuvzwXwqu9wug-1 X-Mimecast-MFC-AGG-ID: -0Jaii1oPcuvzwXwqu9wug_1792066945 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 15/21] hw/arm/aspeed: Remove unused unimplemented device fields Date: Thu, 15 Oct 2026 14:21:45 +0200 Message-ID: <20261015122151.889017-16-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067100194158500 From: Jamin Lin All Aspeed SoCs now use the unimp_devs table and create_unimplemented_devices() for their unimplemented devices. Remove the old fields in AspeedSoCState and the ASPEED_JTAG_NUM define, which are not used anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-8-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 82e394f08539..b47ac5aa05b5 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -59,7 +59,6 @@ #define ASPEED_CPUS_NUM 4 #define ASPEED_MACS_NUM 4 #define ASPEED_UARTS_NUM 13 -#define ASPEED_JTAG_NUM 2 #define ASPEED_PCIE_NUM 3 #define ASPEED_INTC_NUM 2 #define ASPEED_IOEXP_NUM 2 @@ -110,15 +109,6 @@ struct AspeedSoCState { AspeedPECIState peci; SerialMM uart[ASPEED_UARTS_NUM]; Clock *sysclk; - UnimplementedDeviceState iomem; - UnimplementedDeviceState iomem0; - UnimplementedDeviceState iomem1; - UnimplementedDeviceState video; - UnimplementedDeviceState emmc_boot_controller; - UnimplementedDeviceState dpmcu; - UnimplementedDeviceState espi; - UnimplementedDeviceState udc; - UnimplementedDeviceState jtag[ASPEED_JTAG_NUM]; AspeedAPB2OPBState fsi[2]; AspeedLTPIState ltpi_ctrl[ASPEED_IOEXP_NUM]; AspeedAST1700SoCState ioexp[ASPEED_IOEXP_NUM]; --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067070; cv=none; d=zohomail.com; s=zohoarc; b=Hywm69r/aRPPBkRcJZOeTSZNs2UOoiI/H2PQRt2a3aLdi7DLFa4UwL1pc3LGCb2OkhyfMJKh1hOflKknlf9QINz/ZI3x1cMXsf8hLHHc3vzz5d7gzBZ29NW9dBCj0gPnlAYtsBTZ81PRZ++GXecKxrZoFzWO5f9FVPYqorEEhWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067070; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YFIBgtDCaNxYpIAuZmZT+o2i8lKi8DgRaHj9/8zUWsY=; b=OwQG/QmKRHhxvA/Xjv3C/Sro/Qw4gcoaIzBoB3T2uZmrXdKUuQjwKMsyoPdl3RNfkVTTmlZrHPH6NFu6q6+sc6iDIipJbS9g47wCGLvO6QIWDbY8mOozX42pbbSzgZ0pIdjOhd9Zj1CIUEl9Drqg2VSe6Xnd5yXlSDtZ0UsqGj4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067070678339.6536631327989; Thu, 15 Oct 2026 05:24:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKU2-0006uz-DH; Thu, 15 Oct 2026 08:22:54 -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 1xHKTl-0006U5-Sf for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTh-0005fN-0P for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:36 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-12-NNSOfFDjP2eg45-Fih47LQ-1; Thu, 15 Oct 2026 12:22:28 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE2351955E95; Thu, 15 Oct 2026 12:22:27 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 026637D8; Thu, 15 Oct 2026 12:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YFIBgtDCaNxYpIAuZmZT+o2i8lKi8DgRaHj9/8zUWsY=; b=AXsJaHI/plkdRk/uvaRXzRFGbGEmGpi+rBgp+5MXJPLBcbVMxAvvy0Nzy+RKamKE5oVLRd bCIlPJaszDTijCVMtEhAWAPxAG/A5aKaoDUshP1RHhPbj4fW8QHIM7DmEReSkC4kZhS+6H +e0Cf7YzabfKa7YptqIXt99eDGoA9rg= X-MC-Unique: NNSOfFDjP2eg45-Fih47LQ-1 X-Mimecast-MFC-AGG-ID: NNSOfFDjP2eg45-Fih47LQ_1792066947 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 16/21] hw/arm/aspeed_ast27x0: Use a table for unimplemented devices for SSP/TSP Date: Thu, 15 Oct 2026 14:21:46 +0200 Message-ID: <20261015122151.889017-17-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067071842158500 From: Jamin Lin Before this change, each unimplemented device needed its own field in the coprocessor state. This made the code hard to maintain. Add an unimp_devs table in AspeedCoprocessorClass to describe the unimplemented devices, and use create_unimplemented_devices() to create and map them. This makes the code easier to maintain and read. Convert AST2700 SSP and TSP to use them. This also fixes a type mismatch. SSP and TSP used the "timerctrl" field (AspeedTimerCtrlState) to create an unimplemented device. It is not used for that anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-9-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_coprocessor.h | 1 + hw/arm/aspeed_ast27x0-ssp.c | 44 +++++++++-------------------- hw/arm/aspeed_ast27x0-tsp.c | 44 +++++++++-------------------- 3 files changed, 27 insertions(+), 62 deletions(-) diff --git a/include/hw/arm/aspeed_coprocessor.h b/include/hw/arm/aspeed_co= processor.h index acb8b0645777..39209d2579f7 100644 --- a/include/hw/arm/aspeed_coprocessor.h +++ b/include/hw/arm/aspeed_coprocessor.h @@ -37,6 +37,7 @@ struct AspeedCoprocessorClass { /** valid_cpu_types: NULL terminated array of a single CPU type. */ const char * const *valid_cpu_types; const hwaddr *memmap; + const UnimplementedDeviceConfig *unimp_devs; const int *irqmap; }; =20 diff --git a/hw/arm/aspeed_ast27x0-ssp.c b/hw/arm/aspeed_ast27x0-ssp.c index e03653086c88..0238dc36725f 100644 --- a/hw/arm/aspeed_ast27x0-ssp.c +++ b/hw/arm/aspeed_ast27x0-ssp.c @@ -101,6 +101,16 @@ static struct nvic_intc_irq_info ast2700_ssp_intcmap[]= =3D { {169, 1, 9, NULL}, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast27x0ssp_unimp_devs[] = =3D { + { "timerctrl", "aspeed.timerctrl", 0x72C10000, 0x200, -1000 }, + { "ipc0", "aspeed.ipc0", 0x72C1C000, 0x1000, -1000 }, + { "ipc1", "aspeed.ipc1", 0x74C39000, 0x1000, -1000 }, + { "pric0", "aspeed.pric0", 0x72140000, 0x1000, -1000 }, + { "pric1", "aspeed.pric1", 0x74100000, 0x1000, -1000 }, + { "otp", "aspeed.otp", 0x74C07000, 0x800, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast27x0ssp_get_irq(AspeedCoprocessorState *s, int dev) { @@ -136,19 +146,6 @@ static void aspeed_soc_ast27x0ssp_init(Object *obj) TYPE_ASPEED_2700SSP_INTC); object_initialize_child(obj, "intc1", &a->intc[1], TYPE_ASPEED_2700SSP_INTCIO); - - object_initialize_child(obj, "timerctrl", &s->timerctrl, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "ipc0", &a->ipc[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "ipc1", &a->ipc[1], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "pric0", &a->pric[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "pric1", &a->pric[1], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "otp", &a->otp, - TYPE_UNIMPLEMENTED_DEVICE); } =20 static void aspeed_soc_ast27x0ssp_realize(DeviceState *dev_soc, Error **er= rp) @@ -283,24 +280,8 @@ static void aspeed_soc_ast27x0ssp_realize(DeviceState = *dev_soc, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_FMC], &a->fmc_alias); =20 - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->timerctrl), - "aspeed.timerctrl", - sc->memmap[ASPEED_DEV_TIMER1], 0x200); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->ipc[0]), - "aspeed.ipc0", - sc->memmap[ASPEED_DEV_IPC0], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->ipc[1]), - "aspeed.ipc1", - sc->memmap[ASPEED_DEV_IPC1], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->pric[0]), - "aspeed.pric0", - sc->memmap[ASPEED_DEV_PRIC0], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->pric[1]), - "aspeed.pric1", - sc->memmap[ASPEED_DEV_PRIC1], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->otp), - "aspeed.otp", - sc->memmap[ASPEED_DEV_OTP], 0x800); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); } =20 static const Property aspeed_27x0_coprocessor_properties[] =3D { @@ -330,6 +311,7 @@ static void aspeed_soc_ast27x0ssp_class_init(ObjectClas= s *klass, sc->valid_cpu_types =3D valid_cpu_types; sc->irqmap =3D aspeed_soc_ast27x0ssp_irqmap; sc->memmap =3D aspeed_soc_ast27x0ssp_memmap; + sc->unimp_devs =3D aspeed_soc_ast27x0ssp_unimp_devs; } =20 static const TypeInfo aspeed_soc_ast27x0ssp_types[] =3D { diff --git a/hw/arm/aspeed_ast27x0-tsp.c b/hw/arm/aspeed_ast27x0-tsp.c index 39ba062a20f7..7f057ff1357d 100644 --- a/hw/arm/aspeed_ast27x0-tsp.c +++ b/hw/arm/aspeed_ast27x0-tsp.c @@ -101,6 +101,16 @@ static struct nvic_intc_irq_info ast2700_tsp_intcmap[]= =3D { {169, 1, 9, NULL}, }; =20 +static const UnimplementedDeviceConfig aspeed_soc_ast27x0tsp_unimp_devs[] = =3D { + { "timerctrl", "aspeed.timerctrl", 0x72C10000, 0x200, -1000 }, + { "ipc0", "aspeed.ipc0", 0x72C1C000, 0x1000, -1000 }, + { "ipc1", "aspeed.ipc1", 0x74C39000, 0x1000, -1000 }, + { "pric0", "aspeed.pric0", 0x72140000, 0x1000, -1000 }, + { "pric1", "aspeed.pric1", 0x74100000, 0x1000, -1000 }, + { "otp", "aspeed.otp", 0x74C07000, 0x800, -1000 }, + { } +}; + static qemu_irq aspeed_soc_ast27x0tsp_get_irq(AspeedCoprocessorState *s, int dev) { @@ -136,19 +146,6 @@ static void aspeed_soc_ast27x0tsp_init(Object *obj) TYPE_ASPEED_2700TSP_INTC); object_initialize_child(obj, "intc1", &a->intc[1], TYPE_ASPEED_2700TSP_INTCIO); - - object_initialize_child(obj, "timerctrl", &s->timerctrl, - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "ipc0", &a->ipc[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "ipc1", &a->ipc[1], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "pric0", &a->pric[0], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "pric1", &a->pric[1], - TYPE_UNIMPLEMENTED_DEVICE); - object_initialize_child(obj, "otp", &a->otp, - TYPE_UNIMPLEMENTED_DEVICE); } =20 static void aspeed_soc_ast27x0tsp_realize(DeviceState *dev_soc, Error **er= rp) @@ -283,24 +280,8 @@ static void aspeed_soc_ast27x0tsp_realize(DeviceState = *dev_soc, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_FMC], &a->fmc_alias); =20 - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->timerctrl), - "aspeed.timerctrl", - sc->memmap[ASPEED_DEV_TIMER1], 0x200); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->ipc[0]), - "aspeed.ipc0", - sc->memmap[ASPEED_DEV_IPC0], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->ipc[1]), - "aspeed.ipc1", - sc->memmap[ASPEED_DEV_IPC1], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->pric[0]), - "aspeed.pric0", - sc->memmap[ASPEED_DEV_PRIC0], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->pric[1]), - "aspeed.pric1", - sc->memmap[ASPEED_DEV_PRIC1], 0x1000); - aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->otp), - "aspeed.otp", - sc->memmap[ASPEED_DEV_OTP], 0x800); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), s->memory, sc->unimp_devs); } =20 static const Property aspeed_27x0_coprocessor_properties[] =3D { @@ -330,6 +311,7 @@ static void aspeed_soc_ast27x0tsp_class_init(ObjectClas= s *klass, sc->valid_cpu_types =3D valid_cpu_types; sc->irqmap =3D aspeed_soc_ast27x0tsp_irqmap; sc->memmap =3D aspeed_soc_ast27x0tsp_memmap; + sc->unimp_devs =3D aspeed_soc_ast27x0tsp_unimp_devs; } =20 static const TypeInfo aspeed_soc_ast27x0tsp_types[] =3D { --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067084; cv=none; d=zohomail.com; s=zohoarc; b=Bv8Fe3V1VryPcAyxIkZSzK1TI1aWoKvop/RHmMWc8xnrRUYPLt11VQKM41KsGYxmca+GErSgjBIa3Z5S7UoHAKyHw92ufXbq0t7+sJPSQv3BPTcg4G2IfDz6Tl45N3Nwg7NJ1Fm3nhv3APfFI/KwkyaL9SwN/21oVXcF32UTa7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067084; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=L+pCCnEgPhvPJWxC46aYdxnrRJxhBOMIDhPY1Ys9Vx0=; b=nenEZJaMma1IIv5M6DdnzwcQB5dpK4lRjLEVN1A9qH1UXIWVkZmqn0vMYULi/OU9Rmaqi1RNX8W6XKFEP+e0NXNhKvzypZEEaDLZVvMpyzYNlNyM39xHP9htAVvGMRaSDYWnS2F5Vog2hDsXveKIpKULvZ/lmI9SbbbjZGp05Ac= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067084051938.9584963015137; Thu, 15 Oct 2026 05:24:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKUG-00089W-PP; Thu, 15 Oct 2026 08:23:09 -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 1xHKTk-0006TJ-Pi for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTh-0005fK-1U for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:36 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-neM_GwiTOBSi3Pqf3MxiKg-1; Thu, 15 Oct 2026 12:22:30 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E36BD1800BCC; Thu, 15 Oct 2026 12:22:29 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 469707D9; Thu, 15 Oct 2026 12:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L+pCCnEgPhvPJWxC46aYdxnrRJxhBOMIDhPY1Ys9Vx0=; b=YxkS5gmE1YnHUhsD6EBeGr3+Fxa275mP+uvRnPMHRYAY4a9m2i2nKbDJaxNV9VfMPtDnBF zD7a6n8+gcpHGHFAIHfcq/7PInrCOjOCC+qLFUDpyifzHqGGza738pPSICuu29xd+P+4p4 Q+e/Dp3K4vhGXc/RsxhGhOOBZ530jg0= X-MC-Unique: neM_GwiTOBSi3Pqf3MxiKg-1 X-Mimecast-MFC-AGG-ID: neM_GwiTOBSi3Pqf3MxiKg_1792066950 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 17/21] hw/arm/aspeed_coprocessor: Remove unused unimplemented device fields Date: Thu, 15 Oct 2026 14:21:47 +0200 Message-ID: <20261015122151.889017-18-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, 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_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067085937158500 From: Jamin Lin AST2700 SSP and TSP now use the unimp_devs table and create_unimplemented_devices() for their unimplemented devices. Remove the old "ipc", "pric" and "otp" fields in Aspeed27x0CoprocessorState and the "timerctrl" field in AspeedCoprocessorState, which are not used anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-10-jamin_li= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_coprocessor.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/hw/arm/aspeed_coprocessor.h b/include/hw/arm/aspeed_co= processor.h index 39209d2579f7..b0d72f916383 100644 --- a/include/hw/arm/aspeed_coprocessor.h +++ b/include/hw/arm/aspeed_coprocessor.h @@ -22,7 +22,6 @@ struct AspeedCoprocessorState { MemoryRegion uart_alias; Clock *sysclk; =20 - AspeedTimerCtrlState timerctrl; SerialMM *uart; int uart_dev; }; @@ -44,9 +43,6 @@ struct AspeedCoprocessorClass { struct Aspeed27x0CoprocessorState { AspeedCoprocessorState parent; AspeedINTCState intc[2]; - UnimplementedDeviceState ipc[2]; - UnimplementedDeviceState pric[2]; - UnimplementedDeviceState otp; =20 ARMv7MState armv7m; =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067051; cv=none; d=zohomail.com; s=zohoarc; b=dyEwxzl2YRtH4eCJbCAfwDDDRB+VmC+yXUURhv7VoIUc2FM8O9K+aa2w8oBp+y7rgp84PNEzITGwHecnGE38ChTUmUqCGPn2l6JmoDnvPuNs6eTC6qd8FT/7NiE54UOzu+uAZ/63Ur25qKfDRPd5TjZWrXGrmcylVz9z7Ujq+/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067051; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F2Rrm6IKlaaZDhpA4W1gPO4DprvlkUlCAXvj1bF7xBY=; b=ZBM1F8gQuMbfMGKRGrpnXOUYuo3QIqO99Q4+mWPzvi8i9te9r9PeoZQ1Sf3cYUmeYgRhji79b1wWooO4XqJ2CLBPpMPWUtW4b72zx2gfeBIv8b4fSBm0KDK7kxWF5n79YUg8RyXUYyygxhEBo/QUsh5flrvijr6MdhEQV4/aQOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067051114627.656490357511; Thu, 15 Oct 2026 05:24:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKU8-0007bh-Kx; Thu, 15 Oct 2026 08:23:00 -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 1xHKTu-0006bI-8L for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTs-0005hY-4Y for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:45 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-175-nAWUEcxoNgqHDjbiXKryMA-1; Thu, 15 Oct 2026 12:22:33 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 042781955F1D; Thu, 15 Oct 2026 12:22:32 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5946E7D9; Thu, 15 Oct 2026 12:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F2Rrm6IKlaaZDhpA4W1gPO4DprvlkUlCAXvj1bF7xBY=; b=CEMXAPdl6NusM1OT2vmimqM1rhTSDlVNOxAXxHpXhqZSvEiyk6VMoKq5yzkiFgyk17dvTt FVNjU7mglhrvW76bwlBF/w4YY3V7D6yqtNTo4tPeeE/wketilmOMgFb/plwmJlY6zhJx6h 5V1XG+wSpk3NZbF/vxh1DCPx3AqgEk0= X-MC-Unique: nAWUEcxoNgqHDjbiXKryMA-1 X-Mimecast-MFC-AGG-ID: nAWUEcxoNgqHDjbiXKryMA_1792066952 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 18/21] hw/arm/aspeed_ast1700: Use a table for unimplemented devices Date: Thu, 15 Oct 2026 14:21:48 +0200 Message-ID: <20261015122151.889017-19-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067053376158500 From: Jamin Lin Before this change, the I3C unimplemented device of AST1700 needed its own field in AspeedAST1700SoCState and was created and mapped with open-coded calls. Describe it in a table and use create_unimplemented_devices() to create and map it in the AST1700 memory region. This makes the code easier to maintain and read. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-11-jamin_li= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast1700.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/arm/aspeed_ast1700.c b/hw/arm/aspeed_ast1700.c index 5af5da5b8a73..e5d5bf405623 100644 --- a/hw/arm/aspeed_ast1700.c +++ b/hw/arm/aspeed_ast1700.c @@ -15,7 +15,6 @@ =20 #define AST2700_SOC_LTPI_SIZE 0x01000000 #define AST1700_SOC_SRAM_SIZE 0x00040000 -#define AST1700_SOC_I3C_SIZE 0x00010000 =20 enum { ASPEED_AST1700_DEV_SPI0, @@ -51,6 +50,11 @@ static const hwaddr aspeed_ast1700_io_memmap[] =3D { [ASPEED_AST1700_DEV_SPI0_MEM] =3D 0x04000000, }; =20 +static const UnimplementedDeviceConfig aspeed_ast1700_unimp_devs[] =3D { + { "ioexp-i3c", "ioexp-i3c", 0x00C20000, 0x00010000, -1000 }, + { } +}; + static void aspeed_ast1700_realize(DeviceState *dev, Error **errp) { AspeedAST1700SoCState *s =3D ASPEED_AST1700(dev); @@ -181,14 +185,9 @@ static void aspeed_ast1700_realize(DeviceState *dev, E= rror **errp) sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->wdt[i]),= 0)); } =20 - /* I3C */ - qdev_prop_set_string(DEVICE(&s->i3c), "name", "ioexp-i3c"); - qdev_prop_set_uint64(DEVICE(&s->i3c), "size", AST1700_SOC_I3C_SIZE); - sysbus_realize(SYS_BUS_DEVICE(&s->i3c), errp); - memory_region_add_subregion_overlap(&s->iomem, - aspeed_ast1700_io_memmap[ASPEED_AST1700_DEV_I3C], - sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->i3c), 0), - -1000); + /* Unimplemented devices */ + create_unimplemented_devices(OBJECT(s), &s->iomem, + aspeed_ast1700_unimp_devs); } =20 static void aspeed_ast1700_instance_init(Object *obj) @@ -238,10 +237,6 @@ static void aspeed_ast1700_instance_init(Object *obj) &s->wdt[i], "aspeed.wdt-ast2700"); } =20 - /* I3C */ - object_initialize_child(obj, "ioexp-i3c", &s->i3c, - TYPE_UNIMPLEMENTED_DEVICE); - return; } =20 --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792066988; cv=none; d=zohomail.com; s=zohoarc; b=SZtmmgh/Kexz7LCyjkKtQLd1Z1CTSSSx3wohlVWUHLi/24ujY/YhwKrKWA5ZlDCL2CwECDhGG8+pwvwD9ec59LILLGqOsBMa8sRIBYHSfY5HzhL9q7cI0ybWYZ/bGbsOsZo2VGUXVTsWAxJuC71ltNqK1DmeUmz+vK54y/uyCw8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792066988; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x780Qwu4DyDPA0XrLdqR/NLP5zJS+gjx8v9Bh1RsCZs=; b=nyn++Bvvj0SFiYHznST1A4Aq8dPzv72fa5ztzHPhQiLTMcL5kWViyHS2Esz2ZwoyrcXgGAvx3vYFo7GbAeEB4oN35Ql17q2kRGqSp0wMyPGvTLSHRotgYjCvhYqdX+QZmpGjTXbJ2eNgHSShJ37W/vLMeaM5OtNYMoQZuDwpjls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792066988632994.2085236291083; Thu, 15 Oct 2026 05:23:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKUA-0007fG-7i; Thu, 15 Oct 2026 08:23:02 -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 1xHKTo-0006VI-UL for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTn-0005gh-4i for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:40 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-NqLboqnnNT2qsTPR9uQxFA-1; Thu, 15 Oct 2026 12:22:35 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 225671955E7B; Thu, 15 Oct 2026 12:22:34 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 718257D5; Thu, 15 Oct 2026 12:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x780Qwu4DyDPA0XrLdqR/NLP5zJS+gjx8v9Bh1RsCZs=; b=IELYWljOkv8S8TiVEUuXxpIXZ45IppBB9/Vuc25ZIl7VTwJobEZ8bzF0Dve0hEVsojAY3R xQWwtLeBv79vCmQPa9u8buo/zzCog46D5Dt7loJTrz+Mmanys2x4hyk8XUS/kgW4QwYKhd irc/f+rY7F2beg3uhQx97aixoh+kLio= X-MC-Unique: NqLboqnnNT2qsTPR9uQxFA-1 X-Mimecast-MFC-AGG-ID: NqLboqnnNT2qsTPR9uQxFA_1792066954 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 19/21] hw/arm/aspeed_ast1700: Remove unused unimplemented device field Date: Thu, 15 Oct 2026 14:21:49 +0200 Message-ID: <20261015122151.889017-20-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792066990174158500 From: Jamin Lin AST1700 now uses create_unimplemented_devices() for its unimplemented devices. Remove the old "i3c" field in AspeedAST1700SoCState, which is not used anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-12-jamin_li= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_ast1700.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/arm/aspeed_ast1700.h b/include/hw/arm/aspeed_ast170= 0.h index 39c5977cf109..d30483c88a69 100644 --- a/include/hw/arm/aspeed_ast1700.h +++ b/include/hw/arm/aspeed_ast1700.h @@ -47,8 +47,6 @@ struct AspeedAST1700SoCState { AspeedI2CState i2c; AspeedPWMState pwm; AspeedWDTState wdt[AST1700_WDT_NUM]; - - UnimplementedDeviceState i3c; }; =20 #endif /* ASPEED_AST1700_H */ --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067085; cv=none; d=zohomail.com; s=zohoarc; b=jjDwDsMphn6fP8FNUmnpO5ZsfzLH+i4k2Vt1aqKSj8NlPmF0Sgc2vsTnrmksOo4qbuFNTEgG5vLkE+hxV7mYGdt6pDOs2kRVFROG4kD/di5Mvx1TtyTbMxIq+91c+G3bYyAoTFgpijxVVqretnm3iB5j9VvDP/RcChpBF/0oR1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067085; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yUNerIV+Tay3eIz8ic0hFzW0xK9rX+Akwem+nb3nvEs=; b=Vow2R48uCVJYcdfXspi1WRX4iAN0Q5udjQ/VieJ8j6U/5kHVLQXhWM6fIbt7OV/YA4hfsSOmo0PJsz1R74GLojBnApEVhdkvRu3hiis2fBKAlD98OvJAeKYXC8yu68pbP5PNHbU3EBpSRPNWj7X4/IGiu13Pvsw+tofuSGFpZBs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792067085857825.3610563175781; Thu, 15 Oct 2026 05:24:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKUG-00083w-A1; Thu, 15 Oct 2026 08:23:08 -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 1xHKU3-00073p-M2 for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKU1-0005iq-Qn for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:55 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-110-KHgo0vEQPv6TIS3bUOB-vw-1; Thu, 15 Oct 2026 12:22:37 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5F0701956063; Thu, 15 Oct 2026 12:22:36 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8DD057D9; Thu, 15 Oct 2026 12:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yUNerIV+Tay3eIz8ic0hFzW0xK9rX+Akwem+nb3nvEs=; b=gSnlyVaaBNxMODjJv7EuMnQTwMQoWdiXp1EEHMzsblS7qHBDVQ5HGABdLcbGrqJO1bApmB cYLFCGhD7IVVFmrnCvbfH9k00yJS3gCZEslHsr+SSUjheNDWQl+Gv72U2hZyIVO12ZA78l VPhL2230ETWuEhIiSJDpTun4O7dmrzQ= X-MC-Unique: KHgo0vEQPv6TIS3bUOB-vw-1 X-Mimecast-MFC-AGG-ID: KHgo0vEQPv6TIS3bUOB-vw_1792066956 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 20/21] hw/arm/aspeed: Remove unused aspeed_mmio_map_unimplemented() Date: Thu, 15 Oct 2026 14:21:50 +0200 Message-ID: <20261015122151.889017-21-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067087962158500 From: Jamin Lin All Aspeed SoCs now use create_unimplemented_devices() to create and map their unimplemented devices. Remove aspeed_mmio_map_unimplemented(), which is not used anymore. No functional change. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20261012064445.2571633-13-jamin_li= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 3 --- hw/arm/aspeed_soc_common.c | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index b47ac5aa05b5..338496a4210a 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -307,9 +307,6 @@ void aspeed_soc_uart_set_chr(SerialMM *uart, int dev, i= nt uarts_base, bool aspeed_soc_dram_init(AspeedSoCState *s, Error **errp); void aspeed_mmio_map(MemoryRegion *memory, SysBusDevice *dev, int n, hwaddr addr); -void aspeed_mmio_map_unimplemented(MemoryRegion *memory, SysBusDevice *dev, - const char *name, hwaddr addr, - uint64_t size); void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype, unsigned int count, int unit0); void aspeed_write_boot_rom(BlockBackend *blk, hwaddr addr, size_t rom_size, diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c index fd08793575ab..54a128c96591 100644 --- a/hw/arm/aspeed_soc_common.c +++ b/hw/arm/aspeed_soc_common.c @@ -104,17 +104,6 @@ void aspeed_mmio_map(MemoryRegion *memory, SysBusDevic= e *dev, int n, memory_region_add_subregion(memory, addr, sysbus_mmio_get_region(dev, = n)); } =20 -void aspeed_mmio_map_unimplemented(MemoryRegion *memory, SysBusDevice *dev, - const char *name, hwaddr addr, uint64_t= size) -{ - qdev_prop_set_string(DEVICE(dev), "name", name); - qdev_prop_set_uint64(DEVICE(dev), "size", size); - sysbus_realize(dev, &error_abort); - - memory_region_add_subregion_overlap(memory, addr, - sysbus_mmio_get_region(dev, 0), -1= 000); -} - void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype, unsigned int count, int unit0) { --=20 2.56.0 From nobody Mon Nov 23 04:44:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1792067007; cv=none; d=zohomail.com; s=zohoarc; b=SnDaUaSRvRimmoDN4QTYnBer4sjGNwFfHh9IrOjEh/aZ8REf5lLti1LYoHzNCtmywD3I0V22XiHg3o2yYK272Da3p6lVCpfeRoQ06y61dDTPuN9uYEzyDFy0jAGXlXHKQKAzKX9ChjkBNdFxSpwjSBF9MeK50eHwUEVqUJMMkBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792067007; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C4yhV8gin0bBNvjAJGUiYpUCeI6/UNdoO79uPqOAcsk=; b=LW8/YGHO9p0fdS2JRWH32/hviHuN803VGeKChZB8RLI21O93aA974MIJKBEzu6MU+4vY3yzymhlqWyElPdYBXQu4ATxi7LFFCUxZKZeZ0WPZXNvx/HB9Ao6PJjetjwxGac5qV/baCzusNbzmRmdy1jqok9Bpy8BHh5+XCRQFO44= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17920670071051014.0463400313972; Thu, 15 Oct 2026 05:23:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHKUF-0007zm-4u; Thu, 15 Oct 2026 08:23:07 -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 1xHKTs-0006Zg-LA for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHKTr-0005hQ-0W for qemu-devel@nongnu.org; Thu, 15 Oct 2026 08:22:44 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-WUthmCK7MNS_2T8Jv2QMdQ-1; Thu, 15 Oct 2026 12:22:39 +0000 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2CFCA18011C8; Thu, 15 Oct 2026 12:22:38 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.48.67]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A2BB37D5; Thu, 15 Oct 2026 12:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792066962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4yhV8gin0bBNvjAJGUiYpUCeI6/UNdoO79uPqOAcsk=; b=QezCwLFTJlq0TjecGRDf4uV0OTlA3V8oKp3sk+qmwcnmBQ6nJ57dU0Wd46EON8Ammr1GM7 z1gxDc+oB6/OsHEWn7Zpi374vQSS9BQDXccVnefb7INxK9Mb2m6wTSxaUTNjsojApzhYWH E8v5yysTm7cWEABJzr2c8KlyRau2bOo= X-MC-Unique: WUthmCK7MNS_2T8Jv2QMdQ-1 X-Mimecast-MFC-AGG-ID: WUthmCK7MNS_2T8Jv2QMdQ_1792066958 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Emmanuel Blot , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 21/21] tests/functional: give the set_machine probe VM the test workdir Date: Thu, 15 Oct 2026 14:21:51 +0200 Message-ID: <20261015122151.889017-22-clg@redhat.com> In-Reply-To: <20261015122151.889017-1-clg@redhat.com> References: <20261015122151.889017-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1792067008410158500 From: Emmanuel Blot set_machine() launches a throwaway QEMUMachine to query the available machine types, but constructs it without base_temp_dir, so it falls back to the hardcoded "/var/tmp" default instead of the writable per-test workdir that the actual test VM already uses. Pass base_temp_dir=3D self.workdir for consistency; this also fixes VM launch on hosts where /var/tmp is not writable. Signed-off-by: Emmanuel Blot Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-= 17-1266926ba769@free.fr Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/testcase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index bf2dc1dc101c..d4aee359517d 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -317,7 +317,7 @@ def set_machine(self, machinename): cls =3D type(self) =20 if not hasattr(cls, "_machines"): - tmp_vm =3D QEMUMachine(self.qemu_bin) + tmp_vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.wor= kdir) tmp_vm.set_machine('none') =20 try: --=20 2.56.0