summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2015-03-02 22:23:27 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2015-03-10 09:36:19 +0000
commitf3b18f35a23c60edbda6420cd4bd30b8bb11ea80 (patch)
treea48b282c761cd165a77e9ff29b4b5bc0038c2843
parentf2416d3ae4d38a078f0ff7662b26bed9b61f8096 (diff)
downloadqemu-f3b18f35a23c60edbda6420cd4bd30b8bb11ea80.zip
sun4u: switch m48t59 NVRAM to MMIO access
Real sun4u systems memory-map the NVRAM on the (ISA) ebus, so switch over to MMIO from ioport access whilst setting the base year to 1968 as used by Sun systems. This allows all SPARC64 OSs included in my tests to correctly detect the NVRAM IC and read the hardware clock correctly upon boot. Note that this also requires a corresponding OpenBIOS update to r1330 in order to switch the SPARC64 NVRAM accessors over from ioport to MMIO. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--hw/sparc64/sun4u.c10
-rw-r--r--pc-bios/openbios-ppcbin746588 -> 746588 bytes
-rw-r--r--pc-bios/openbios-sparc32bin381512 -> 381512 bytes
-rw-r--r--pc-bios/openbios-sparc64bin1616768 -> 1616768 bytes
m---------roms/openbios0
5 files changed, 8 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 53aec80102..f027caf909 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -612,7 +612,7 @@ pci_ebus_init1(PCIDevice *pci_dev)
0, 0x1000000);
pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0);
memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(),
- 0, 0x1000);
+ 0, 0x4000);
pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1);
return 0;
}
@@ -825,6 +825,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry;
PCIBus *pci_bus, *pci_bus2, *pci_bus3;
ISABus *isa_bus;
+ SysBusDevice *s;
qemu_irq *ivec_irqs, *pbm_irqs;
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
DriveInfo *fd[MAX_FD];
@@ -868,8 +869,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
fd[i] = drive_get(IF_FLOPPY, 0, i);
}
fdctrl_init_isa(isa_bus, fd);
- nvram = m48t59_init_isa(isa_bus, 0x0074, NVRAM_SIZE, 2000, 59);
+ /* Map NVRAM into I/O (ebus) space */
+ nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
+ s = SYS_BUS_DEVICE(nvram);
+ memory_region_add_subregion(get_system_io(), 0x2000,
+ sysbus_mmio_get_region(s, 0));
+
initrd_size = 0;
initrd_addr = 0;
kernel_size = sun4u_load_kernel(machine->kernel_filename,
diff --git a/pc-bios/openbios-ppc b/pc-bios/openbios-ppc
index 994052f14d..91e4193c2d 100644
--- a/pc-bios/openbios-ppc
+++ b/pc-bios/openbios-ppc
Binary files differ
diff --git a/pc-bios/openbios-sparc32 b/pc-bios/openbios-sparc32
index 6d5a381a7f..d693865c32 100644
--- a/pc-bios/openbios-sparc32
+++ b/pc-bios/openbios-sparc32
Binary files differ
diff --git a/pc-bios/openbios-sparc64 b/pc-bios/openbios-sparc64
index 61bd46bf44..e5d9e5a7b1 100644
--- a/pc-bios/openbios-sparc64
+++ b/pc-bios/openbios-sparc64
Binary files differ
diff --git a/roms/openbios b/roms/openbios
-Subproject 038aa78d3c331731733378a73e778ee620a5b9d
+Subproject b8dea39718916f4d7d391cd1664314d52a45b87