@@ -687,6 +795,29 @@ static void *build_fdt(MachineState *machine, int
*fdt_size)
qemu_fdt_setprop_string(fdt, "/failsafe", "device_type", "serial");
qemu_fdt_setprop_string(fdt, "/failsafe", "name", "failsafe");
+ qemu_fdt_add_subnode(fdt, "/rtas");
+ qemu_fdt_setprop_cell(fdt, "/rtas", "system-reboot", 20);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "hibernate", 19);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "suspend", 18);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "power-off", 17);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "set-indicator", 11);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "display-character", 10);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "write-pci-config", 9);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "read-pci-config", 8);
+ /* Pegasos2 firmware misspells check-exception and guests use that */
+ qemu_fdt_setprop_cell(fdt, "/rtas", "check-execption", 7);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "event-scan", 6);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "set-time-of-day", 4);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "get-time-of-day", 3);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "nvram-store", 2);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "nvram-fetch", 1);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "restart-rtas", 0);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-error-log-max", 0);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-event-scan-rate", 0);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-display-device", 0);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-size", 20);
+ qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-version", 1);