Skip to content

Commit efd0c37

Browse files
mcaylandvivier
authored andcommitted
q800: wire macfb IRQ to separate video interrupt on VIA2
Whilst the in-built Quadra 800 framebuffer exists within the Nubus address space for slot 9, it has its own dedicated interrupt on VIA2. Force the macfb device to occupy slot 9 in the q800 machine and wire its IRQ to the separate video interrupt since this is what is expected by the MacOS interrupt handler. Signed-off-by: Mark Cave-Ayland <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Laurent Vivier <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
1 parent c7a2f7b commit efd0c37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

hw/m68k/q800.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,10 @@ static void q800_init(MachineState *machine)
407407
MAC_NUBUS_FIRST_SLOT * NUBUS_SUPER_SLOT_SIZE);
408408
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, NUBUS_SLOT_BASE +
409409
MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE);
410-
411-
for (i = 0; i < VIA2_NUBUS_IRQ_NB; i++) {
410+
qdev_connect_gpio_out(dev, 9,
411+
qdev_get_gpio_in_named(via2_dev, "nubus-irq",
412+
VIA2_NUBUS_IRQ_INTVIDEO));
413+
for (i = 1; i < VIA2_NUBUS_IRQ_NB; i++) {
412414
qdev_connect_gpio_out(dev, 9 + i,
413415
qdev_get_gpio_in_named(via2_dev, "nubus-irq",
414416
VIA2_NUBUS_IRQ_9 + i));
@@ -419,6 +421,7 @@ static void q800_init(MachineState *machine)
419421
/* framebuffer in nubus slot #9 */
420422

421423
dev = qdev_new(TYPE_NUBUS_MACFB);
424+
qdev_prop_set_uint32(dev, "slot", 9);
422425
qdev_prop_set_uint32(dev, "width", graphic_width);
423426
qdev_prop_set_uint32(dev, "height", graphic_height);
424427
qdev_prop_set_uint8(dev, "depth", graphic_depth);

0 commit comments

Comments
 (0)