From patchwork Fri Oct 22 07:16:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544816 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG085hMCz9sRR for ; Fri, 22 Oct 2021 18:18:00 +1100 (AEDT) Received: from localhost ([::1]:47732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdooQ-00012k-2m for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:17:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonh-0000wg-7A for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:13 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonf-0003Hk-7N for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:12 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MUY5o-1mDJgZ2vy4-00QPZG; Fri, 22 Oct 2021 09:17:07 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 1/9] mac_via: update comment for VIA1B_vMystery bit Date: Fri, 22 Oct 2021 09:16:57 +0200 Message-Id: <20211022071705.471954-2-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:TU/a7e1QjqNkZeChwc7W6zHgZyXY89QvlSJTgDBi+t+izSTwM1k vWnGw1/WuA377QkjOunXH/2L/KqQH0zoKrTSF76PFd0KFhvLf3JWUYeDAHCo9KCgIhmbjRv mIK4V2opFzknBiAsmEgucmpVOuw5jzaUlR4TgWhUp6S3oyB/PRNvk6RsXWskPhNLWYOqSxI kIKOoBFKXTu28Xjtv5A9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:56Yk+GDQU+s=:lAae3T5k/ODGe5zhefinmZ jKOCRHEKjsMY9knrXH8i/h5hk644RvzQjibAPQ5/4ZqJ8AVGAybAOgQKDWHTRKAmD6bf9FZ5N m6lOdsJ1GzadEROYNGWC0bF4ZvUDPI+gIDKOpK7mxCKvEKZuXvXaMYxG/+fkMzxpqBME4kYoS 0ApZmv2ANM9S2etVKgZ7SGaiDB/l4SY6Eb8QkbdVjwkKzCXvCvDEECrWm2tuYud6FZR7Evzxh qRn5FJXUH1Emex6mOZxYH5yPEjZtTOLOTIQeDPw1Oz5amzAWflH/DY0FyXCDul1Vu1WFujWjL V8+9fdVCo3PkmzumBSYSUeZV2InitvrrydAnBJT80RB1BpHMCLxu6LS943kPhwWHSmGV1Mdfc GD0z7Ctv03qS0YIdqVXYEPfE/ckjCBzvFkBUnGkMhuLhfgJSplgHv2pLRIDjB8TNmD7e4f2Vp 0JGYTqWjLcVT9+oo8g0/xVGpCO+OLtJFhKXf1OZ9lr7dpkgVKiGd0IrlQ4FWeoUePZROQO7sC ZfsGa+fp2lmDI7cXbMaoeKt0C7kJPLfJ6lkl3CpsothfRJo6VtMWzaRVjMZughcq52oLsmr3s q2CXcbxosZYLFYWsvx8yoN2si4yTA5lWqLS0Aby8sIFIDqIL6FvBNYajJh8bSqb2+nqYwHOyA VtIkzbUQPYCgksHISb0nb0cYCnWl8hatenTJKWgwQYCtIZpQTdONJT/Ee0O+yh6B5Nvs= Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland According to both Linux and NetBSD, port B bit 6 is used on the Quadra 800 to configure the GLUE logic in A/UX mode. Whilst the name VIA1B_vMystery isn't particularly descriptive, the patch leaves this to ensure that the constants in mac_via.c remain in sync with Linux's mac_via.h. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 993bac017db8..7a53a8b4c04d 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -130,6 +130,10 @@ * On SE/30, vertical sync interrupt enable. * 0=enabled. This vSync interrupt shows up * as a slot $E interrupt. + * On Quadra 800 this bit toggles A/UX mode which + * configures the glue logic to deliver some IRQs + * at different levels compared to a classic + * Mac. */ #define VIA1B_vADBS2 0x20 /* ADB state input bit 1 (unused on IIfx) */ #define VIA1B_vADBS1 0x10 /* ADB state input bit 0 (unused on IIfx) */ From patchwork Fri Oct 22 07:16:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG7h565Lz9sXN for ; Fri, 22 Oct 2021 18:24:31 +1100 (AEDT) Received: from localhost ([::1]:35908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdoui-0003nm-KR for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:24:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdoni-0000xZ-PV for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:47901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003If-4d for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N9MYu-1mjMi81Bqu-015G9q; Fri, 22 Oct 2021 09:17:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/9] q800: move VIA1 IRQ from level 1 to level 6 Date: Fri, 22 Oct 2021 09:16:58 +0200 Message-Id: <20211022071705.471954-3-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:w3YxJZTldH0m1Nv+6KJvNRJNTdFv/fmiJZaHWmS7qy046Zcr2DK XDAu2iZYEGhGDxxrkG8KztMfA7H2+xnWU/yJyM8S7nhltc0lXBV8FdkGhoyDqwRm4ym/gwb rOGbrgN2iLvPVXYaqi7XcUu8Eaur6NyanAxUIRZjk81UIS8DSlNBVx+u99U8il5LrEZX5Yb HmRvQBMkiMDeOvtkq53aQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:3nBmAuPvvOU=:LMx04FS5/NqLt3I2gwxIDV mkrH8ZXXtZKwzfk7RdiijjXBl3U0XT/HAqCI4MWguGFGC5yc9Xzhr/ItVgHR/3ia4/t3ehijY G7yMoIsRDwdi3CnLl9lpCulAlGa744vO8mCFAGaz8uB57jvwGGSSSoAjK5pFEZIJiTav2tVRp x06PO6x82KUmHnZ2JnR8mPpY8y2HBH1NRjfxf56LsQUav0CtfF53Xinaa9Ym6J/bFlfbgNSFq W4ioVvVbpabMkaTQAoOIVA5SqlJvbf/ggP7a/oTABn1amxAfjOMlV4t2eDlTIlSikcu2ZAPat t05toFLDvkdaqggMEMZDftNDyvIVs0uGiRVwLQa5zGiwXiDFUEyxRUgOqHKmnNUYwvxnrRDU9 YRceFo5xKavv9FjxuUnznES2yeHERM30MYtG95fSbxng+jHFezYx33uNfqgAUIshAqEcA2WjW kor9gbe7Ti5HSVXosEVwdxex8kNxcEWM1XZtcnnWmJwt/5LEZ5GDAqjMYt739S9wQmOJA0lhe MocImSHFremA7Muno2exSIC7/fHucyQEdYSWmTfbDzv05S0Z0s9XyFXqvnIXlOCELy/LorF2P K/88C3nCiqHzzV3B4tbHJwdChs+zrMa0wM3WP7yltwTQ/eTNVj9wn4gmZg/E4I6Ko5ZW3GzzI vYew4Suo0ItY9tReAirczum5STIYIk1ATWoJEfZMUwA+21BiYr8OLNnC9apKLPFwg3HE= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland On a Quadra 800 machine Linux sets via_alt_mapping to 1 and clears port B bit 6 to ensure that the VIA1 IRQ is delivered at level 6 rather than level 1. Even though QEMU doesn't yet emulate this behaviour, Linux still installs the VIA1 level 1 IRQ handler regardless of the value of via_alt_mapping which is why the kernel has been able to boot until now. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index fd4855047e3f..15f3067811e1 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -284,7 +284,7 @@ static void q800_init(MachineState *machine) sysbus = SYS_BUS_DEVICE(via1_dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 0)); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 5)); adb_bus = qdev_get_child_bus(via1_dev, "adb.0"); dev = qdev_new(TYPE_ADB_KEYBOARD); From patchwork Fri Oct 22 07:16:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG073bsvz9sXN for ; Fri, 22 Oct 2021 18:17:59 +1100 (AEDT) Received: from localhost ([::1]:47688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdooP-00010P-6h for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdoni-0000xs-SQ for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:37417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003Ig-Gy for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McXwD-1nGjSD2wqT-00d0sN; Fri, 22 Oct 2021 09:17:08 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 3/9] q800: use GLUE IRQ numbers instead of IRQ level for GLUE IRQs Date: Fri, 22 Oct 2021 09:16:59 +0200 Message-Id: <20211022071705.471954-4-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:aEuftz4U7wQrFKHD93PQ9sHxfHZ5LJn73yGBQ6iGsxp0H0BO5SZ nVbmiq3M0TUdsG+S94WKtucSleLf3oKH+VS10iV+Gffg+FIbyLmdD7U+ang+/2fOVsulTRq 5gKzc8Dx3Ce5w7IBAj7rOE2Zl4pHCDf/vZSbFQzsy+lCqQ7mzIdUKLK75o8gnGN6eS0d+FF xM0+oH0IORdYeLC8VjfnA== X-UI-Out-Filterresults: notjunk:1;V03:K0:fjKiCSB9SfA=:noNXniquobhVjPLmbrachs XJ97qaPRG1RNmMBlu27wYaMY16ydcPGeljIAxpzRnbQ67fRYjTZiGa9d/0SQyHXbh90wn/Ghs OnC3sJp2KTTsoUMpvFeGmOqDzVq0P4lVv4rvHOqNDOO9yim8gqhVwsHecdCvaG5j7bQoRaOwH mGMp5sHkQxsIGOgpI/EvgiJ0F2DN+MIOlR3X3aQ/7m6TJUBeDC6rGh4/SECW3MHguZOnSSKb9 LIEWDP8ar9fG2pEHbK6YrfvI1ggmKCfEREd56HEIIhn3vDGC+rl9lRtpxvKrw643y0w7iEZOz TQv8dkNP3Kmllg4LQshni8FelKhpFLZsBQuUWmPo0y2Kha+2c8EvWiLBeW6U756icVrNsa9Pa FKawaPG9xFJ0wIb5gmP30HMV/2SHZhBbVb10xZ8NGVodzUke2VR7tCrzydNC/awZ9mB4dttcj QvkOc0fzkQOhPTcZ0y2d2aXawTBM8v+HqXJrfMsCkus8kl+hDtVr0/SpaBNXHtPkmjpRjgQAE UomZrmywGguoAcxOzhf4g2VgnLIvfpWvcwALL6qwEaQ80Omq1QWc3B0tg6LlEDr6yMwt/N4bm W3vrGpMytLWGOnCTca7OKW5gpodcsj3inluWTGyOBs2idmLhYKT7ShfX8ZzZ3EeslFYmpqgLS WeW+8fIRE+LKSaJQYhKDxdMBuK8nRTo4CH8NqdUgS1IPeiNCcrXQgMUEsyKtaiyz5b7Y= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland In order to allow dynamic routing of IRQs to different IRQ levels on the CPU depending upon port B bit 6, use GLUE IRQ numbers and map them to the the corresponding CPU IRQ level accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-4-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 15f3067811e1..81c335bf16bc 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -102,11 +102,34 @@ struct GLUEState { uint8_t ipr; }; +#define GLUE_IRQ_IN_VIA1 0 +#define GLUE_IRQ_IN_VIA2 1 +#define GLUE_IRQ_IN_SONIC 2 +#define GLUE_IRQ_IN_ESCC 3 + static void GLUE_set_irq(void *opaque, int irq, int level) { GLUEState *s = opaque; int i; + switch (irq) { + case GLUE_IRQ_IN_VIA1: + irq = 5; + break; + + case GLUE_IRQ_IN_VIA2: + irq = 1; + break; + + case GLUE_IRQ_IN_SONIC: + irq = 2; + break; + + case GLUE_IRQ_IN_ESCC: + irq = 3; + break; + } + if (level) { s->ipr |= 1 << irq; } else { @@ -284,7 +307,7 @@ static void q800_init(MachineState *machine) sysbus = SYS_BUS_DEVICE(via1_dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 5)); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_VIA1)); adb_bus = qdev_get_child_bus(via1_dev, "adb.0"); dev = qdev_new(TYPE_ADB_KEYBOARD); @@ -297,7 +320,7 @@ static void q800_init(MachineState *machine) sysbus = SYS_BUS_DEVICE(via2_dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE + VIA_SIZE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 1)); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_VIA2)); /* MACSONIC */ @@ -330,7 +353,7 @@ static void q800_init(MachineState *machine) sysbus = SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 0, SONIC_BASE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 2)); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_SONIC)); memory_region_init_rom(dp8393x_prom, NULL, "dp8393x-q800.prom", SONIC_PROM_SIZE, &error_fatal); @@ -366,7 +389,8 @@ static void q800_init(MachineState *machine) qdev_realize_and_unref(escc_orgate, NULL, &error_fatal); sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(escc_orgate, 0)); sysbus_connect_irq(sysbus, 1, qdev_get_gpio_in(escc_orgate, 1)); - qdev_connect_gpio_out(DEVICE(escc_orgate), 0, qdev_get_gpio_in(glue, 3)); + qdev_connect_gpio_out(DEVICE(escc_orgate), 0, + qdev_get_gpio_in(glue, GLUE_IRQ_IN_ESCC)); sysbus_mmio_map(sysbus, 0, SCC_BASE); /* SCSI */ From patchwork Fri Oct 22 07:17:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG075kYSz9ssP for ; Fri, 22 Oct 2021 18:17:59 +1100 (AEDT) Received: from localhost ([::1]:47676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdooP-0000ze-Hi for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdoni-0000xJ-MH for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:38735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003Id-4g for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M27Bp-1mgIhw0Oi1-002a87; Fri, 22 Oct 2021 09:17:09 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 4/9] mac_via: add GPIO for A/UX mode Date: Fri, 22 Oct 2021 09:17:00 +0200 Message-Id: <20211022071705.471954-5-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:D1XaLNO/CCfD++noskQfzQUeB6ICQrIsbrSxSvKvvd1dsRQFW6O 99e2J74PeiN1Z1EHfVhN22jtQrSDLMCNFfVys8uZ/DYz36VKxusxZ4fEi7Otbp43dCcnjUE bQC4ZXSmDi/Pizs12gFGuudvZXzfpktSJqB3O3fQSbUBPMlNGOlgx9bVX6c8LmTPd/Xoret 2882xeyeFJwptiOBDDCag== X-UI-Out-Filterresults: notjunk:1;V03:K0:ADBCcVZ20sU=:0GEQwtuvfVHynDAyfmp+hM 0mK3pyf3GTEslaCukAfuO4J6WNaxFwpJgfnm32dob1WRrvuAkDsd6yH1KAgUwivszLuaj1q1V f2XGR9XzxtEEuRftz8kw+EpTDvZjVZkjgtg8DwJ1xzLYxzGYKiB72nwToMzaw0WqmiD+0Q6tY UtqvpcYa4sWnylEGB8O6IIw8ShLpIHdsAJKKe0W0bnisyFq4iHXvlK9weGtrtgG6RRZ3sVQI6 xD21qKA1s0r2MQC9uidJtjq/D36lkoMgm1jhDQcrymFw/7yVF+wzLMaRqmC8z9szfep2rWTm+ pSZW0xcjR2ILUG30NB0ymHL8gVLrd8iWlMuUDEH5OSP3hNYJUKPUz8z4KXqhQhIH/Gpm4tro+ JfYQfnkOIjiTHLp2YlIcEUwk5zzZbAsXwU9TxyD8tuU20EvykRlcHBpOs+qM1Tday4XXuLI6S EbB7616BVQnIvhFhroMM2tHxOMjhstbiP2GHYDm+FmurfYUZyFwKRjk1Rvj2r4+sTzJgnmeXr aoSrg2ygUt+C+pMuP+ud15XVH6s1ja6P0thukMDYJGipSzdlSBksgrjOSZ0OTI8ZG/bYiVy/E vL84NZOVexfGdUiJdGhl2YO0heoNPNpiSpfZPtnbzMOwDWIBKoB2q92j+3HP1mWLpVaQeQmi0 GJ/2D33KdhmMZ9YalB/E0xc3wg1efBz29RLe/0RxEG0iVGnyuO4L91ot7gKzAiqz6zoE= Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland Add a new auxmode GPIO that is updated when port B bit 6 is changed indicating whether the hardware is configured for A/UX mode. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-5-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/misc/mac_via.h | 1 + hw/misc/mac_via.c | 19 +++++++++++++++++++ hw/misc/trace-events | 1 + 3 files changed, 21 insertions(+) diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 4506abe5d0e3..b44556586601 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -43,6 +43,7 @@ struct MOS6522Q800VIA1State { MemoryRegion via_mem; qemu_irq irqs[VIA1_IRQ_NB]; + qemu_irq auxmode_irq; uint8_t last_b; /* RTC */ diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 7a53a8b4c04d..b378e6b30554 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -880,6 +880,21 @@ static void via1_adb_update(MOS6522Q800VIA1State *v1s) } } +static void via1_auxmode_update(MOS6522Q800VIA1State *v1s) +{ + MOS6522State *s = MOS6522(v1s); + int oldirq, irq; + + oldirq = (v1s->last_b & VIA1B_vMystery) ? 1 : 0; + irq = (s->b & VIA1B_vMystery) ? 1 : 0; + + /* Check to see if the A/UX mode bit has changed */ + if (irq != oldirq) { + trace_via1_auxmode(irq); + qemu_set_irq(v1s->auxmode_irq, irq); + } +} + static uint64_t mos6522_q800_via1_read(void *opaque, hwaddr addr, unsigned size) { MOS6522Q800VIA1State *s = MOS6522_Q800_VIA1(opaque); @@ -902,6 +917,7 @@ static void mos6522_q800_via1_write(void *opaque, hwaddr addr, uint64_t val, case VIA_REG_B: via1_rtc_update(v1s); via1_adb_update(v1s); + via1_auxmode_update(v1s); v1s->last_b = ms->b; break; @@ -1046,6 +1062,9 @@ static void mos6522_q800_via1_init(Object *obj) TYPE_ADB_BUS, DEVICE(v1s), "adb.0"); qdev_init_gpio_in(DEVICE(obj), via1_irq_request, VIA1_IRQ_NB); + + /* A/UX mode */ + qdev_init_gpio_out(DEVICE(obj), &v1s->auxmode_irq, 1); } static const VMStateDescription vmstate_q800_via1 = { diff --git a/hw/misc/trace-events b/hw/misc/trace-events index ede413965b6c..2da96d167a7b 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -228,6 +228,7 @@ via1_rtc_cmd_pram_sect_write(int sector, int offset, int addr, int value) "secto via1_adb_send(const char *state, uint8_t data, const char *vadbint) "state %s data=0x%02x vADBInt=%s" via1_adb_receive(const char *state, uint8_t data, const char *vadbint, int status, int index, int size) "state %s data=0x%02x vADBInt=%s status=0x%x index=%d size=%d" via1_adb_poll(uint8_t data, const char *vadbint, int status, int index, int size) "data=0x%02x vADBInt=%s status=0x%x index=%d size=%d" +via1_auxmode(int mode) "setting auxmode to %d" # grlib_ahb_apb_pnp.c grlib_ahb_pnp_read(uint64_t addr, uint32_t value) "AHB PnP read addr:0x%03"PRIx64" data:0x%08x" From patchwork Fri Oct 22 07:17:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544819 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG4T42cLz9sRR for ; Fri, 22 Oct 2021 18:21:45 +1100 (AEDT) Received: from localhost ([::1]:56272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdos3-0006pG-Aa for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:21:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdoni-0000wy-BD for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:32949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonf-0003Ij-8C for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:14 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N4A1h-1mmvUC2sbZ-0101Mt; Fri, 22 Oct 2021 09:17:09 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 5/9] q800: wire up auxmode GPIO to GLUE Date: Fri, 22 Oct 2021 09:17:01 +0200 Message-Id: <20211022071705.471954-6-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:vtPPTCaYqfDFm728FdnmaJdJYSPLNu/M1iIGr3s5kGeuUXAFaRu +zEAwi/gEgibzg0EV1if6vsAEs84dRKHTyC+n17LfD0n3f+tjG2wwB8/3oYz4b3krurbcQw e1Vur/3i8iG6rl2CqRVfaFFUI6zyLQyXmOknkRLQlEPQ7CBSTptwONHEuL3qYVXneE81BuF Iit6cjzYsfV4xUiyu2u6w== X-UI-Out-Filterresults: notjunk:1;V03:K0:UE3wqNvXPAc=:N4ia85kGWY/cZglQslzUhd oEmIKTMujWyGrHGmbQp90/9H600NCQ3LfJjQLhCbgkARpOrIeeZoqGsLkFx0uUEm8V4lkLTr+ 83V/dZA8tMOshKrJB9PiWPML5FgCy3gDI2Hfbg5iBUJBaZnJJC3421AfcYZ86O/UCZqsgNFGE ayGM7y7myFNxWU0zeYt1qZG1l9kh0LH5w/vGGMmqyARJ8rgbQw6t5cFzddqhXyrHx9k9mX+wV kVoD8kVN5VbUsyJBzWk3jtLVBVevnGF2PbC/Z/BciBgOlKxt/oWMCHaXskMhwdonDbuQnaKEK 8cbOkBTGL55rJ51qmFFUBKbzotvLL/4X72FOKTbM/yXL7FMiUyDFZP3eDv5db8W9Qb4FwD6dx rCC0RYdfezy3iyBkftSie5y1E6DwjYpyE0W82ADXslaAiWVkp8GSEYsIB7uyCnZWGew4VZIyh aF7W2PfWeHLpRZ7zSkhVBdrAF3s1lK6RGXi1MhEiKDD6QlksWcnrM1OSSv+vqLLGrHu68p6ca Tv1zX/jhFWM3cxHxEzrOWGIiLI+wAua5J5wV3sgvz0TKqQDyO4B8jsMUexroZodF1I7M2gUTp mYyGuqF7PCHMI5CePy4x/1zoekx1je99KzK+q/AmvoXDo3W5rtdi3yHEyWsYgTlJKxbOnEKzE Zb/fjYKfTzKZZ5osFkbpNwckmGT41YV+DhYE60vvE3mTISE+9MaQTAVYoxYeg1lMquB0= Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland This enables the GLUE logic to change its CPU level IRQ routing depending upon whether the hardware has been configured for A/UX mode. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-6-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 81c335bf16bc..0093872d8923 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -100,6 +100,7 @@ struct GLUEState { SysBusDevice parent_obj; M68kCPU *cpu; uint8_t ipr; + uint8_t auxmode; }; #define GLUE_IRQ_IN_VIA1 0 @@ -145,11 +146,19 @@ static void GLUE_set_irq(void *opaque, int irq, int level) m68k_set_irq_level(s->cpu, 0, 0); } +static void glue_auxmode_set_irq(void *opaque, int irq, int level) +{ + GLUEState *s = GLUE(opaque); + + s->auxmode = level; +} + static void glue_reset(DeviceState *dev) { GLUEState *s = GLUE(dev); s->ipr = 0; + s->auxmode = 0; } static const VMStateDescription vmstate_glue = { @@ -158,6 +167,7 @@ static const VMStateDescription vmstate_glue = { .minimum_version_id = 0, .fields = (VMStateField[]) { VMSTATE_UINT8(ipr, GLUEState), + VMSTATE_UINT8(auxmode, GLUEState), VMSTATE_END_OF_LIST(), }, }; @@ -178,6 +188,7 @@ static void glue_init(Object *obj) DeviceState *dev = DEVICE(obj); qdev_init_gpio_in(dev, GLUE_set_irq, 8); + qdev_init_gpio_in_named(dev, glue_auxmode_set_irq, "auxmode", 1); } static void glue_class_init(ObjectClass *klass, void *data) @@ -308,6 +319,9 @@ static void q800_init(MachineState *machine) sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE); sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_VIA1)); + /* A/UX mode */ + qdev_connect_gpio_out(via1_dev, 0, + qdev_get_gpio_in_named(glue, "auxmode", 0)); adb_bus = qdev_get_child_bus(via1_dev, "adb.0"); dev = qdev_new(TYPE_ADB_KEYBOARD); From patchwork Fri Oct 22 07:17:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG7h536nz9sRR for ; Fri, 22 Oct 2021 18:24:31 +1100 (AEDT) Received: from localhost ([::1]:35728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdouh-0003gm-EW for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonk-00010F-8Z for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:16 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:45225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003In-Qg for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:15 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6lUk-1mcBy40SmE-008N9M; Fri, 22 Oct 2021 09:17:10 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 6/9] q800: route SONIC on-board Ethernet IRQ via nubus IRQ 9 in classic mode Date: Fri, 22 Oct 2021 09:17:02 +0200 Message-Id: <20211022071705.471954-7-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:l2z/eO5tdDHyVMyqs9FC7yDJqip255oVwqcZSG9J4bFAXq8B/wf RQIaq9Jk+U+P1r/fgWeiRRGI2+lOthVa569MBo7ptH+e8ZwhTvYTkLf4nEe24YnpbCsmope MZ+qKNhnuJt30NGJn3gFiimTs/Mb9T6/rA/Ke6LUssExTwqfA9reKrotp4HL5jIJjD1CA4r N5fRBxNhyb/c0BdfxjLBw== X-UI-Out-Filterresults: notjunk:1;V03:K0:BmD+idIjEu4=:cVSCskPBHMhsSkuX3G3P98 jd39JIW2U76Szf/WBGtznmRejOpIZYDD3P05X9fVn2CqzKnt/7xcVqF8Q1Esrv+1RP1RCUbdV HAKdeDDkP6nINu4jkaP1ecYQec+bapyy4cdrQ90rVZ9Ii7X+1oE1g/CaLAEglB4Kk4F4XrFEN gz6AVcjAgqFyile7Vn/Pj8R9gLgolvVJCyQomp+eccbF8cYjAPh1F17DG1hCRUE3zaclDeE3a e6gGl+ueCjZ8CaW0UR2O+t+vIPc8TMyUFvuIPd0JDQ+7aIT9cqm9L8cZ04pdi+CZ5LVmU+NzG PfBWuk8tjDFvFAoYpH2iyZ9s/2H/hIYB2uE0X1hD+NjuLlKymVeoKcpXGJ+MMn2ost8GwUant W6diUcqL7TeNd0tkYIORFXYfrUMHwlDiGtRW7pE3zMfvfrUjGdcGh7w2g3VZtQRE6fy46FeHq t0HY6z9aubBWCIXJDMRZtyETmRPr5zENm+ofLIqXYQnwdDViKoPsuYckwezVTLcql05AU/Rkf X9Ih6uDQ8jjxnwDibmGraPOu8VtatT7lYw2ww7kR5N+f67S0NJPV/+8IpL94Gdhb2Hvc4lBIm lOKDD1NRdC/G/8NqiDet6tR7S26GgfDUUgM78+r9UT696wxJLKtYRbedYBd8xO8EbqkKoNej+ zqLCgK7Gdaiocdof+X/2e8JTRaJZNJNGZ+dZQPf/O376ZsD+9LXGTWzAZ+X6cRd1Acms= Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland When the hardware is operating in classic mode the SONIC on-board Ethernet IRQ is routed to nubus IRQ 9 instead of directly to the CPU at level 3. This does not affect the framebuffer which although it exists in slot 9, has its own dedicated IRQ on the Quadra 800 hardware. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-7-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 57 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 0093872d8923..7a8de089f4d8 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -101,6 +101,7 @@ struct GLUEState { M68kCPU *cpu; uint8_t ipr; uint8_t auxmode; + qemu_irq irqs[1]; }; #define GLUE_IRQ_IN_VIA1 0 @@ -108,27 +109,40 @@ struct GLUEState { #define GLUE_IRQ_IN_SONIC 2 #define GLUE_IRQ_IN_ESCC 3 +#define GLUE_IRQ_NUBUS_9 0 + static void GLUE_set_irq(void *opaque, int irq, int level) { GLUEState *s = opaque; int i; - switch (irq) { - case GLUE_IRQ_IN_VIA1: - irq = 5; - break; - - case GLUE_IRQ_IN_VIA2: - irq = 1; - break; - - case GLUE_IRQ_IN_SONIC: - irq = 2; - break; - - case GLUE_IRQ_IN_ESCC: - irq = 3; - break; + if (s->auxmode) { + /* Classic mode */ + switch (irq) { + case GLUE_IRQ_IN_SONIC: + /* Route to VIA2 instead */ + qemu_set_irq(s->irqs[GLUE_IRQ_NUBUS_9], level); + return; + } + } else { + /* A/UX mode */ + switch (irq) { + case GLUE_IRQ_IN_VIA1: + irq = 5; + break; + + case GLUE_IRQ_IN_VIA2: + irq = 1; + break; + + case GLUE_IRQ_IN_SONIC: + irq = 2; + break; + + case GLUE_IRQ_IN_ESCC: + irq = 3; + break; + } } if (level) { @@ -186,9 +200,12 @@ static Property glue_properties[] = { static void glue_init(Object *obj) { DeviceState *dev = DEVICE(obj); + GLUEState *s = GLUE(dev); qdev_init_gpio_in(dev, GLUE_set_irq, 8); qdev_init_gpio_in_named(dev, glue_auxmode_set_irq, "auxmode", 1); + + qdev_init_gpio_out(dev, s->irqs, 1); } static void glue_class_init(ObjectClass *klass, void *data) @@ -454,6 +471,14 @@ static void q800_init(MachineState *machine) VIA2_NUBUS_IRQ_9 + i)); } + /* + * Since the framebuffer in slot 0x9 uses a separate IRQ, wire the unused + * IRQ via GLUE for use by SONIC Ethernet in classic mode + */ + qdev_connect_gpio_out(glue, GLUE_IRQ_NUBUS_9, + qdev_get_gpio_in_named(via2_dev, "nubus-irq", + VIA2_NUBUS_IRQ_9)); + nubus = &NUBUS_BRIDGE(dev)->bus; /* framebuffer in nubus slot #9 */ From patchwork Fri Oct 22 07:17:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG4R5dxwz9sRR for ; Fri, 22 Oct 2021 18:21:43 +1100 (AEDT) Received: from localhost ([::1]:56050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdos1-0006fj-Hn for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:21:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonj-0000zA-Oh for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:15 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:41537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003Iu-3T for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:15 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mo7Bb-1n1s8T28RX-00peRp; Fri, 22 Oct 2021 09:17:10 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 7/9] q800: wire up remaining IRQs in classic mode Date: Fri, 22 Oct 2021 09:17:03 +0200 Message-Id: <20211022071705.471954-8-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:piRksRMWMSCZU2eJN0db4zmOBuY/bRV8K+UDyQGra/ATseqR0q7 TngPxg6/2rQPjyr8UO9BcoQwp+5/93Gi82vG9c4+GMVV5Y+KOYRaggUkxBXVUt7GXOzfjGw qlGfOAtePn00Nhj03imS4sEpn1EViN4LOgaCGFfcXe7Nl9Laa9JK+3n5bl1ckKICHa5145I H+FITylIIRFo3FLD6/fhg== X-UI-Out-Filterresults: notjunk:1;V03:K0:PW/GfesSVrU=:mj3aEgIHlm6tpVZ6JFsuU3 26SB54OHZTSBbFEayl06PoYDdv9uqGSfG84ihJwfsVcVqteoO1B5og3nYRHE6YC5A1OyxOHt9 6bpDdge6KwtgDu4g5iRy+a93+96+tF/qKg2E9Oquue54nxYebm40jseWlZvP6jKAZNrhMd7lg BDINnJwtXRHcwr0/4EODyVo1ajXkTUaFS4Bh9ydRxCknZbwik4gorBglTWP4PgDvTDQnjejyN GIGFEtV2WuDGIVJjsrHN5+svjXmnanVe2cd5gM2eevFQP83sygkwHjgmWClfSj0R/i40gDIj7 wnwEc8U5fUdLdRka2TgiXDx89kSF5AZAf0puuvGNiJT3LMWgyYvdp8ufh9aBv/vjRkuVjuOhR /18rQomgG7qY4Xq6Umjm4Svd8/os0n80swDXA97o+tpS8XgotlGI5ZX3AufAOabBsGVIIkOao iQye43dejFX1fb5cwAh3ZFdJIsA822AfaS42mwHysfX+QWvBm+uotqtCHIKvAL+pZQSXGPRIs vJDgvamzkE3V4NKcsPSxmWXUb3GSAhuiXguc7gN7Uuyww1Bte6l/OgtOSJ13ZmuCebIChyZWv ee252httZyN/ivrzGNe460yu3Pp1ZsCPh3/IVRBRtNjHIpIh0DLDO6W8mp+Zt6lmEVcpA0vW+ 51MRPb5JrwABVKGtS0D21gB18fV7mirlkh6uqwqVZ+3mJ1mUYWonhTD2rtml0QNpw/BY= Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland Explicitly wire up the remaining IRQs in classic mode to enable the use of g_assert_not_reached() in the default case to detect any unexpected IRQs. Add a comment explaining the IRQ routing differences in A/UX mode based upon the comments in NetBSD (also noting that at least A/UX 3.0.1 still uses classic mode). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20211020134131.4392-8-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 7a8de089f4d8..83fde3929834 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -111,6 +111,37 @@ struct GLUEState { #define GLUE_IRQ_NUBUS_9 0 +/* + * The GLUE logic on the Quadra 800 supports 2 different IRQ routing modes + * controlled from the VIA1 auxmode GPIO (port B bit 6) which are documented + * in NetBSD as follows: + * + * A/UX mode (Linux, NetBSD, auxmode GPIO low) + * + * Level 0: Spurious: ignored + * Level 1: Software + * Level 2: VIA2 (except ethernet, sound) + * Level 3: Ethernet + * Level 4: Serial (SCC) + * Level 5: Sound + * Level 6: VIA1 + * Level 7: NMIs: parity errors, RESET button, YANCC error + * + * Classic mode (default: used by MacOS, A/UX 3.0.1, auxmode GPIO high) + * + * Level 0: Spurious: ignored + * Level 1: VIA1 (clock, ADB) + * Level 2: VIA2 (NuBus, SCSI) + * Level 3: + * Level 4: Serial (SCC) + * Level 5: + * Level 6: + * Level 7: Non-maskable: parity errors, RESET button + * + * Note that despite references to A/UX mode in Linux and NetBSD, at least + * A/UX 3.0.1 still uses Classic mode. + */ + static void GLUE_set_irq(void *opaque, int irq, int level) { GLUEState *s = opaque; @@ -119,10 +150,25 @@ static void GLUE_set_irq(void *opaque, int irq, int level) if (s->auxmode) { /* Classic mode */ switch (irq) { + case GLUE_IRQ_IN_VIA1: + irq = 0; + break; + + case GLUE_IRQ_IN_VIA2: + irq = 1; + break; + case GLUE_IRQ_IN_SONIC: /* Route to VIA2 instead */ qemu_set_irq(s->irqs[GLUE_IRQ_NUBUS_9], level); return; + + case GLUE_IRQ_IN_ESCC: + irq = 3; + break; + + default: + g_assert_not_reached(); } } else { /* A/UX mode */ @@ -142,6 +188,9 @@ static void GLUE_set_irq(void *opaque, int irq, int level) case GLUE_IRQ_IN_ESCC: irq = 3; break; + + default: + g_assert_not_reached(); } } From patchwork Fri Oct 22 07:17:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544820 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG4V4xHVz9sRR for ; Fri, 22 Oct 2021 18:21:46 +1100 (AEDT) Received: from localhost ([::1]:56340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdos4-0006vA-Fc for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:21:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonk-00010c-Bw for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:16 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:36657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003Iy-J2 for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:16 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MatmF-1nF5Yr3paV-00cTB7; Fri, 22 Oct 2021 09:17:11 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 8/9] q800: add NMI handler Date: Fri, 22 Oct 2021 09:17:04 +0200 Message-Id: <20211022071705.471954-9-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Br282fpXttVP0qBf8ZRrsR1u2lGO+QtO9uNxaX0pMcmwX0Ogk5K N7/2lk2T4PCmBZXIHYu6b4WaX7K8p7+/SzQWQWr9A+oNyzud7iceV1uHoH8psBZ4p2XjSX/ Uev36UdhixA7PhPyrxsMJm+5FlBHg0lZ42Po4y59PZXQz55b2CF/ANkhE+bDV9WCHa+yahm mGfbQUdX7Wq+rcyfLs3dA== X-UI-Out-Filterresults: notjunk:1;V03:K0:0XoiA+e1dR0=:fVs4oNMJBTs8FR3efjg0me TjUpRBCrftugtXsxOHPjb9d/fNwJgDK0ePZkMDrZYvcgeYJRpMmgrgbm4MF6UEyR+XKqMzOEv 0ZV4FKPMpZ9/qpe+c2N9en62ORnUfO23GxvujBMh691cgkJeydfPk9BV5kA4t5HQ1jsMMyijS BbKpDbhXWa8VXSbx3bJ4EzLlXiwfotZzUtNG+pdKQA/11uMoL28IZhVK7IYloW4JQWyLCmGR9 ggqxriG5C2mHzhipyI3mKxJvRA5+8/7zF8OuJ0uq8QBry+9U0+ACpzbGzElbs90qPtB4O5E04 yZORd7KsVba1Ek/Eeh1IF/b5zVWEiimirjiXFC58g3FAzJiazjD01JgR/sjMxarlbK3OzdyY1 m0NX0McaiGmvGv9tsT61dtanWE00Ay5EUNT0Jn7e1a7+Ds9tvjC1TMZrAEdhtbFPhNEpV408k PGfr4MhHoD1OrsdzuxoYgouXAnpr0Nbx5XTwb9aNLQ/0jDkfQlTV4IdzVWbBU17keQjabD1UE UQ8kxlPf/NC2dePkvNw2kTbMFAcYc0fJ/Tdy2r4TFKW5/ep/9RWDbw6Sa4WPXNBpOkGUvVv5n 6J9wAYKUN/bOZIWc11poNJhM2u/INAg8a9+Q9ME9ITXLPrA52MssFnhM3+D5mMojClE+9v0rI DrsLAyY78hE3BSR4T8AhC+3OGyiS/mcrZI9H9BsuPI52eeibUK+3rQ+nAacqESSiK3wc= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland This allows the programmer's switch to be triggered via the monitor for debugging purposes. Since the CPU level 7 interrupt is level-triggered, use a timer to hold the NMI active for 100ms before releasing it again. Signed-off-by: Mark Cave-Ayland Reviewied-by: Laurent Vivier Message-Id: <20211020134131.4392-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 83fde3929834..a081051a8dd5 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -28,6 +28,7 @@ #include "cpu.h" #include "hw/boards.h" #include "hw/or-irq.h" +#include "hw/nmi.h" #include "elf.h" #include "hw/loader.h" #include "ui/console.h" @@ -102,12 +103,14 @@ struct GLUEState { uint8_t ipr; uint8_t auxmode; qemu_irq irqs[1]; + QEMUTimer *nmi_release; }; #define GLUE_IRQ_IN_VIA1 0 #define GLUE_IRQ_IN_VIA2 1 #define GLUE_IRQ_IN_SONIC 2 #define GLUE_IRQ_IN_ESCC 3 +#define GLUE_IRQ_IN_NMI 4 #define GLUE_IRQ_NUBUS_9 0 @@ -167,6 +170,10 @@ static void GLUE_set_irq(void *opaque, int irq, int level) irq = 3; break; + case GLUE_IRQ_IN_NMI: + irq = 6; + break; + default: g_assert_not_reached(); } @@ -189,6 +196,10 @@ static void GLUE_set_irq(void *opaque, int irq, int level) irq = 3; break; + case GLUE_IRQ_IN_NMI: + irq = 6; + break; + default: g_assert_not_reached(); } @@ -216,12 +227,30 @@ static void glue_auxmode_set_irq(void *opaque, int irq, int level) s->auxmode = level; } +static void glue_nmi(NMIState *n, int cpu_index, Error **errp) +{ + GLUEState *s = GLUE(n); + + /* Hold NMI active for 100ms */ + GLUE_set_irq(s, GLUE_IRQ_IN_NMI, 1); + timer_mod(s->nmi_release, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 100); +} + +static void glue_nmi_release(void *opaque) +{ + GLUEState *s = GLUE(opaque); + + GLUE_set_irq(s, GLUE_IRQ_IN_NMI, 0); +} + static void glue_reset(DeviceState *dev) { GLUEState *s = GLUE(dev); s->ipr = 0; s->auxmode = 0; + + timer_del(s->nmi_release); } static const VMStateDescription vmstate_glue = { @@ -231,6 +260,7 @@ static const VMStateDescription vmstate_glue = { .fields = (VMStateField[]) { VMSTATE_UINT8(ipr, GLUEState), VMSTATE_UINT8(auxmode, GLUEState), + VMSTATE_TIMER_PTR(nmi_release, GLUEState), VMSTATE_END_OF_LIST(), }, }; @@ -246,6 +276,13 @@ static Property glue_properties[] = { DEFINE_PROP_END_OF_LIST(), }; +static void glue_finalize(Object *obj) +{ + GLUEState *s = GLUE(obj); + + timer_free(s->nmi_release); +} + static void glue_init(Object *obj) { DeviceState *dev = DEVICE(obj); @@ -255,15 +292,20 @@ static void glue_init(Object *obj) qdev_init_gpio_in_named(dev, glue_auxmode_set_irq, "auxmode", 1); qdev_init_gpio_out(dev, s->irqs, 1); + + /* NMI release timer */ + s->nmi_release = timer_new_ms(QEMU_CLOCK_VIRTUAL, glue_nmi_release, s); } static void glue_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + NMIClass *nc = NMI_CLASS(klass); dc->vmsd = &vmstate_glue; dc->reset = glue_reset; device_class_set_props(dc, glue_properties); + nc->nmi_monitor_handler = glue_nmi; } static const TypeInfo glue_info = { @@ -271,7 +313,12 @@ static const TypeInfo glue_info = { .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(GLUEState), .instance_init = glue_init, + .instance_finalize = glue_finalize, .class_init = glue_class_init, + .interfaces = (InterfaceInfo[]) { + { TYPE_NMI }, + { } + }, }; static void main_cpu_reset(void *opaque) From patchwork Fri Oct 22 07:17:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1544824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HbG7h5NVFz9ssP for ; Fri, 22 Oct 2021 18:24:32 +1100 (AEDT) Received: from localhost ([::1]:36106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdouk-0003wc-Hj for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2021 03:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdonk-00012n-SL for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:16 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:53317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdong-0003J4-RU for qemu-devel@nongnu.org; Fri, 22 Oct 2021 03:17:16 -0400 Received: from quad ([82.142.24.54]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MQNF3-1mI2eU1Jrt-00MKy7; Fri, 22 Oct 2021 09:17:11 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 9/9] q800: drop 8-bit graphic_depth check for Apple 21 inch display Date: Fri, 22 Oct 2021 09:17:05 +0200 Message-Id: <20211022071705.471954-10-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022071705.471954-1-laurent@vivier.eu> References: <20211022071705.471954-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:e6Ho5VKfnKPZvDK2ye4MmhBiIQoEqGucOGEY5yIn3I0ff61PBEX 4yBk/06pr27qTL8uIAeFecvWTJbC3oZyhbO6Gz/vYDTjLJ1UYWveulKCVdOVQEw6q6a3sE6 J+d+V0FXO7F8IcbDfHxPRZBhSD0FXPEiMPAl13GG6hF9w/DdUrVPGe/sn8jVvLKMh0sBjaD 176/X8m3CNqFQUL9PHyYQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:iS+1pJcZir8=:3np9dsTFLp8GsDQt+n5r/6 6XRdwZP8aJUf39uIkUZDVeyOSwyPVSp7mudPlwqqnjh2XyTkGepMekTZhcmJ9TfRfbtq2+WOv FlAJij1+oP5OIRSxLKYyFxvqiHYj3w038d0du64+Fgm+4pWiTnIs6Pe3ZAqmY295bOSUDVkg4 hpn7mXMoN8BLCB3ApbOQGZG7QBmbObob9nMvrqFbAsZR+AK6MITaS5f8OA6zEavzBMK7tn8LV vLqVpwFnwbtpRIbgDz+VHAAop+SNn3ro80BCHZ3dYJ6nAKxVbRgHkOwxzq+VQ/+lz4wRNGKru yP5PbwOFv0dxdilZTgoLX/J9tznFHCytUNrIs3HL3wb46qVcIY3fUc5euNJAyr+icoNYiiDYe 29AzwCckHOdUbviVkquitF5ICc2lFSqImHBu3NKVcurEFw25WPyKbHVOm4Os9cIB/+FPeGLiA jc/ZiMCIBfBW9acWVoBRSbv4Z/uyVEPYA1Xeg8xR+5qmexYgzvWk41hbuAq9D7uAMpQElziz5 B/7lCEiqQDCJ+K3Giwf8dGUiuOeUizINgwQ3+JDvavrO2+XcAtOwKMTCsAPg9aiwwUYd96cq0 FFxRQesmQ0xtC1FoPlDryWzD9EScCTEn0M66qmn9kQYmZuV2zGPjyw41inu93I6gju2iWRLxt nPEso3EUQ13B0uwJTlst/JCHRnVk8F57EmS6l8eA7o28SjooWF0P40lk1JNjX5+wfr/Y= Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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: Mark Cave-Ayland , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland The graphic_depth check is no longer required since commit df8abbbadf ("macfb: add common monitor modes supported by the MacOS toolbox ROM") which introduced code in macfb_common_realize() to only allow the resolutions/depths provided in macfb_mode_table to be specified for each display type. Signed-off-by: Mark Cave-Ayland Fixes: df8abbbadf ("macfb: add common monitor modes supported by the MacOS toolbox ROM") Message-Id: <20211020141810.7875-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/m68k/q800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index a081051a8dd5..e4c7c9b88ad0 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -584,7 +584,7 @@ static void q800_init(MachineState *machine) qdev_prop_set_uint32(dev, "width", graphic_width); qdev_prop_set_uint32(dev, "height", graphic_height); qdev_prop_set_uint8(dev, "depth", graphic_depth); - if (graphic_width == 1152 && graphic_height == 870 && graphic_depth == 8) { + if (graphic_width == 1152 && graphic_height == 870) { qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_APPLE_21_COLOR); } else { qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_VGA);