[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/25] ppc/pegasos2: Implement power-off RTAS function with VOF
From: |
David Gibson |
Subject: |
[PULL 18/25] ppc/pegasos2: Implement power-off RTAS function with VOF |
Date: |
Thu, 21 Oct 2021 15:20:20 +1100 |
From: BALATON Zoltan <balaton@eik.bme.hu>
This only helps Linux guests as only that seems to use it.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id:
<1c1e030f2bbc86e950b3310fb5922facdc21ef86.1634241019.git.balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/pegasos2.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index 39e96d323f..e427ac2fe0 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -22,6 +22,7 @@
#include "hw/i2c/smbus_eeprom.h"
#include "hw/qdev-properties.h"
#include "sysemu/reset.h"
+#include "sysemu/runstate.h"
#include "hw/boards.h"
#include "hw/loader.h"
#include "hw/fw-path-provider.h"
@@ -429,6 +430,16 @@ static target_ulong pegasos2_rtas(PowerPCCPU *cpu,
Pegasos2MachineState *pm,
qemu_log_mask(LOG_UNIMP, "%c", ldl_be_phys(as, args));
stl_be_phys(as, rets, 0);
return H_SUCCESS;
+ case RTAS_POWER_OFF:
+ {
+ if (nargs != 2 || nrets != 1) {
+ stl_be_phys(as, rets, -1);
+ return H_PARAMETER;
+ }
+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
+ stl_be_phys(as, rets, 0);
+ return H_SUCCESS;
+ }
default:
qemu_log_mask(LOG_UNIMP, "Unknown RTAS token %u (args=%u, rets=%u)\n",
token, nargs, nrets);
--
2.31.1
- [PULL 00/25] ppc-for-6.2 queue 20211021, David Gibson, 2021/10/21
- [PULL 10/25] target/ppc: Fix XER access in gdbstub, David Gibson, 2021/10/21
- [PULL 03/25] target/ppc: Use tcg_constant_i64() in gen_brh(), David Gibson, 2021/10/21
- [PULL 01/25] spapr/xive: Add source status helpers, David Gibson, 2021/10/21
- [PULL 11/25] linux-user: Fix XER access in ppc version of elf_core_copy_regs, David Gibson, 2021/10/21
- [PULL 05/25] hw/ppc/spapr_softmmu: Reduce include list, David Gibson, 2021/10/21
- [PULL 04/25] target/ppc: Fix the test raising the decrementer exception, David Gibson, 2021/10/21
- [PULL 02/25] target/ppc: Use tcg_constant_i32() in gen_setb(), David Gibson, 2021/10/21
- [PULL 18/25] ppc/pegasos2: Implement power-off RTAS function with VOF,
David Gibson <=
- [PULL 19/25] tests/acceptance: Add a test for the bamboo ppc board, David Gibson, 2021/10/21
- [PULL 12/25] target/ppc: Fix XER access in monitor, David Gibson, 2021/10/21
- [PULL 07/25] hw/ppc: Fix iothread locking in the 405 code, David Gibson, 2021/10/21
- [PULL 09/25] linux-user/ppc: Fix XER access in save/restore_user_regs, David Gibson, 2021/10/21
- [PULL 14/25] ppc/pegasos2: Warn when using VOF but no kernel is specified, David Gibson, 2021/10/21
- [PULL 15/25] ppc/pegasos2: Implement get-time-of-day RTAS function with VOF, David Gibson, 2021/10/21
- [PULL 20/25] target/ppc: Filter mtmsr[d] input before setting MSR, David Gibson, 2021/10/21
- [PULL 13/25] ppc/pegasos2: Restrict memory to 2 gigabytes, David Gibson, 2021/10/21
- [PULL 17/25] ppc/pegasos2: Add constants for PCI config addresses, David Gibson, 2021/10/21
- [PULL 16/25] ppc/pegasos2: Access MV64361 registers via their memory region, David Gibson, 2021/10/21