Am 02.06.2011 um 20:58 schrieb Alexander Graf:
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, renedering the VM reboot-less.
rendering
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 <ag...@suse.de> --- v1 -> v2: - change name to mpc8544-guts - rename file accordingly - implement PVR and SVR registers - add stub register defines - add stderr printf when accessing unknown register v2 -> v3: - show subsystem in printfs ---
[...]
diff --git a/hw/mpc8544_guts.c b/hw/mpc8544_guts.c new file mode 100644 index 0000000..ebe15ac --- /dev/null +++ b/hw/mpc8544_guts.c
[...]
+static void mpc8544_pci_register(void) +{ + sysbus_register_withprop(&mpc8544_guts_info); +} +device_init(mpc8544_pci_register);
Is the naming mpc8544_pci_register() intentional? I would find mpc8544_guts_register() more intuitive since the file is called mpc8544_guts.c.
Otherwise looks okay to me. Andreas