mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
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>
This commit is contained in:
parent
3616f424c9
commit
62437f90cf
5 changed files with 44 additions and 7 deletions
|
@ -22,8 +22,20 @@ static void mac_nubus_bridge_init(Object *obj)
|
|||
s->bus->slot_available_mask = MAKE_64BIT_MASK(MAC_NUBUS_FIRST_SLOT,
|
||||
MAC_NUBUS_SLOT_NB);
|
||||
|
||||
sysbus_init_mmio(sbd, &s->bus->super_slot_io);
|
||||
sysbus_init_mmio(sbd, &s->bus->slot_io);
|
||||
/* Aliases for slots 0x9 to 0xe */
|
||||
memory_region_init_alias(&s->super_slot_alias, obj, "super-slot-alias",
|
||||
&s->bus->nubus_mr,
|
||||
MAC_NUBUS_FIRST_SLOT * NUBUS_SUPER_SLOT_SIZE,
|
||||
MAC_NUBUS_SLOT_NB * NUBUS_SUPER_SLOT_SIZE);
|
||||
|
||||
memory_region_init_alias(&s->slot_alias, obj, "slot-alias",
|
||||
&s->bus->nubus_mr,
|
||||
NUBUS_SLOT_BASE +
|
||||
MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE,
|
||||
MAC_NUBUS_SLOT_NB * NUBUS_SLOT_SIZE);
|
||||
|
||||
sysbus_init_mmio(sbd, &s->super_slot_alias);
|
||||
sysbus_init_mmio(sbd, &s->slot_alias);
|
||||
}
|
||||
|
||||
static void mac_nubus_bridge_class_init(ObjectClass *klass, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue