From nobody Sun Jul 26 10:07:30 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=1783428301; cv=none; d=zohomail.com; s=zohoarc; b=Y6VoyNPOimpkQhWnrjPRrhEqO1k5/oGXfiBB11IxffEenTbzmf5A0YQk2cf8xGBp1rUANjrNPMqeZdzdlpkKU+0tQD7rfk5CIWkjWi84hwaVhLtIHNNP5Dr3bwStPd0fucfX19iD2jjB9/7oXznTcziHhWgjIEhmWnxCLR5y3M4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428301; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Z7VbtoVtcB7Pklk2f0NaiOmxoo9lNE/C+tCZPnK01jY=; b=MeHBvUoX/v+us6tDh4DdyPZbZDRBsWSktr2mmI9Gp0hmryhlunscHVZTChKIayPrJbXBBY/xq0wpNJyGrpXDknRgbBhmpEvqTOfKFqFvwDzoPVx6MDllTdkE+uuB7VylqextXazuo/9Mnfb+Ospj582WHJfYiNGWAW9px3tfhBs= 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 1783428301540726.2848220958836; Tue, 7 Jul 2026 05:45:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59q-0006Yy-0r; Tue, 07 Jul 2026 08:44:14 -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 1wh59e-0006WK-Dv for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:03 -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 1wh59c-0005D2-Mz for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:02 -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-86-_9od1ohVO-mwoTTYQmXtBw-1; Tue, 07 Jul 2026 08:43:56 -0400 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 5C2C61953994; Tue, 7 Jul 2026 12:43:55 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4CD1036924; Tue, 7 Jul 2026 12:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428240; 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=Z7VbtoVtcB7Pklk2f0NaiOmxoo9lNE/C+tCZPnK01jY=; b=J1OCVcjRboxPveBI6AKr+VGFiTbDnTruttpXDEFlP3lj33YgwoR/4KqEFUG2kIiDFnpf9U flyZijHjflLwwhE3SCT0gZ5VfRN8J4a4HAk8KUQ63TF326Wlgg/ZmO+tKrY4UTRnAW3m9D z3S3OiwoijX5ijM0KRgZAdUZvCyIlGA= X-MC-Unique: _9od1ohVO-mwoTTYQmXtBw-1 X-Mimecast-MFC-AGG-ID: _9od1ohVO-mwoTTYQmXtBw_1783428235 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jian Zhang , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 1/8] hw/intc/aspeed: Drop stale pending interrupts Date: Tue, 7 Jul 2026 14:43:42 +0200 Message-ID: <20260707124349.662198-2-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=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: 1783428302841158500 From: Jian Zhang The Aspeed INTC records an interrupt source in the pending bitmap when the source is masked or another status bit is still being handled. When the guest later clears the status register, the model promotes all saved pending bits back to status unconditionally. This is not correct for level-triggered sources. A source can deassert while another source connected to the same OR gate keeps the aggregated INTC line asserted. Promoting the stale bit later makes the guest demux a child interrupt whose device status has already been cleared. This is visible on AST2700 I2C, where the I2C buses are aggregated through INTCIO GICINT194 before reaching the GIC. A stale I2C source bit can be promoted back to the INTCIO status register, causing Linux to run the corresponding I2C ISR with an empty I2C interrupt status register. For example, the Linux aspeed-i2c debug ring shows a transfer that first receives a valid status interrupt, then receives a spurious ISR with both isr and raw status equal to zero. The zero-status ISR clears the saved command error and the transfer completes with ret=3D0: event=3Dstart isr=3D0x00000000 raw=3D0x00000000 cmd_err=3D0 msgs_idx=3D0 event=3Disr isr=3D0x00010011 raw=3D0x00010011 cmd_err=3D0 msgs_idx=3D0 event=3Disr isr=3D0x00000000 raw=3D0x00000000 cmd_err=3D1 msgs_idx=3D1 event=3Dcomplete ret=3D0 cmd_err=3D0 msgs_idx=3D1 A normal command can then be reported as zero transferred messages, which is converted to -EIO by Linux i2c_smbus_xfer_emulated(). The race is more likely when multiple I2C buses are accessed concurrently. Drop pending bits that no longer correspond to an asserted and enabled source before they can be promoted back to status. Signed-off-by: Jian Zhang Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260612060857.1842819-1-zhangjian= .3032@bytedance.com Signed-off-by: C=C3=A9dric Le Goater --- hw/intc/aspeed_intc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/hw/intc/aspeed_intc.c b/hw/intc/aspeed_intc.c index 5a36fff52040..ab80c239bc15 100644 --- a/hw/intc/aspeed_intc.c +++ b/hw/intc/aspeed_intc.c @@ -107,6 +107,27 @@ static const AspeedINTCIRQ *aspeed_intc_get_irq(Aspeed= INTCClass *aic, g_assert_not_reached(); } =20 +static uint32_t aspeed_intc_orgate_levels(AspeedINTCState *s, int inpin_id= x) +{ + AspeedINTCClass *aic =3D ASPEED_INTC_GET_CLASS(s); + uint32_t levels =3D 0; + int i; + + for (i =3D 0; i < aic->num_lines && i < 32; i++) { + if (s->orgates[inpin_idx].levels[i]) { + levels |=3D BIT(i); + } + } + + return levels; +} + +static void aspeed_intc_drop_stale_pending(AspeedINTCState *s, int inpin_i= dx) +{ + s->pending[inpin_idx] &=3D aspeed_intc_orgate_levels(s, inpin_idx) & + s->enable[inpin_idx]; +} + /* * Update the state of an interrupt controller pin by setting * the specified output pin to the given level. @@ -231,6 +252,8 @@ static void aspeed_intc_set_irq(void *opaque, int irq, = int level) trace_aspeed_intc_set_irq(name, inpin_idx, level); enable =3D s->enable[inpin_idx]; =20 + aspeed_intc_drop_stale_pending(s, inpin_idx); + if (!level) { return; } @@ -343,6 +366,7 @@ static void aspeed_intc_status_handler(AspeedINTCState = *s, hwaddr offset, /* All source ISR execution are done */ if (!s->regs[reg]) { trace_aspeed_intc_all_isr_done(name, inpin_idx); + aspeed_intc_drop_stale_pending(s, inpin_idx); if (s->pending[inpin_idx]) { /* * handle pending source interrupt @@ -402,6 +426,7 @@ static void aspeed_intc_status_handler_multi_outpins(As= peedINTCState *s, /* All source ISR executions are done from a specific bit */ if (data & BIT(i)) { trace_aspeed_intc_all_isr_done_bit(name, inpin_idx, i); + aspeed_intc_drop_stale_pending(s, inpin_idx); if (s->pending[inpin_idx] & BIT(i)) { /* * Handle pending source interrupt. --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428317; cv=none; d=zohomail.com; s=zohoarc; b=XrqiVDeBqSMdR4fRQsw1gk4DwS9/cMtPltISmuYBrRWYMD8kDkiCb0i61ZJqZ9vGOcVBUqyxClsnH7bRyXZ++Gqt9o81P9alK7L71XotqHZtbCs5l3NqanFVwK0Bkxu1PlNT2FLnnhXVoGkdSV3jkQCD14XSK8FYE8Nwa6MRK/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428317; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1mYCfhw4kexlqT/Cfa5HLsm4Wk66922gaexKsQ8O/bs=; b=YF0RFMAXA7YEWot5NwlkcvoMVY3g8MIuJbof6THBRIweAKkHk2J+ecqzbLBnaYdToCV1Bxw4bWszwWseSMRYxJVt30STXfAzQdtYKIrQFWHwTYHydr7FF2z24sHbz50pJSpe8kRbrMw02gFw+ov2GlPXuqFEyy4UiRDm5dHAttQ= 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 1783428317325894.3503595521416; Tue, 7 Jul 2026 05:45:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59q-0006ax-2o; Tue, 07 Jul 2026 08:44:14 -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 1wh59g-0006Wh-5n for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:05 -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 1wh59e-0005DE-7C for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:03 -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-137-gJZ12XQVPWaBUxyrQ6Xi-Q-1; Tue, 07 Jul 2026 08:43:58 -0400 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 7D2771953986; Tue, 7 Jul 2026 12:43:57 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CC14F3691B; Tue, 7 Jul 2026 12:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428241; 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=1mYCfhw4kexlqT/Cfa5HLsm4Wk66922gaexKsQ8O/bs=; b=BNX0ix9Vv6kHweQqWAf5VbGPPNZArs6WCvVWZu4Umc8gk8hE68UeVF0NxtFNGIIhoJnzJf NHWP8NPlGnxWwvz4ke93syKkqps0fxIufID+tl2BL7VIKlFU1KSbMxOBLhSRpEDJRm6fto UuSl1TQkcWcTx6H2pMWf6YtLAupxSjI= X-MC-Unique: gJZ12XQVPWaBUxyrQ6Xi-Q-1 X-Mimecast-MFC-AGG-ID: gJZ12XQVPWaBUxyrQ6Xi-Q_1783428237 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?= , Peter Maydell , Thomas Huth Subject: [PULL 2/8] tests/functional/aspeed: unify boot completion detection on 'login:' prompt Date: Tue, 7 Jul 2026 14:43:43 +0200 Message-ID: <20260707124349.662198-3-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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: 1783428319096158500 The boot completion check in AspeedTest waits for the systemd "Hostname set to" message, which occasionally causes intermittent test timeouts, e.g. on ast2500 SoC machines. The root cause seems to be console output interleaving of both systemd and the getty login process. This results in the expected pattern string being broken up. Unify and simplify all boot completion checks by looking for the generic 'login:' substring in AspeedTest.wait_for_boot_complete(). With the override gone, remove the redundant FacebookAspeedTest class and update the Anacapa, Bletchley, and Catalina tests to inherit directly from AspeedTest. Also drop the now-dead image_hostname parameter from do_test_arm_aspeed_openbmc(). Reported-by: Peter Maydell Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3117 Reviewed-by: Thomas Huth Link: https://lore.kernel.org/qemu-devel/20260617042718.2883655-1-clg@redha= t.com Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/arm/test_aspeed_anacapa.py | 6 +++--- tests/functional/arm/test_aspeed_bletchley.py | 6 +++--- tests/functional/arm/test_aspeed_catalina.py | 6 +++--- .../arm/test_aspeed_gb200nvl_bmc.py | 3 +-- tests/functional/aspeed.py | 21 ++++--------------- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/tests/functional/arm/test_aspeed_anacapa.py b/tests/functional= /arm/test_aspeed_anacapa.py index b16c6035c95e..363b4c2a1d09 100644 --- a/tests/functional/arm/test_aspeed_anacapa.py +++ b/tests/functional/arm/test_aspeed_anacapa.py @@ -5,10 +5,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from qemu_test import Asset -from aspeed import FacebookAspeedTest +from aspeed import AspeedTest =20 =20 -class AnacapaMachine(FacebookAspeedTest): +class AnacapaMachine(AspeedTest): =20 ASSET_ANACAPA_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/refs/heads/maste= r/images/anacapa-bmc/openbmc-20260616025349/obmc-phosphor-image-anacapa-202= 60616025349.static.mtd.xz', @@ -22,4 +22,4 @@ def test_arm_ast2600_anacapa_openbmc(self): soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': - FacebookAspeedTest.main() + AspeedTest.main() diff --git a/tests/functional/arm/test_aspeed_bletchley.py b/tests/function= al/arm/test_aspeed_bletchley.py index 3000d0c302b1..5a60b24b3d2c 100755 --- a/tests/functional/arm/test_aspeed_bletchley.py +++ b/tests/functional/arm/test_aspeed_bletchley.py @@ -5,10 +5,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from qemu_test import Asset -from aspeed import FacebookAspeedTest +from aspeed import AspeedTest =20 =20 -class BletchleyMachine(FacebookAspeedTest): +class BletchleyMachine(AspeedTest): =20 ASSET_BLETCHLEY_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/bl= etchley-bmc/openbmc-20250128071329/obmc-phosphor-image-bletchley-2025012807= 1329.static.mtd.xz', @@ -22,4 +22,4 @@ def test_arm_ast2600_bletchley_openbmc(self): soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': - FacebookAspeedTest.main() + AspeedTest.main() diff --git a/tests/functional/arm/test_aspeed_catalina.py b/tests/functiona= l/arm/test_aspeed_catalina.py index 2694e4b005b7..dc2f24e7b43c 100755 --- a/tests/functional/arm/test_aspeed_catalina.py +++ b/tests/functional/arm/test_aspeed_catalina.py @@ -5,10 +5,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from qemu_test import Asset -from aspeed import FacebookAspeedTest +from aspeed import AspeedTest =20 =20 -class CatalinaMachine(FacebookAspeedTest): +class CatalinaMachine(AspeedTest): =20 ASSET_CATALINA_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/a866feb5ef81245b= 4827a214584bf6bcc72939f6/images/catalina-bmc/obmc-phosphor-image-catalina-2= 0250619123021.static.mtd.xz', @@ -22,4 +22,4 @@ def test_arm_ast2600_catalina_openbmc(self): soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': - FacebookAspeedTest.main() + AspeedTest.main() diff --git a/tests/functional/arm/test_aspeed_gb200nvl_bmc.py b/tests/funct= ional/arm/test_aspeed_gb200nvl_bmc.py index e5f2dce0f569..f9e736d04712 100755 --- a/tests/functional/arm/test_aspeed_gb200nvl_bmc.py +++ b/tests/functional/arm/test_aspeed_gb200nvl_bmc.py @@ -19,8 +19,7 @@ def test_arm_aspeed_gb200_openbmc(self): =20 self.do_test_arm_aspeed_openbmc('gb200nvl-bmc', image=3Dimage_path, uboot=3D'2019.04', cpu_id=3D'0xf00= ', - soc=3D'AST2600 rev A3', - image_hostname=3D'gb200nvl-obmc') + soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index 88b659093467..076da1036cfd 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -8,14 +8,7 @@ class AspeedTest(LinuxKernelTest): =20 def do_test_arm_aspeed_openbmc(self, machine, image, uboot=3D'2019.04', - cpu_id=3D'0x0', soc=3D'AST2500 rev A1', - image_hostname=3DNone): - # Allow for the image hostname to not end in "-bmc" - if image_hostname is not None: - hostname =3D image_hostname - else: - hostname =3D machine.removesuffix('-bmc') - + cpu_id=3D'0x0', soc=3D'AST2500 rev A1'): self.set_machine(machine) self.vm.set_console() self.vm.add_args('-drive', f'file=3D{image},if=3Dmtd,format=3Draw', @@ -28,10 +21,10 @@ def do_test_arm_aspeed_openbmc(self, machine, image, ub= oot=3D'2019.04', self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu= _id}') self.wait_for_console_pattern(f'ASPEED {soc}') self.wait_for_console_pattern('/init as init process') - self.wait_for_boot_complete(hostname) + self.wait_for_boot_complete() =20 - def wait_for_boot_complete(self, hostname): - self.wait_for_console_pattern(f'systemd[1]: Hostname set to <{host= name}>.') + def wait_for_boot_complete(self): + self.wait_for_console_pattern('login:') =20 def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern=3D= 'Aspeed EVB'): self.require_netdev('user') @@ -71,9 +64,3 @@ def generate_otpmem_image(self): with open(path, "wb") as f: f.write(pattern) return path - - -class FacebookAspeedTest(AspeedTest): - - def wait_for_boot_complete(self, hostname): - self.wait_for_console_pattern(f'{hostname} login:') --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428300; cv=none; d=zohomail.com; s=zohoarc; b=J2DOhwvs0v9dlWfqX8M3/tbRcEWK9qJv70I9dC0YVf5bNCUSfHLzGIVzkKoAV2DcSjNsJ8ykKZEhA5yQS2m0rbNU18azrUZd6yb82c1GAYauIQ2lmFsFXST8gAV+OKf9ZZyPCkO9v9acXup28fyLol/LLrHOWd+kdbM2Ms8Mtjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428300; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8mWFIqi8bILGYzO4m3LD405SUESbjC9vfP9FQlaBjmw=; b=RobOQ4LIOZeZqSP0ZfKuvh9jbfwyV2u3gn5d2WHd+t3damvCKDiQEqz8UVu3nK7e7v0EStitxQvYWPxs5SpPGt3a4ZyO6OmTQgGo7XOYkqQm6UvpuxNS2Ro41KkTKVW8Jxrbc8H/J2/HNIcm/TWm+HFoPItuqUuSQcl/+qTtUpA= 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 1783428300287840.6816510081317; Tue, 7 Jul 2026 05:45:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59r-0006kL-0y; Tue, 07 Jul 2026 08:44:15 -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 1wh59i-0006X6-8D for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:07 -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 1wh59g-0005Dd-OD for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:05 -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-156-Jb2pndpwN3uLVg0BNdbx_Q-1; Tue, 07 Jul 2026 08:44:03 -0400 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 39A72195422A; Tue, 7 Jul 2026 12:44:00 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ED6BB36924; Tue, 7 Jul 2026 12:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428244; 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=8mWFIqi8bILGYzO4m3LD405SUESbjC9vfP9FQlaBjmw=; b=gRaXBEr4jllaAAXIZtjGEmSuAoVrdSA0XtLx2vJitkD9R+Xq55jH4ZSjGE2v2pOI2ZF462 Ozdc60uEN4hazagG6rkWT1oSnsV0O1RlRk2XL9K8NjxILkdEXezUA9RFQWSsBIoLKMyJwq 8HGi9X9daI5ddrp3E/O8/An9qc5fTz8= X-MC-Unique: Jb2pndpwN3uLVg0BNdbx_Q-1 X-Mimecast-MFC-AGG-ID: Jb2pndpwN3uLVg0BNdbx_Q_1783428240 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: yujun , Peter Maydell , Glenn Miles , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 3/8] hw/gpio/pca9552: fix off-by-one in QOM led index validation Date: Tue, 7 Jul 2026 14:43:44 +0200 Message-ID: <20260707124349.662198-4-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=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: 1783428303096158500 From: yujun pca955x_get_led() and pca955x_set_led() accept led indices equal to pin_count, but valid indices are 0..pin_count-1. For a 16-pin device, led16 passes the current check and then accesses an LS register past max_reg. Use the same >=3D pin_count bounds check as pca9554_set_pin() and the gpio input handler assert in this file. Fixes: a90d8f84674 ("misc/pca9552: Add qom set and get") Signed-off-by: yujun Reviewed-by: Peter Maydell Reviewed-by: Glenn Miles Link: https://lore.kernel.org/qemu-devel/20260629074133.187549-1-yujun@kyli= nos.cn Signed-off-by: C=C3=A9dric Le Goater --- hw/gpio/pca9552.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c index 472d8ad95715..b13ac9fd9ce5 100644 --- a/hw/gpio/pca9552.c +++ b/hw/gpio/pca9552.c @@ -311,8 +311,8 @@ static void pca955x_get_led(Object *obj, Visitor *v, co= nst char *name, error_setg(errp, "%s: error reading %s", __func__, name); return; } - if (led < 0 || led > k->pin_count) { - error_setg(errp, "%s invalid led %s", __func__, name); + if (led < 0 || led >=3D k->pin_count) { + error_setg(errp, "%s: invalid led %s", __func__, name); return; } /* @@ -352,8 +352,8 @@ static void pca955x_set_led(Object *obj, Visitor *v, co= nst char *name, error_setg(errp, "%s: error reading %s", __func__, name); return; } - if (led < 0 || led > k->pin_count) { - error_setg(errp, "%s invalid led %s", __func__, name); + if (led < 0 || led >=3D k->pin_count) { + error_setg(errp, "%s: invalid led %s", __func__, name); return; } =20 --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428390; cv=none; d=zohomail.com; s=zohoarc; b=MdNvQM9Qm2sEX8trJqQgOg80EenSI12MrtigtsFCBuCJph6qGu/6vOlRUsMtcu3nRVgo4+mGw1Wj7iOhSqa/LzZgzl1QK/pggenlbrujbQqj61yCefWpDJo/xGrHXUGx7RRpOtAvu+/QIDrFvXo3u7H6PQtGDWhKjC01ckdAxgE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428390; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Y3b2T7WEIDgWP8GY/c6J+U2hpUT9aUDitswp4pmkeUU=; b=kbAwEZb72qAnNi/ivelEoR/mjeVVu0T2AWgxmm0TK5nTVhGfcocWCwo+w0jBx8A0BAUr30M0qzWy7xJbhw6c8MXitqguWWMtDb9M5zcGflxKHrQCDwJLP4BGdtBIqn2f5XRhnJIDc17f2rKyzX2KSEZ3Mb0heyxZ0Lf+V0ZdNWw= 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 1783428390054748.0879104536307; Tue, 7 Jul 2026 05:46:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59r-0006nB-J8; Tue, 07 Jul 2026 08:44:15 -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 1wh59l-0006Xl-Bk for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:09 -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 1wh59j-0005Dv-4l for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:08 -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-673-m8ljX0QUMviaXBeHKqlmow-1; Tue, 07 Jul 2026 08:44:03 -0400 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 405C61954185; Tue, 7 Jul 2026 12:44:02 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A87D436925; Tue, 7 Jul 2026 12:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428246; 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=Y3b2T7WEIDgWP8GY/c6J+U2hpUT9aUDitswp4pmkeUU=; b=U0YlAd6SgUo6nh0lZpHLGwCYZp2URvAbrEEvCTtXUVtDSatQgxEVmKcM92iJ7yjNnwdMdp kR69ZaXZjEKckM2WlJzGN7wlaZHBYSahuGKa9FZdx+Aszc/5MfOp3nbOkvdu0TaiL7Tmle UZTeME4o2BxvRGeIpjT7sYq15sLJbX4= X-MC-Unique: m8ljX0QUMviaXBeHKqlmow-1 X-Mimecast-MFC-AGG-ID: m8ljX0QUMviaXBeHKqlmow_1783428242 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 4/8] hw/arm/aspeed_ast27x0-fc: Fix hardware strap settings Date: Tue, 7 Jul 2026 14:43:45 +0200 Message-ID: <20260707124349.662198-5-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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: 1783428391423158500 From: Jamin Lin The hardware strap settings in the AST2700 FC machine model were incorrect. Update HW_STRAP1 and HW_STRAP2 to match the values observed from the real EVB dump. These values are also consistent with the current aspeed_ast27x0_evb.c machine setup. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260706052701.1141740-2-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast27x0-fc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast27x0-fc.c b/hw/arm/aspeed_ast27x0-fc.c index 5eb6680da99d..7d9fade68dab 100644 --- a/hw/arm/aspeed_ast27x0-fc.c +++ b/hw/arm/aspeed_ast27x0-fc.c @@ -50,8 +50,10 @@ struct Ast2700FCState { =20 #define AST2700FC_BMC_RAM_SIZE (2 * GiB) =20 -#define AST2700FC_HW_STRAP1 0x000000C0 -#define AST2700FC_HW_STRAP2 0x00000003 +/* SCU HW Strap1 */ +#define AST2700FC_HW_STRAP1 0x00000800 +/* SCUIO HW Strap1 */ +#define AST2700FC_HW_STRAP2 0x00000700 #define AST2700FC_FMC_MODEL "w25q01jvq" #define AST2700FC_SPI_MODEL "w25q512jv" =20 --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428328; cv=none; d=zohomail.com; s=zohoarc; b=mqtDZCEJ0JXNvEwiv8pLexcSC2JNn4g+bJy/bUsx5mLqZ36EXEXxLgjGxGUMs+fp7WjxI/KbgnHCeV7RHm6CogDYwaQT7h/+1O+vNwbPanvCUp9tPrRqe2jpUTjCAViOvRZvPc7R7+ESY4kCza2u+az0hrIr6gu7u5aTRWBFBZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428328; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ocsZ+ZS/uZOmOBaGGwXxIEEWnL++j83GHFTOdtsKoTs=; b=DGnN/OEjX+AkU04Yxc8PO6M3YW7k3Vv8BYhYdrLxXBrwde//NXZDLx/0FXO2ZRsusJZ6cLoQe+5abqul/TsvEJv/44AgbpbpjaqTy/8gX2We7QgaUmWgSbc52lnbP7tluZVTBCGH6iPyfWLlum9bE4HASbgX4wqB+Y3Y02dqh3M= 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 1783428328659182.4177552251839; Tue, 7 Jul 2026 05:45:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59q-0006jR-Te; Tue, 07 Jul 2026 08:44:14 -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 1wh59m-0006YE-Jp for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:11 -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 1wh59l-0005EJ-5C for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:10 -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-19--OhTN8-ONIqIpcl9yo6zDw-1; Tue, 07 Jul 2026 08:44:06 -0400 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 5308619540E6; Tue, 7 Jul 2026 12:44:04 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B06D236924; Tue, 7 Jul 2026 12:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428248; 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=ocsZ+ZS/uZOmOBaGGwXxIEEWnL++j83GHFTOdtsKoTs=; b=b/xv40uFnsdftC0bv/+d37gIJpkIKTz/p82yZ7by8cs2BW0LybFi2HIEE4zJzRKtmnw12V E/w1U8+HcFMgLaKaLezITyTYrVwD7pQoGYhHskRJt31+9SfYgnKV4UjIaq3vMN2Dj1EDuX /SlSd1kqYOYmVlhscHblhPec98sm3oY= X-MC-Unique: -OhTN8-ONIqIpcl9yo6zDw-1 X-Mimecast-MFC-AGG-ID: -OhTN8-ONIqIpcl9yo6zDw_1783428244 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 5/8] hw/misc/aspeed_scu: Drop noisy unhandled read logs for AST2700 SCU/SCUIO Date: Tue, 7 Jul 2026 14:43:46 +0200 Message-ID: <20260707124349.662198-6-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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: 1783428331219158500 From: Jamin Lin The AST2700 SCU/SCUIO read handlers currently emit LOG_GUEST_ERROR messages for all registers that are not explicitly handled. However, most SCU registers are simple read-back registers without side effects, and do not require explicit handling in the read path. Returning the stored register value is sufficient. Emitting "Unhandled read" logs for these cases generates excessive and misleading noise during normal guest operation, making it harder to spot real issues. Remove the default unhandled read logging from the SCU and SCUIO read handlers to reduce log noise and align with common QEMU device model behavior for passive registers. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260706052701.1141740-3-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_scu.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index fe731a28bd50..ed7f5e648d44 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -849,13 +849,6 @@ static uint64_t aspeed_ast2700_scu_read(void *opaque, = hwaddr offset, return 0; } =20 - switch (reg) { - default: - qemu_log_mask(LOG_GUEST_ERROR, - "%s: Unhandled read at offset 0x%" HWADDR_PRIx "\n", - __func__, offset); - } - trace_aspeed_ast2700_scu_read(offset, size, s->regs[reg]); return s->regs[reg]; } @@ -961,13 +954,6 @@ static uint64_t aspeed_ast2700_scuio_read(void *opaque= , hwaddr offset, return 0; } =20 - switch (reg) { - default: - qemu_log_mask(LOG_GUEST_ERROR, - "%s: Unhandled read at offset 0x%" HWADDR_PRIx "\n", - __func__, offset); - } - trace_aspeed_ast2700_scuio_read(offset, size, s->regs[reg]); return s->regs[reg]; } --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428344; cv=none; d=zohomail.com; s=zohoarc; b=dXyDcbQR8teOPPa/EloRRBfaKWCIXf2H/NR+hymSDCSzZFOf5hdHm1ViZ7BY8QtByjurEXewMoxs52OCW1VoQSLJUQLSkhyJg/zU1fXAq07alR1WADgQ8XkyDYm4csqoXpo3IlmwBgaKVJuLXoBy+fzlU3WNCJHq+cwopbMpCUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428344; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qqxLaaRHIKjCdlZzhirT0UJUcgmElGDpq0GdCrkOR8o=; b=KwvYsAyTZlP9zeuvTNfil59Icke2qSr8+YV0AhLb1udseUttgriF8L4/YuauE1s/rrGe0tAafWZLjHFWPfAgs0h/fnT8e9KrgfQV1tlymad8Day6BvL68QCYVnj/tqOXmnYN+j/NFMM8GPObh5J43gPzi+QvsMAta5kBJqUDgL8= 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 1783428344797170.37059752988716; Tue, 7 Jul 2026 05:45:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59s-0006qC-CE; Tue, 07 Jul 2026 08:44: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 1wh59o-0006ea-GM for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:13 -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 1wh59m-0005Ep-Sl for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:12 -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-426-X5MfJubePPeixCxQinMQbQ-1; Tue, 07 Jul 2026 08:44:07 -0400 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 3B2B81806CB1; Tue, 7 Jul 2026 12:44:06 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C24013691B; Tue, 7 Jul 2026 12:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428250; 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=qqxLaaRHIKjCdlZzhirT0UJUcgmElGDpq0GdCrkOR8o=; b=iC5l3at6sH1hxAF1BdSruO04MqIe0nJcjzYopXngjxceVDUp5+UeooJ0QOpbsEJ9T9/MQq iWPpBW3/5NMFRgUUVfEirVcV3tkdgT0ZA17ZR6aPYD9SF4Wf0IUdgPO6myv+/q2Jy2Vx33 oJG2hmwljU82B+PYp9xBzHd7ZJ134EM= X-MC-Unique: X5MfJubePPeixCxQinMQbQ-1 X-Mimecast-MFC-AGG-ID: X5MfJubePPeixCxQinMQbQ_1783428246 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 6/8] hw/misc/aspeed_scu: Add AST2700 SCUIO RNG control and data registers Date: Tue, 7 Jul 2026 14:43:47 +0200 Message-ID: <20260707124349.662198-7-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1783428347287158500 From: Jamin Lin Implement basic behavior for RNG_CTRL and RNG_DATA: - RNG_CTRL allows guest to enable/disable the RNG via the DIS bit. Only bits [0:3] and bit 5 are writable; other bits are masked. - The VLD bit (bit 31) is updated by the model to reflect the RNG enable state, and is not writable by the guest. - When RNG is enabled, reads from RNG_DATA return a newly generated random value. - When RNG is disabled, RNG_DATA return 0. This provides a minimal functional model of the RNG sufficient for software that expects readable random data without modeling full hardware behavior. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260706052701.1141740-4-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_scu.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index ed7f5e648d44..5dbf81c0cec9 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -160,6 +160,11 @@ #define AST2700_SCU_CPU_SCRATCH_1 TO_REG(0x784) #define AST2700_SCU_VGA_SCRATCH_0 TO_REG(0x900) =20 +#define AST2700_SCUIO_RNG_CTRL TO_REG(0xF0) +#define AST2700_SCUIO_RNG_CTRL_MASK 0x2F +#define AST2700_SCUIO_RNG_CTRL_DIS BIT(0) +#define AST2700_SCUIO_RNG_CTRL_VLD BIT(31) +#define AST2700_SCUIO_RNG_DATA TO_REG(0xF4) #define AST2700_SCUIO_CLK_STOP_CTL_1 TO_REG(0x240) #define AST2700_SCUIO_CLK_STOP_CLR_1 TO_REG(0x244) #define AST2700_SCUIO_CLK_STOP_CTL_2 TO_REG(0x260) @@ -954,6 +959,14 @@ static uint64_t aspeed_ast2700_scuio_read(void *opaque= , hwaddr offset, return 0; } =20 + switch (reg) { + case AST2700_SCUIO_RNG_DATA: + if (!(s->regs[AST2700_SCUIO_RNG_CTRL] & AST2700_SCUIO_RNG_CTRL_DIS= )) { + s->regs[AST2700_SCUIO_RNG_DATA] =3D aspeed_scu_get_random(); + } + break; + } + trace_aspeed_ast2700_scuio_read(offset, size, s->regs[reg]); return s->regs[reg]; } @@ -977,6 +990,18 @@ static void aspeed_ast2700_scuio_write(void *opaque, h= waddr offset, trace_aspeed_ast2700_scuio_write(offset, size, data); =20 switch (reg) { + case AST2700_SCUIO_RNG_CTRL: + data &=3D AST2700_SCUIO_RNG_CTRL_MASK; + if (data & AST2700_SCUIO_RNG_CTRL_DIS) { + data &=3D ~AST2700_SCUIO_RNG_CTRL_VLD; + s->regs[AST2700_SCUIO_RNG_DATA] =3D 0; + } else { + s->regs[AST2700_SCUIO_RNG_DATA] =3D aspeed_scu_get_random(); + data |=3D AST2700_SCUIO_RNG_CTRL_VLD; + } + s->regs[reg] =3D data; + updated =3D true; + break; case AST2700_SCUIO_CLK_STOP_CTL_1: case AST2700_SCUIO_CLK_STOP_CTL_2: s->regs[reg] |=3D data; --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428394; cv=none; d=zohomail.com; s=zohoarc; b=IQ5cXdt800c4r/3nwyBipE99dvEG8mcDKB3ZkmOvPBSLZkyUed9BS8y29ifC10WGpiD0Up4ckUFFK9fVLoZzXwEVaEO2/4G0kVHrLWltNoz4rJeqlDiQ2w5KLtKLiwmOvb6Ob1pIHmZ3lsyl5NAgGIxEJWg35WKKNsbVohCuCEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428394; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/vgGS4zfIhnPOEzrFVbfajifZIrhK1AfwWDrqcb2kVg=; b=mKHwh8pCFMrRH9UBCsL8rv5yjsY1wefXXBwa+YSS/knFSRlFRJGa6W8SrW1b2bb2mxIcV7n+L/B1qSt6h2FqdVZmHIFzUGziu11lgE9hC7mqAWYuUzA7ROSC1eViVllB2wF9ODrFblHrm8vDwsV69t+gS8pkqSAka95fMsNMsfY= 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 1783428394571743.0933641480262; Tue, 7 Jul 2026 05:46:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59r-0006n9-JX; Tue, 07 Jul 2026 08:44:15 -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 1wh59p-0006eh-Ox for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:13 -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 1wh59n-0005FA-JN for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:13 -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-510-ziozEfoHOmyWBGTrqJKShg-1; Tue, 07 Jul 2026 08:44:09 -0400 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 73DAE1808970; Tue, 7 Jul 2026 12:44:08 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AAB6A3691B; Tue, 7 Jul 2026 12:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428251; 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=/vgGS4zfIhnPOEzrFVbfajifZIrhK1AfwWDrqcb2kVg=; b=KMz/v+LFtZqFhDOXaexk4YsAEsROVqxhpxhny7rThI56V43x2S+mo0Y8LRpj/AEiU8tKks hlZwivPNfnMtZIMyUDKQFfJrBtmGUgYhiSZD7D8zrUwA9zj1Bq2eyRhvQwel6MjsWYoU/a I/GnXCfKaM29TSoEV1ckDT6halhVvUg= X-MC-Unique: ziozEfoHOmyWBGTrqJKShg-1 X-Mimecast-MFC-AGG-ID: ziozEfoHOmyWBGTrqJKShg_1783428248 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 7/8] hw/arm/aspeed_ast27x0: Add unimplemented Privilege Controller MMIO regions for SSP/TSP Date: Tue, 7 Jul 2026 14:43:48 +0200 Message-ID: <20260707124349.662198-8-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=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: 1783428395519158500 From: Jamin Lin The AST2700 SSP/TSP firmware accesses Privilege Controller MMIO regions that are not yet implemented in QEMU. This change adds unimplemented MMIO devices for the Privilege Controller blocks and maps them to their corresponding physical addresses in the SSP/T= SP address space. These stub devices allow QEMU to safely handle firmware accesses and prevent spurious exceptions, while accurately reflecting the hardware memory map. No functional changes. 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/20260706052701.1141740-5-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_coprocessor.h | 1 + include/hw/arm/aspeed_soc.h | 2 ++ hw/arm/aspeed_ast27x0-ssp.c | 12 ++++++++++++ hw/arm/aspeed_ast27x0-tsp.c | 12 ++++++++++++ 4 files changed, 27 insertions(+) diff --git a/include/hw/arm/aspeed_coprocessor.h b/include/hw/arm/aspeed_co= processor.h index 4a50f688ecdc..700cbfb4bb19 100644 --- a/include/hw/arm/aspeed_coprocessor.h +++ b/include/hw/arm/aspeed_coprocessor.h @@ -48,6 +48,7 @@ struct Aspeed27x0CoprocessorState { AspeedINTCState intc[2]; UnimplementedDeviceState ipc[2]; UnimplementedDeviceState scuio; + UnimplementedDeviceState pric[2]; =20 ARMv7MState armv7m; }; diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 3aac144cd408..a0d2432620e0 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -295,6 +295,8 @@ enum { ASPEED_DEV_IOEXP1_INTCIO, ASPEED_DEV_IOEXP0_I3C, ASPEED_DEV_IOEXP1_I3C, + ASPEED_DEV_PRIC0, + ASPEED_DEV_PRIC1, }; =20 const char *aspeed_soc_cpu_type(const char * const *valid_cpu_types); diff --git a/hw/arm/aspeed_ast27x0-ssp.c b/hw/arm/aspeed_ast27x0-ssp.c index b3c4eb1915ed..e35c0c9a5a56 100644 --- a/hw/arm/aspeed_ast27x0-ssp.c +++ b/hw/arm/aspeed_ast27x0-ssp.c @@ -22,10 +22,12 @@ static const hwaddr aspeed_soc_ast27x0ssp_memmap[] =3D { [ASPEED_DEV_SDRAM] =3D 0x00000000, [ASPEED_DEV_SRAM0] =3D 0x70000000, [ASPEED_DEV_INTC] =3D 0x72100000, + [ASPEED_DEV_PRIC0] =3D 0x72140000, [ASPEED_DEV_SCU] =3D 0x72C02000, [ASPEED_DEV_TIMER1] =3D 0x72C10000, [ASPEED_DEV_UART4] =3D 0x72C1A000, [ASPEED_DEV_IPC0] =3D 0x72C1C000, + [ASPEED_DEV_PRIC1] =3D 0x74100000, [ASPEED_DEV_SCUIO] =3D 0x74C02000, [ASPEED_DEV_INTCIO] =3D 0x74C18000, [ASPEED_DEV_UART0] =3D 0x74C33000, @@ -141,6 +143,10 @@ static void aspeed_soc_ast27x0ssp_init(Object *obj) TYPE_UNIMPLEMENTED_DEVICE); object_initialize_child(obj, "scuio", &a->scuio, 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); } =20 static void aspeed_soc_ast27x0ssp_realize(DeviceState *dev_soc, Error **er= rp) @@ -255,6 +261,12 @@ static void aspeed_soc_ast27x0ssp_realize(DeviceState = *dev_soc, Error **errp) aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->scuio), "aspeed.scuio", sc->memmap[ASPEED_DEV_SCUIO], 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); } =20 static void aspeed_soc_ast27x0ssp_class_init(ObjectClass *klass, diff --git a/hw/arm/aspeed_ast27x0-tsp.c b/hw/arm/aspeed_ast27x0-tsp.c index 6098d1aae32d..fdc279cbf654 100644 --- a/hw/arm/aspeed_ast27x0-tsp.c +++ b/hw/arm/aspeed_ast27x0-tsp.c @@ -22,10 +22,12 @@ static const hwaddr aspeed_soc_ast27x0tsp_memmap[] =3D { [ASPEED_DEV_SDRAM] =3D 0x00000000, [ASPEED_DEV_SRAM0] =3D 0x70000000, [ASPEED_DEV_INTC] =3D 0x72100000, + [ASPEED_DEV_PRIC0] =3D 0x72140000, [ASPEED_DEV_SCU] =3D 0x72C02000, [ASPEED_DEV_TIMER1] =3D 0x72C10000, [ASPEED_DEV_UART4] =3D 0x72C1A000, [ASPEED_DEV_IPC0] =3D 0x72C1C000, + [ASPEED_DEV_PRIC1] =3D 0x74100000, [ASPEED_DEV_SCUIO] =3D 0x74C02000, [ASPEED_DEV_INTCIO] =3D 0x74C18000, [ASPEED_DEV_UART0] =3D 0x74C33000, @@ -141,6 +143,10 @@ static void aspeed_soc_ast27x0tsp_init(Object *obj) TYPE_UNIMPLEMENTED_DEVICE); object_initialize_child(obj, "scuio", &a->scuio, 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); } =20 static void aspeed_soc_ast27x0tsp_realize(DeviceState *dev_soc, Error **er= rp) @@ -255,6 +261,12 @@ static void aspeed_soc_ast27x0tsp_realize(DeviceState = *dev_soc, Error **errp) aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&a->scuio), "aspeed.scuio", sc->memmap[ASPEED_DEV_SCUIO], 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); } =20 static void aspeed_soc_ast27x0tsp_class_init(ObjectClass *klass, --=20 2.54.0 From nobody Sun Jul 26 10:07:30 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=1783428312; cv=none; d=zohomail.com; s=zohoarc; b=cQ+78f7xcek8izEDmK1+50/SBU4YPGXE0mJDa5+LjLQNrilg0dBbItdop407zTqd7nxBhMLMu+WD2dl4HeKub1/0DHdFabxC2yxztMGok7Q8+L2n+TrcA1Iz+u47rtAAvEGtn1mQSeQKqKdQjp04pBwRZUu6Zoq75uRV5YAFz1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783428312; 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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=O4+nTTT8csQUrVkdCM4+/5omZAcEP1KMFzkJpfqvbJM=; b=BYBDdigUw/6TXTjiKNxxTAKEH4ppPu2PXI8RgyNsdA4aGcF4kECiJu4mVnPIwgFYyZb9Tua0qyY6hwCEj/m3UpvIxBnQdjBoq6GXCAtJoj9oV/kqiN+AELV0jwA6acxZTbOjeo0LtrRiMd5ViaDcN/PAUDk+O0RlxRfkxmb3EfA= 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 1783428312451210.73712747741672; Tue, 7 Jul 2026 05:45:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wh59v-00071D-4l; Tue, 07 Jul 2026 08:44: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 1wh59t-0006uT-2T for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:17 -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 1wh59r-0005Ih-9H for qemu-devel@nongnu.org; Tue, 07 Jul 2026 08:44:16 -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-356-3R5hALIrMsSWxYKHCLq4Dw-1; Tue, 07 Jul 2026 08:44:13 -0400 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 D0E3C1808964; Tue, 7 Jul 2026 12:44:10 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.33.253]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E40793692A; Tue, 7 Jul 2026 12:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783428254; 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=O4+nTTT8csQUrVkdCM4+/5omZAcEP1KMFzkJpfqvbJM=; b=DllzbfNbAPjXDJ73OiQGPwoCQzvMi5YLvy/z2UE7838i7rsKTKn+1ArUAxbzp7gaVxXJ3V RF1XwJ0o+ZJCrLFpQRK2eYwvsRvRWIZhbQrjCp8pf8HGDGCGb3aBJKxgd9BeFS+nnwNDh+ drPhflobuQDZ06C1s5qkCmsfF8n1ZXE= X-MC-Unique: 3R5hALIrMsSWxYKHCLq4Dw-1 X-Mimecast-MFC-AGG-ID: 3R5hALIrMsSWxYKHCLq4Dw_1783428250 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 8/8] hw/arm/aspeed_ast27x0: Add unimplemented OTP controller MMIO regions for SSP/TSP Date: Tue, 7 Jul 2026 14:43:49 +0200 Message-ID: <20260707124349.662198-9-clg@redhat.com> In-Reply-To: <20260707124349.662198-1-clg@redhat.com> References: <20260707124349.662198-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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=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: 1783428315224158500 From: Jamin Lin The AST2700 SSP/TSP firmware accesses OTP MMIO regions that are not yet implemented in QEMU. This change adds unimplemented MMIO devices for the OTP and maps them to their corresponding physical addresses in the SSP/TSP address space. These stub devices allow QEMU to safely handle firmware accesses and prevent spurious exceptions, while accurately reflecting the hardware memory map. No functional changes. 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/20260706052701.1141740-6-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_coprocessor.h | 1 + include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0-ssp.c | 6 ++++++ hw/arm/aspeed_ast27x0-tsp.c | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/include/hw/arm/aspeed_coprocessor.h b/include/hw/arm/aspeed_co= processor.h index 700cbfb4bb19..ac58a5f424ff 100644 --- a/include/hw/arm/aspeed_coprocessor.h +++ b/include/hw/arm/aspeed_coprocessor.h @@ -49,6 +49,7 @@ struct Aspeed27x0CoprocessorState { UnimplementedDeviceState ipc[2]; UnimplementedDeviceState scuio; UnimplementedDeviceState pric[2]; + UnimplementedDeviceState otp; =20 ARMv7MState armv7m; }; diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index a0d2432620e0..41dc04e2930f 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -297,6 +297,7 @@ enum { 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); diff --git a/hw/arm/aspeed_ast27x0-ssp.c b/hw/arm/aspeed_ast27x0-ssp.c index e35c0c9a5a56..68a8ab26f7ac 100644 --- a/hw/arm/aspeed_ast27x0-ssp.c +++ b/hw/arm/aspeed_ast27x0-ssp.c @@ -29,6 +29,7 @@ static const hwaddr aspeed_soc_ast27x0ssp_memmap[] =3D { [ASPEED_DEV_IPC0] =3D 0x72C1C000, [ASPEED_DEV_PRIC1] =3D 0x74100000, [ASPEED_DEV_SCUIO] =3D 0x74C02000, + [ASPEED_DEV_OTP] =3D 0x74C07000, [ASPEED_DEV_INTCIO] =3D 0x74C18000, [ASPEED_DEV_UART0] =3D 0x74C33000, [ASPEED_DEV_UART1] =3D 0x74C33100, @@ -147,6 +148,8 @@ static void aspeed_soc_ast27x0ssp_init(Object *obj) 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) @@ -267,6 +270,9 @@ static void aspeed_soc_ast27x0ssp_realize(DeviceState *= dev_soc, Error **errp) 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); } =20 static void aspeed_soc_ast27x0ssp_class_init(ObjectClass *klass, diff --git a/hw/arm/aspeed_ast27x0-tsp.c b/hw/arm/aspeed_ast27x0-tsp.c index fdc279cbf654..b8a4f7c91d60 100644 --- a/hw/arm/aspeed_ast27x0-tsp.c +++ b/hw/arm/aspeed_ast27x0-tsp.c @@ -29,6 +29,7 @@ static const hwaddr aspeed_soc_ast27x0tsp_memmap[] =3D { [ASPEED_DEV_IPC0] =3D 0x72C1C000, [ASPEED_DEV_PRIC1] =3D 0x74100000, [ASPEED_DEV_SCUIO] =3D 0x74C02000, + [ASPEED_DEV_OTP] =3D 0x74C07000, [ASPEED_DEV_INTCIO] =3D 0x74C18000, [ASPEED_DEV_UART0] =3D 0x74C33000, [ASPEED_DEV_UART1] =3D 0x74C33100, @@ -147,6 +148,8 @@ static void aspeed_soc_ast27x0tsp_init(Object *obj) 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) @@ -267,6 +270,9 @@ static void aspeed_soc_ast27x0tsp_realize(DeviceState *= dev_soc, Error **errp) 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); } =20 static void aspeed_soc_ast27x0tsp_class_init(ObjectClass *klass, --=20 2.54.0