[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 04/20] pseries: Implement RTAS system-reboot call
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH 04/20] pseries: Implement RTAS system-reboot call |
Date: |
Sun, 15 Apr 2012 20:38:48 +0200 |
From: David Gibson <address@hidden>
This patch adds the PAPR defined RTAS system-reboot call to the pseries
machine emulation, providing the guest with a way to trigger a reboot.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/spapr_rtas.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c
index 0946585..480a4ae 100644
--- a/hw/spapr_rtas.c
+++ b/hw/spapr_rtas.c
@@ -112,6 +112,19 @@ static void rtas_power_off(sPAPREnvironment *spapr,
rtas_st(rets, 0, 0);
}
+static void rtas_system_reboot(sPAPREnvironment *spapr,
+ uint32_t token, uint32_t nargs,
+ target_ulong args,
+ uint32_t nret, target_ulong rets)
+{
+ if (nargs != 0 || nret != 1) {
+ rtas_st(rets, 0, -3);
+ return;
+ }
+ qemu_system_reset_request();
+ rtas_st(rets, 0, 0);
+}
+
static void rtas_query_cpu_stopped_state(sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args,
@@ -294,6 +307,7 @@ static void core_rtas_register_types(void)
spapr_rtas_register("get-time-of-day", rtas_get_time_of_day);
spapr_rtas_register("set-time-of-day", rtas_set_time_of_day);
spapr_rtas_register("power-off", rtas_power_off);
+ spapr_rtas_register("system-reboot", rtas_system_reboot);
spapr_rtas_register("query-cpu-stopped-state",
rtas_query_cpu_stopped_state);
spapr_rtas_register("start-cpu", rtas_start_cpu);
--
1.7.7
- [Qemu-ppc] [PULL] ppc patch queue 2012-04-15, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 01/20] PPC: Fix TLB invalidation bug within the PPC interrupt handler., Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 03/20] pseries: Fix bug with reset of VIO CRQs, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 04/20] pseries: Implement RTAS system-reboot call,
Andreas Färber <=
- [Qemu-ppc] [PATCH 05/20] pseries: Remove unused fields from VIOsPAPRBus structure, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 07/20] target-ppc: Drop cpu_ppc_close(), Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 11/20] target-ppc: QOM'ify CPU reset, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 09/20] target-ppc: QOM'ify CPU, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 12/20] target-ppc: Fix type casts for w64 (uintptr_t), Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 10/20] target-ppc: Start QOM'ifying CPU init, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 13/20] target-ppc: Init dcache and icache size for e500 user mode, Andreas Färber, 2012/04/15
- [Qemu-ppc] [PATCH 08/20] target-ppc: Add hooks for handling tcg and kvm limitations, Andreas Färber, 2012/04/15