From nobody Sun Feb 8 02:21:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609637194; cv=none; d=zohomail.com; s=zohoarc; b=Lbaronpk24wOzu0dMgADRbzpp1jcaBrPkPisV/RvYoojh+Su2pPtiadRtugsbYpf89ZJ9bdjbns1Y89hxiedQvyex/81+GrKVL3M4cb14efucvsKdFTQ1tRaEsdKiaBkSbytmvM3b5KC6h1/ZAb4JLjYEh9jAlyX/V+ZwK09yvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609637194; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=W3TaPg63qdiDVK9O8ny+f/GxzWCeg+r0Rb27Tmb8ftI=; b=mRsvQahsta/vfNlxIkKjEMA5lyfZHefRZYmhuYHc6oT1Y5mWxTOna15+I/6oW+XC72oQAJae42WXKvpvDtYLOMKwhesuQNedBcVhDzJ4+lLXe7fWayxDrAHbZV8XGujYurfggCLxvS1ZonIh0MP4Ka+gdygDCtknbvhJHialLr8= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609637194721220.18962878979153; Sat, 2 Jan 2021 17:26:34 -0800 (PST) Received: from localhost ([::1]:58898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvsAD-0006R4-8W for importer@patchew.org; Sat, 02 Jan 2021 20:26:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8Z-0004mJ-TU; Sat, 02 Jan 2021 20:24:51 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:20375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8X-0000t5-6u; Sat, 02 Jan 2021 20:24:51 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 39F0C747605; Sun, 3 Jan 2021 02:24:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id A8419747100; Sun, 3 Jan 2021 02:24:43 +0100 (CET) Message-Id: <94f1eb7cfb7f315bd883d825f3ce7e0cfc2f2b69.1609636173.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option Date: Sun, 03 Jan 2021 02:09:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , f4bug@amsat.org, Guenter Roeck , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index dd86e664d2..8548f42b0d 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -37,7 +37,6 @@ config PPC405 select M48T59 select PFLASH_CFI02 select PPC4XX - select SERIAL =20 config PPC440 bool @@ -46,13 +45,13 @@ config PPC440 imply E1000_PCI select PCI_EXPRESS select PPC4XX - select SERIAL select FDT_PPC =20 config PPC4XX bool select BITBANG_I2C select PCI + select SERIAL =20 config SAM460EX bool @@ -61,7 +60,6 @@ config SAM460EX select IDE_SII3112 select M41T80 select PPC440 - select SERIAL select SM501 select SMBUS_EEPROM select USB_EHCI_SYSBUS @@ -123,7 +121,6 @@ config VIRTEX bool select PPC4XX select PFLASH_CFI01 - select SERIAL select XILINX select XILINX_ETHLITE select FDT_PPC --=20 2.21.3 From nobody Sun Feb 8 02:21:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609637332; cv=none; d=zohomail.com; s=zohoarc; b=XNocs2MLx4OhEDlYJ0Rmow2hbcWVwRJKtrOh+ZSEuTZOPGvR/v8qL3nn38yDBUmKU3Md9txoY7hj5jGxJRIGh6ZH+KFoeovrSuSgF+aSayRdKJOmQuT+IbUrHFEhqDoboegz8SIk2XtjnoxPxZQxHVP3k2X7tr5ueP18/KQTum8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609637332; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=aStZggpV/3ULZdaBAQ0I9Ot5saE63FmzZ8sJG37YE+Q=; b=OCJ5iKVOJLb/4X/MUDKGUfcIyyGvtysOqxZTTAN2nYaT1vW1LTxNVrIIY2Jxr26hCUgKgBbDoBVgkFh0Nkr3FLjwxsuC7MG50fyzTXJXfl7qcwBd9CSrSbFXlwQbGnWeZjpbfG3riszObAsm1TTvHcsJ+dkBYFu0P189WKW73TY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609637332042109.09538260798115; Sat, 2 Jan 2021 17:28:52 -0800 (PST) Received: from localhost ([::1]:36234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvsCQ-0000K7-UZ for importer@patchew.org; Sat, 02 Jan 2021 20:28:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8a-0004mc-Bq; Sat, 02 Jan 2021 20:24:52 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:20374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8X-0000t4-7K; Sat, 02 Jan 2021 20:24:52 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 41BF174760F; Sun, 3 Jan 2021 02:24:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id AE92E747601; Sun, 3 Jan 2021 02:24:43 +0100 (CET) Message-Id: <7461a20b129a912aeacdb9ad115a55f0b84c8726.1609636173.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v3 2/5] sam460ex: Remove FDT_PPC dependency from KConfig Date: Sun, 03 Jan 2021 02:09:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , f4bug@amsat.org, Guenter Roeck , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Dependency on FDT_PPC was added in commit b0048f76095 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index 8548f42b0d..f1e1be208e 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -64,7 +64,6 @@ config SAM460EX select SMBUS_EEPROM select USB_EHCI_SYSBUS select USB_OHCI - select FDT_PPC =20 config PREP bool --=20 2.21.3 From nobody Sun Feb 8 02:21:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609637347; cv=none; d=zohomail.com; s=zohoarc; b=dt2XEBDbH9mKi/8QGmAq7Oqf51ltiDNgVeXHBPtIEdsFmUABBxWJ1RuA0kpR4VEeux3HWU04WEtCzENhaoTF56/s9jT/0WFzzJ4Cjfq+dTM7kgoQtNyAynZ8s8E8RFtbcQYNNGiFBW9FZ0WUC+QreVEZrmpvkJPph2PAwfN8sU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609637347; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4PdeBlvNfS3L6h0bHqSfZkTHfHTqZqQfUOocn58qfZ8=; b=ewCu091Qm7lVvdyhlSMKpa/swoV1cT43V93CvQGXyfx8KhbyWCQkGD9MTk5d+dUvMJERQPP3ogSXZ9z0DBpT7y7z1cbcNIc+YbskH7FFZvCIkgxHI41853BHFYbPi7J1Gc7RXTCikxxClibjDffPDvjJvLcdCVAYCAOECThMmNY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609637347750433.9537914569099; Sat, 2 Jan 2021 17:29:07 -0800 (PST) Received: from localhost ([::1]:37060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvsCg-0000fR-OB for importer@patchew.org; Sat, 02 Jan 2021 20:29:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8a-0004mi-LD; Sat, 02 Jan 2021 20:24:52 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:20376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8X-0000t8-7j; Sat, 02 Jan 2021 20:24:52 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 402B374760E; Sun, 3 Jan 2021 02:24:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id B3664747603; Sun, 3 Jan 2021 02:24:43 +0100 (CET) Message-Id: In-Reply-To: References: Subject: [PATCH v3 3/5] ppc440_pcix: Improve comment for IRQ mapping Date: Sun, 03 Jan 2021 02:09:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , f4bug@amsat.org, Guenter Roeck , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index ee952314c8..eb1290ffc8 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -415,8 +415,15 @@ static void ppc440_pcix_reset(DeviceState *dev) s->sts =3D 0; } =20 -/* All pins from each slot are tied to a single board IRQ. - * This may need further refactoring for other boards. */ +/* + * All four IRQ[ABCD] pins from all slots are tied to a single board + * IRQ, so our mapping function here maps everything to IRQ 0. + * The code in pci_change_irq_level() tracks the number of times + * the mapped IRQ is asserted and deasserted, so if multiple devices + * assert an IRQ at the same time the behaviour is correct. + * + * This may need further refactoring for boards that use multiple IRQ line= s. + */ static int ppc440_pcix_map_irq(PCIDevice *pci_dev, int irq_num) { trace_ppc440_pcix_map_irq(pci_dev->devfn, irq_num, 0); --=20 2.21.3 From nobody Sun Feb 8 02:21:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609637518; cv=none; d=zohomail.com; s=zohoarc; b=Qg0a5JOph8PpTmJP0azwEHLc7Mue1w2+YPzS1nDND7LGboj0Fzymsa0KtkqTgUeH15aXpoD//nBmppNWDQ3nUFcOyThgYNaN9xlGzB6XwvTDD9CACRaIn+O1OuwvzSzIIoqlNrvrnoLBXjIpSIy/NP2PCaym40Yv3NkD3ChtsYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609637518; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Bigo9TndSmHJ2ANW16d/U3g2ey88uG4yF3YVfzfp3I0=; b=hKaH45iO9txe5ukbjXfCyb9Vrdsjh6C67LnjXlvzUXboKsgjGoAWV6yrxfy/t1C7TnX4bV8rwRfWT2Enf//6837kfHG+Zwo+jwpTpYv2nGZEeh5eicaNiHRpmJE+XF70zQA4mbo9TzranVFH6WRyzGVe9MdOwUgqNPos9871CNE= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609637518572757.7213944855202; Sat, 2 Jan 2021 17:31:58 -0800 (PST) Received: from localhost ([::1]:40232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvsFM-0002Cd-3V for importer@patchew.org; Sat, 02 Jan 2021 20:31:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8b-0004mx-Ll; Sat, 02 Jan 2021 20:24:53 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:20373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8X-0000t6-79; Sat, 02 Jan 2021 20:24:53 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 68E04747610; Sun, 3 Jan 2021 02:24:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id BA1FE747608; Sun, 3 Jan 2021 02:24:43 +0100 (CET) Message-Id: In-Reply-To: References: Subject: [PATCH v3 4/5] ppc440_pcix: Fix register write trace event Date: Sun, 03 Jan 2021 02:09:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , f4bug@amsat.org, Guenter Roeck , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" The trace event for pci_host_config_write() was also using the trace event for read. Add corresponding trace and correct this. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/ppc440_pcix.c | 2 +- hw/ppc/trace-events | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index eb1290ffc8..7829d3e556 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -169,7 +169,7 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr= addr, { struct PPC440PCIXState *s =3D opaque; =20 - trace_ppc440_pcix_reg_read(addr, val); + trace_ppc440_pcix_reg_write(addr, val, size); switch (addr) { case PCI_VENDOR_ID ... PCI_MAX_LAT: stl_le_p(s->dev->config + addr, val); diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events index ed05f2fc9a..017c48624f 100644 --- a/hw/ppc/trace-events +++ b/hw/ppc/trace-events @@ -117,3 +117,4 @@ ppc440_pcix_set_irq(int irq_num) "PCI irq %d" ppc440_pcix_update_pim(int idx, uint64_t size, uint64_t la) "Added window = %d of size=3D0x%" PRIx64 " to CPU=3D0x%" PRIx64 ppc440_pcix_update_pom(int idx, uint32_t size, uint64_t la, uint64_t pcia)= "Added window %d of size=3D0x%x from CPU=3D0x%" PRIx64 " to PCI=3D0x%" PRI= x64 ppc440_pcix_reg_read(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " =3D = 0x%" PRIx32 +ppc440_pcix_reg_write(uint64_t addr, uint32_t val, uint32_t size) "addr 0x= %" PRIx64 " =3D 0x%" PRIx32 " size 0x%" PRIx32 --=20 2.21.3 From nobody Sun Feb 8 02:21:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609637197; cv=none; d=zohomail.com; s=zohoarc; b=fmWW+q5sPRMdEa7OtRyH5GpW7UWFgSDnaSZo6U5dHdd5yOs8BsOeoYOzJu9GwaDHhvM/sLANv3VTTERjHlXcr3Iqyks42W9/HiLjqUtEZHrT1BC7V79FYsCgWfyK80KMggCDwvadIHEiWnJMljUe8PvSoD+OYy0KlMtozae4OUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609637197; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=dtQl/uR/XcD3BamnsDKg6RLLHpaA3zE9C784JyGp6bc=; b=goUTIxpot5pLbNd+lYsuG4S6wvwH0EzfSXV6eXecbw+sGPx6576suj8rWvCKHtLy8R28hELWDMmknrBMyLz6U57ZNkGWZQBsQVc1ZDMhpKtz3aTlwjJq894QIaEi1R4I3IvkwO5xjX1q2PcYMcpvrPW/mhsVvhytF3aEKI+HfBg= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609637197137432.9243971177085; Sat, 2 Jan 2021 17:26:37 -0800 (PST) Received: from localhost ([::1]:59074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvsAG-0006VP-0W for importer@patchew.org; Sat, 02 Jan 2021 20:26:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8c-0004nM-8h; Sat, 02 Jan 2021 20:24:54 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:20387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvs8a-0000wC-G1; Sat, 02 Jan 2021 20:24:54 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 7E2B4747611; Sun, 3 Jan 2021 02:24:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id C04C1747602; Sun, 3 Jan 2021 02:24:43 +0100 (CET) Message-Id: <6fd215ab2bc5f8d4455cd20ed1a2f059e4415fe5.1609636173.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v3 5/5] ppc440_pcix: Fix up pci config access Date: Sun, 03 Jan 2021 02:09:33 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% 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=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , f4bug@amsat.org, Guenter Roeck , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" This fixes a long standing issue with MorphOS booting on sam460ex which turns out to be because of suspicious values written to PCI config address that apparently works on real machine but caused wrong access on this device model. This replaces a previous work around for this with a better fix that makes it work. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index 7829d3e556..91cbcd0504 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -449,28 +449,35 @@ static AddressSpace *ppc440_pcix_set_iommu(PCIBus *b,= void *opaque, int devfn) return &s->bm_as; } =20 -/* The default pci_host_data_{read,write} functions in pci/pci_host.c - * deny access to registers without bit 31 set but our clients want - * this to work so we have to override these here */ -static void pci_host_data_write(void *opaque, hwaddr addr, - uint64_t val, unsigned len) +/* + * Some guests on sam460ex write all kinds of garbage here such as + * missing enable bit and low bits set and still expect this to work + * (apparently it does on real hardware because these boot there) so + * we have to override these ops here and fix it up + */ +static void pci_host_config_write(void *opaque, hwaddr addr, + uint64_t val, unsigned len) { PCIHostState *s =3D opaque; - pci_data_write(s->bus, s->config_reg | (addr & 3), val, len); + + if (addr !=3D 0 || len !=3D 4) { + return; + } + s->config_reg =3D (val & 0xfffffffcULL) | (1UL << 31); } =20 -static uint64_t pci_host_data_read(void *opaque, - hwaddr addr, unsigned len) +static uint64_t pci_host_config_read(void *opaque, hwaddr addr, + unsigned len) { PCIHostState *s =3D opaque; - uint32_t val; - val =3D pci_data_read(s->bus, s->config_reg | (addr & 3), len); + uint32_t val =3D s->config_reg; + return val; } =20 -const MemoryRegionOps ppc440_pcix_host_data_ops =3D { - .read =3D pci_host_data_read, - .write =3D pci_host_data_write, +const MemoryRegionOps ppc440_pcix_host_conf_ops =3D { + .read =3D pci_host_config_read, + .write =3D pci_host_config_write, .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 @@ -497,9 +504,9 @@ static void ppc440_pcix_realize(DeviceState *dev, Error= **errp) pci_setup_iommu(h->bus, ppc440_pcix_set_iommu, s); =20 memory_region_init(&s->container, OBJECT(s), "pci-container", PCI_ALL_= SIZE); - memory_region_init_io(&h->conf_mem, OBJECT(s), &pci_host_conf_le_ops, + memory_region_init_io(&h->conf_mem, OBJECT(s), &ppc440_pcix_host_conf_= ops, h, "pci-conf-idx", 4); - memory_region_init_io(&h->data_mem, OBJECT(s), &ppc440_pcix_host_data_= ops, + memory_region_init_io(&h->data_mem, OBJECT(s), &pci_host_data_le_ops, h, "pci-conf-data", 4); memory_region_init_io(&s->iomem, OBJECT(s), &pci_reg_ops, s, "pci.reg", PPC440_REG_SIZE); --=20 2.21.3