aboutsummaryrefslogtreecommitdiff
path: root/hw/ppce500_mpc8544ds.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-06-02 13:53:40 +0200
committerAlexander Graf <agraf@suse.de>2011-06-17 02:58:23 +0200
commitb0fb84236da4a36a852010b6b5d5d3ca497a2b68 (patch)
tree870571337a99ee5de81c8150a641b49f80a27bd0 /hw/ppce500_mpc8544ds.c
parenteb47d7c5d96060040931c42773ee07e61e547af9 (diff)
PPC: E500: Implement reboot controller
When Linux reboots an e500 VM, it writes to a magic register in the "global-utilities" device indicated by the device tree. We were not emulating that device so far, rendering the VM reboot-less. This patch implements that device with only the reboot functionality implemented and adds it to the device tree. With this patch applied, I can successfully reboot a -M mpc8544ds VM. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Diffstat (limited to 'hw/ppce500_mpc8544ds.c')
-rw-r--r--hw/ppce500_mpc8544ds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 6b57fbf597..3ba8e75e2b 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -50,6 +50,7 @@
#define MPC8544_PCI_REGS_SIZE 0x1000
#define MPC8544_PCI_IO 0xE1000000
#define MPC8544_PCI_IOLEN 0x10000
+#define MPC8544_UTIL_BASE (MPC8544_CCSRBAR_BASE + 0xe0000)
struct boot_info
{
@@ -270,6 +271,9 @@ static void mpc8544ds_init(ram_addr_t ram_size,
serial_hds[0], 1, 1);
}
+ /* General Utility device */
+ sysbus_create_simple("mpc8544-guts", MPC8544_UTIL_BASE, NULL);
+
/* PCI */
dev = sysbus_create_varargs("e500-pcihost", MPC8544_PCI_REGS_BASE,
mpic[pci_irq_nrs[0]], mpic[pci_irq_nrs[1]],