From nobody Sat Apr 5 01:13:00 2025 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=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1738962507; cv=none; d=zohomail.com; s=zohoarc; b=K6r10vFiQBCrcWkj7sMAI8ETk3zNF9lHsDMTot3ILemebAOyTesCq3SOAh9jqB1Kx1cGTJPsLXL9UG6hU6XwwxTP0fcAeB3Hu6HxDjXroS5tQ3FTHPXuS8YNCfijjCNdFR+3R3pxJPvYZXGkufPlihgSG29c6AT0lSOVdpPE1GA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738962507; h=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=vq9QzhxD4mvfdari5+y2ltvNrtGpF2ziVAzKmaxoPmw=; b=RO67xGNxN00S1ZdJP/iz1ZQQOEtHIYPBmFNlHyZh/ieZyfSUtwQP1ONB9Yf45Iat5W3tFm9JXmqfSD05x12aQ24h4p+OYYqi9j8NWxLPEhZbRIchwy2BmBRO2+g7xn+DWtjE8r6j7hQOS2eJCBEgLT2d+pF4OFFV03tU5cSebH4= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1738962507217412.1883694793704; Fri, 7 Feb 2025 13:08:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tgVXt-0005QE-R1; Fri, 07 Feb 2025 16:05:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tgVXr-0005P9-B3 for qemu-devel@nongnu.org; Fri, 07 Feb 2025 16:05:51 -0500 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tgVXo-0001sE-Uw for qemu-devel@nongnu.org; Fri, 07 Feb 2025 16:05:51 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 621285C71B6; Fri, 7 Feb 2025 21:05:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1BEDC4CEE5; Fri, 7 Feb 2025 21:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738962346; bh=LN0dnrIDGZQR72H3wmJeJtnzrcc5u2AjRrx48WJYYTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mcn4FTFk5X1mU+BjxsXmVR/o7Vw7fWtB7DT3f0jlJpKxXDPL8IQDkSrZFa+aujsS/ y8fyeLyNI3zuk0oyAeL7XdlBtoUqJ3HgA6JcWCQkXK6BMJMcJqm6t44yylBaXsgaBz 4Z7OV6/HWnR/mspxzgeUSDXvhRHqEP1WrgdfTAD53r9m4Z5l8rrDZF4aGroZ3Ym3uw kk/pn177kbJuzZWqvUJ15wgNaotcmhOA8n37JtYcAmNq8Q2n4nOslJPm5GUME2GwSF mTdramlZpXLpTR2s/nMRGkDQTSyVG7BLPVe/ThLwQBQ6/n6qpFwAe32jjgHJCvsgE6 dfw5hyOghBqdg== From: deller@kernel.org To: qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Richard Henderson , Helge Deller Subject: [PULL 2/6] hw/hppa: Wire up Diva GSP card Date: Fri, 7 Feb 2025 22:05:36 +0100 Message-ID: <20250207210540.24594-3-deller@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250207210540.24594-1-deller@kernel.org> References: <20250207210540.24594-1-deller@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2604:1380:4641:c500::1; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 Precedence: list List-Id: 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 @kernel.org) X-ZM-MESSAGEID: 1738962508375019100 Content-Type: text/plain; charset="utf-8" From: Helge Deller Until now we used a standard serial-pci device to emulate a HP serial console. This worked nicely with 32-bit Linux and 32-bit HP-UX, but 64-bit HP-UX crashes with it and expects either a Diva GSP card, or a real 64-bit capable PCI graphic card (which we don't have yet). In order to continue with 64-bit HP-UX, switch over to the recently added Diva GSP card emulation. Signed-off-by: Helge Deller --- hw/hppa/Kconfig | 1 + hw/hppa/machine.c | 31 +++++++++++-------------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index 9312c4294a..cab21045de 100644 --- a/hw/hppa/Kconfig +++ b/hw/hppa/Kconfig @@ -11,6 +11,7 @@ config HPPA_B160L select LASI select SERIAL_MM select SERIAL_PCI + select DIVA_GSP select ISA_BUS select I8259 select IDE_CMD646 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index b6135d9526..9c98b4c229 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -383,26 +383,17 @@ static void machine_HP_common_init_tail(MachineState = *machine, PCIBus *pci_bus, =20 pci_init_nic_devices(pci_bus, mc->default_nic); =20 - /* BMC board: HP Powerbar SP2 Diva (with console only) */ - pci_dev =3D pci_new(-1, "pci-serial"); - if (!lasi_dev) { - /* bind default keyboard/serial to Diva card */ - qdev_prop_set_chr(DEVICE(pci_dev), "chardev", serial_hd(0)); - } - qdev_prop_set_uint8(DEVICE(pci_dev), "prog_if", 0); - pci_realize_and_unref(pci_dev, pci_bus, &error_fatal); - pci_config_set_vendor_id(pci_dev->config, PCI_VENDOR_ID_HP); - pci_config_set_device_id(pci_dev->config, 0x1048); - pci_set_word(&pci_dev->config[PCI_SUBSYSTEM_VENDOR_ID], PCI_VENDOR_ID_= HP); - pci_set_word(&pci_dev->config[PCI_SUBSYSTEM_ID], 0x1227); /* Powerbar = */ - - /* create a second serial PCI card when running Astro */ - if (serial_hd(1) && !lasi_dev) { - pci_dev =3D pci_new(-1, "pci-serial-4x"); - qdev_prop_set_chr(DEVICE(pci_dev), "chardev1", serial_hd(1)); - qdev_prop_set_chr(DEVICE(pci_dev), "chardev2", serial_hd(2)); - qdev_prop_set_chr(DEVICE(pci_dev), "chardev3", serial_hd(3)); - qdev_prop_set_chr(DEVICE(pci_dev), "chardev4", serial_hd(4)); + /* BMC board: HP Diva GSP */ + dev =3D qdev_new("diva-gsp"); + if (!object_property_get_bool(OBJECT(dev), "disable", NULL)) { + pci_dev =3D pci_new_multifunction(PCI_DEVFN(2, 0), "diva-gsp"); + if (!lasi_dev) { + /* bind default keyboard/serial to Diva card */ + qdev_prop_set_chr(DEVICE(pci_dev), "chardev1", serial_hd(0)); + qdev_prop_set_chr(DEVICE(pci_dev), "chardev2", serial_hd(1)); + qdev_prop_set_chr(DEVICE(pci_dev), "chardev3", serial_hd(2)); + qdev_prop_set_chr(DEVICE(pci_dev), "chardev4", serial_hd(3)); + } pci_realize_and_unref(pci_dev, pci_bus, &error_fatal); } =20 --=20 2.47.0