From: deller@kernel.org
To: qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Cc: Helge Deller <deller@gmx.de>,
Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>
Subject: [PATCH 10/10] hw/hppa: Add 715 machine type including NCR710 SCSI
Date: Fri, 17 Oct 2025 22:06:53 +0200 [thread overview]
Message-ID: <20251017200653.23337-11-deller@kernel.org> (raw)
In-Reply-To: <20251017200653.23337-1-deller@kernel.org>
From: Helge Deller <deller@gmx.de>
Add a new emulation for a 715/64 machine.
This machines has no PCI bus, and has the majority of the devices (SCSI,
network, serial ports, ...) provided by a LASI multi-function I/O chip.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/hppa/machine.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 96 insertions(+), 2 deletions(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 7981a8bb11..9be7c46e6b 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -30,6 +30,8 @@
#include "hw/pci-host/astro.h"
#include "hw/pci-host/dino.h"
#include "hw/misc/lasi.h"
+#include "hw/scsi/ncr53c710.h"
+#include "hw/scsi/lasi_ncr710.h"
#include "hppa_hardware.h"
#include "qemu/units.h"
#include "qapi/error.h"
@@ -363,8 +365,20 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
/* SCSI disk setup. */
if (drive_get_max_bus(IF_SCSI) >= 0) {
- dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
- lsi53c8xx_handle_legacy_cmdline(dev);
+ if (pci_bus) {
+ dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+ lsi53c8xx_handle_legacy_cmdline(dev);
+ } else {
+ dev = lasi_ncr710_init(addr_space,
+ translate(NULL, LASI_HPA_715 + 0x6000),
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_SCSI_HPA));
+ if (dev) {
+ lasi_ncr710_handle_legacy_cmdline(dev);
+ } else {
+ qemu_log("HPPA Machine: Warning - "
+ "Failed to create LASI NCR710 controller\n");
+ }
+ }
}
/* Graphics setup. */
@@ -537,6 +551,63 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
cpu[0]->env.kernel_entry = kernel_entry;
}
+/*
+ * Create HP 715/64 workstation
+ */
+static void machine_HP_715_init(MachineState *machine)
+{
+ DeviceState *dev;
+ MemoryRegion *addr_space = get_system_memory();
+ TranslateFn *translate;
+ ISABus *isa_bus;
+
+ /* Create CPUs and RAM. */
+ translate = machine_HP_common_init_cpus(machine);
+
+ if (hppa_is_pa20(&cpu[0]->env)) {
+ error_report("The HP 715/64 workstation requires a 32-bit "
+ "CPU. Use '-machine 715' instead.");
+ exit(1);
+ }
+
+ /* Create ISA bus, needed for PS/2 kbd/mouse port emulation */
+ isa_bus = hppa_isa_bus(translate(NULL, IDE_HPA));
+ assert(isa_bus);
+
+ /* Init Lasi chip */
+ lasi_dev = DEVICE(lasi_init());
+ memory_region_add_subregion(addr_space, translate(NULL, LASI_HPA_715),
+ sysbus_mmio_get_region(
+ SYS_BUS_DEVICE(lasi_dev), 0));
+
+ /* Serial ports: Lasi use a 7.272727 MHz clock. */
+ serial_mm_init(addr_space, translate(NULL, LASI_HPA_715 + LASI_UART + 0x800), 0,
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_UART_HPA), 7272727 / 16,
+ serial_hd(0), DEVICE_BIG_ENDIAN);
+
+ /* Parallel port */
+ parallel_mm_init(addr_space, translate(NULL, LASI_HPA_715 + LASI_LPT + 0x800), 0,
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_LPT_HPA),
+ parallel_hds[0]);
+
+ /* PS/2 Keyboard/Mouse */
+ dev = qdev_new(TYPE_LASIPS2);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0,
+ qdev_get_gpio_in(lasi_dev, LASI_IRQ_PS2KBD_HPA));
+ memory_region_add_subregion(addr_space,
+ translate(NULL, LASI_HPA_715 + LASI_PS2),
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(dev),
+ 0));
+ memory_region_add_subregion(addr_space,
+ translate(NULL, LASI_HPA_715 + LASI_PS2 + 0x100),
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(dev),
+ 1));
+
+ /* Add SCSI discs, NICs, graphics & load firmware */
+ machine_HP_common_init_tail(machine, NULL, translate);
+}
+
/*
* Create HP B160L workstation
*/
@@ -743,6 +814,25 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, const void *data)
mc->default_ram_size = 1024 * MiB;
}
+static void HP_715_machine_init_class_init(ObjectClass *oc, const void *data)
+{
+ static const char * const valid_cpu_types[] = {
+ TYPE_HPPA_CPU,
+ NULL
+ };
+ MachineClass *mc = MACHINE_CLASS(oc);
+
+ mc->desc = "HP 715/64 workstation";
+ mc->default_cpu_type = TYPE_HPPA_CPU;
+ mc->valid_cpu_types = valid_cpu_types;
+ mc->init = machine_HP_715_init;
+ /* can only support up to max. 8 CPUs due inventory major numbers */
+ mc->max_cpus = MIN_CONST(HPPA_MAX_CPUS, 8);
+ mc->default_ram_size = 256 * MiB;
+ mc->default_nic = NULL;
+}
+
+
static const TypeInfo hppa_machine_types[] = {
{
.name = TYPE_HPPA_COMMON_MACHINE,
@@ -762,6 +852,10 @@ static const TypeInfo hppa_machine_types[] = {
.name = MACHINE_TYPE_NAME("C3700"),
.parent = TYPE_HPPA_COMMON_MACHINE,
.class_init = HP_C3700_machine_init_class_init,
+ }, {
+ .name = MACHINE_TYPE_NAME("715"),
+ .parent = TYPE_HPPA_COMMON_MACHINE,
+ .class_init = HP_715_machine_init_class_init,
},
};
--
2.51.0
next prev parent reply other threads:[~2025-10-17 20:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 20:06 [PATCH 00/10] HP-PARISC 715 machine with NCR710 SCSI chip deller
2025-10-17 20:06 ` [PATCH 02/10] ncr710: Add driver for the NCR 53c710 " deller
2025-10-22 10:57 ` [PATCH v3 #2a/10] Adding LASI's NCR710 SCSI Controller Wrapper Soumyajyotii Ssarkar
2025-10-22 10:57 ` [PATCH v3 #2b/10] Adding NCR710 SCSI Controller Core logic Soumyajyotii Ssarkar
2025-10-22 19:20 ` [PATCH 02/10] ncr710: Add driver for the NCR 53c710 SCSI chip Philippe Mathieu-Daudé
2025-10-22 20:00 ` Soumyajyotii Ssarkar
2025-10-17 20:06 ` [PATCH 03/10] lasi: Forward LASI SCSI ports to NCR 53c710 driver deller
2025-10-17 20:06 ` [PATCH 04/10] hw/scsi: Add config option for new ncr710 driver deller
2025-10-22 18:49 ` Richard Henderson
2025-10-17 20:06 ` [PATCH 05/10] hw/hppa: Fix firmware end address for LASI chip deller
2025-10-22 18:50 ` Richard Henderson
2025-10-17 20:06 ` [PATCH 06/10] hw/hppa: Fix interrupt of LASI parallel port deller
2025-10-22 18:50 ` Richard Henderson
2025-10-17 20:06 ` [PATCH 07/10] hw/hppa: Add the NCR 710 SCSI driver to hppa machines deller
2025-10-22 18:52 ` Richard Henderson
2025-10-17 20:06 ` [PATCH 08/10] hw/hppa: PCI devices depend on availability of PCI bus deller
2025-10-22 18:59 ` Richard Henderson
2025-10-17 20:06 ` [PATCH 09/10] hw/hppa: Require SeaBIOS version 19 for 715 machine deller
2025-10-22 19:00 ` Richard Henderson
2025-10-17 20:06 ` deller [this message]
2025-10-22 19:10 ` [PATCH 10/10] hw/hppa: Add 715 machine type including NCR710 SCSI Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251017200653.23337-11-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=soumyajyotisarkar23@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).