summaryrefslogtreecommitdiff
path: root/hw/sparc/sun4m.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2013-11-02 16:03:50 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2013-11-21 17:38:52 +0100
commitda87dd7bd70f71ceaf9ff40d7cdb8394a7dc4bf5 (patch)
tree3e28a240cb48ad8e6f19f99821bc18f6b10d0ef5 /hw/sparc/sun4m.c
parent394cfa39ba24dd838ace1308ae24961243947fb8 (diff)
downloadqemu-da87dd7bd70f71ceaf9ff40d7cdb8394a7dc4bf5.tar.gz
sun4m: Add FCode ROM for TCX framebuffer
Upstream OpenBIOS now implements SBus probing in order to determine the contents of a physical bus slot, which is required to allow OpenBIOS to identify the framebuffer without help from the fw_cfg interface. SBus probing works by detecting the presence of an FCode program (effectively tokenised Forth) at the base address of each slot, and if present executes it so that it creates its own device node in the OpenBIOS device tree. The FCode ROM is generated as part of the OpenBIOS build and should generally be updated at the same time. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/sparc/sun4m.c')
-rw-r--r--hw/sparc/sun4m.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index a0d366cbbc..94f79508d8 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -537,24 +537,27 @@ static void tcx_init(hwaddr addr, int vram_size, int width,
qdev_prop_set_uint16(dev, "width", width);
qdev_prop_set_uint16(dev, "height", height);
qdev_prop_set_uint16(dev, "depth", depth);
+ qdev_prop_set_uint64(dev, "prom_addr", addr);
qdev_init_nofail(dev);
s = SYS_BUS_DEVICE(dev);
+ /* FCode ROM */
+ sysbus_mmio_map(s, 0, addr);
/* 8-bit plane */
- sysbus_mmio_map(s, 0, addr + 0x00800000ULL);
+ sysbus_mmio_map(s, 1, addr + 0x00800000ULL);
/* DAC */
- sysbus_mmio_map(s, 1, addr + 0x00200000ULL);
+ sysbus_mmio_map(s, 2, addr + 0x00200000ULL);
/* TEC (dummy) */
- sysbus_mmio_map(s, 2, addr + 0x00700000ULL);
+ sysbus_mmio_map(s, 3, addr + 0x00700000ULL);
/* THC 24 bit: NetBSD writes here even with 8-bit display: dummy */
- sysbus_mmio_map(s, 3, addr + 0x00301000ULL);
+ sysbus_mmio_map(s, 4, addr + 0x00301000ULL);
if (depth == 24) {
/* 24-bit plane */
- sysbus_mmio_map(s, 4, addr + 0x02000000ULL);
+ sysbus_mmio_map(s, 5, addr + 0x02000000ULL);
/* Control plane */
- sysbus_mmio_map(s, 5, addr + 0x0a000000ULL);
+ sysbus_mmio_map(s, 6, addr + 0x0a000000ULL);
} else {
/* THC 8 bit (dummy) */
- sysbus_mmio_map(s, 4, addr + 0x00300000ULL);
+ sysbus_mmio_map(s, 5, addr + 0x00300000ULL);
}
}