summary refs log tree commit diff stats
path: root/hw/m68k/next-cube.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-12-22 12:59:42 +0000
committerThomas Huth <huth@tuxfamily.org>2024-12-29 07:13:47 +0100
commitd39b0e6832d9b9914e322306628aee341cd26055 (patch)
treeadf7d2e526b462c6da341d8a1c7672d3f528f389 /hw/m68k/next-cube.c
parente1699c7bc84d8ae9da6cbe4407c14059007aa223 (diff)
downloadfocaccia-qemu-d39b0e6832d9b9914e322306628aee341cd26055.tar.gz
focaccia-qemu-d39b0e6832d9b9914e322306628aee341cd26055.zip
next-cube: create new next.scsi container memory region
Move the ESP SCSI and SCSI CSR registers to the new next.scsi container memory
region.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241222130012.1013374-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Diffstat (limited to 'hw/m68k/next-cube.c')
-rw-r--r--hw/m68k/next-cube.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 5f07791707..31c0532aff 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -94,6 +94,7 @@ struct NeXTPC {
 
     MemoryRegion mmiomem;
     MemoryRegion scrmem;
+    MemoryRegion scsimem;
 
     uint32_t scr1;
     uint32_t scr2;
@@ -843,7 +844,12 @@ static void next_scsi_init(DeviceState *pcdev)
     sysbusdev = SYS_BUS_DEVICE(dev);
     sysbus_realize_and_unref(sysbusdev, &error_fatal);
     sysbus_connect_irq(sysbusdev, 0, qdev_get_gpio_in(pcdev, NEXT_SCSI_I));
-    sysbus_mmio_map(sysbusdev, 0, 0x2114000);
+
+    memory_region_init(&next_pc->scsimem, OBJECT(next_pc), "next.scsi", 0x40);
+    memory_region_add_subregion(&next_pc->scsimem, 0x0,
+                                sysbus_mmio_get_region(sysbusdev, 0));
+
+    memory_region_add_subregion(&next_pc->scrmem, 0x14000, &next_pc->scsimem);
 
     next_pc->scsi_reset = qdev_get_gpio_in(dev, 0);
     next_pc->scsi_dma = qdev_get_gpio_in(dev, 1);