diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2021-09-24 08:38:00 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-09-29 10:45:19 +0200 |
commit | 62437f90cf90d1a0fda855f17ca6d9e7c0204f92 (patch) | |
tree | 5c302807e80c1fd2d169f8e48dccdf416e47c745 /hw/m68k | |
parent | 3616f424c911f1b52629cea1fec6ef99e9da07ad (diff) | |
download | qemu-62437f90cf90d1a0fda855f17ca6d9e7c0204f92.zip qemu-62437f90cf90d1a0fda855f17ca6d9e7c0204f92.tar.gz qemu-62437f90cf90d1a0fda855f17ca6d9e7c0204f92.tar.bz2 |
nubus: move nubus to its own 32-bit address space
According to "Designing Cards and Drivers for the Macintosh Family" the Nubus
has its own 32-bit address space based upon physical slot addressing.
Move Nubus to its own 32-bit address space and then use memory region aliases
to map available slot and super slot ranges into the q800 system address
space via the Macintosh Nubus bridge.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210924073808.1041-13-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k')
-rw-r--r-- | hw/m68k/q800.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 5ba87f7..a07912b 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -67,9 +67,6 @@ #define ASC_BASE (IO_BASE + 0x14000) #define SWIM_BASE (IO_BASE + 0x1E000) -#define NUBUS_SUPER_SLOT_BASE 0x60000000 -#define NUBUS_SLOT_BASE 0xf0000000 - #define SONIC_PROM_SIZE 0x1000 /* @@ -396,8 +393,10 @@ static void q800_init(MachineState *machine) dev = qdev_new(TYPE_MAC_NUBUS_BRIDGE); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, NUBUS_SUPER_SLOT_BASE); - sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, NUBUS_SLOT_BASE); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, + MAC_NUBUS_FIRST_SLOT * NUBUS_SUPER_SLOT_SIZE); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, NUBUS_SLOT_BASE + + MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE); nubus = MAC_NUBUS_BRIDGE(dev)->bus; |