[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 09/31] PPC: Reset qemu timers when guest reset
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 09/31] PPC: Reset qemu timers when guest reset |
Date: |
Mon, 7 Jan 2013 16:38:38 +0100 |
From: Bharat Bhushan <address@hidden>
This patch install the timer reset handler. This will be called when
the guest is reset.
Signed-off-by: Bharat Bhushan <address@hidden>
[agraf: adjust for QOM'ification]
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc_booke.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/hw/ppc_booke.c b/hw/ppc_booke.c
index 4483b8d..25a4e91 100644
--- a/hw/ppc_booke.c
+++ b/hw/ppc_booke.c
@@ -237,6 +237,17 @@ void store_booke_tcr(CPUPPCState *env, target_ulong val)
}
+static void ppc_booke_timer_reset_handle(void *opaque)
+{
+ PowerPCCPU *cpu = opaque;
+ CPUPPCState *env = &cpu->env;
+
+ env->spr[SPR_BOOKE_TSR] = 0;
+ env->spr[SPR_BOOKE_TCR] = 0;
+
+ booke_update_irq(cpu);
+}
+
void ppc_booke_timers_init(PowerPCCPU *cpu, uint32_t freq, uint32_t flags)
{
ppc_tb_t *tb_env;
@@ -257,4 +268,6 @@ void ppc_booke_timers_init(PowerPCCPU *cpu, uint32_t freq,
uint32_t flags)
qemu_new_timer_ns(vm_clock, &booke_fit_cb, cpu);
booke_timer->wdt_timer =
qemu_new_timer_ns(vm_clock, &booke_wdt_cb, cpu);
+
+ qemu_register_reset(ppc_booke_timer_reset_handle, cpu);
}
--
1.6.0.2
- [Qemu-ppc] [PATCH 07/31] powerpc: linux header sync script includes epapr_hcalls.h, (continued)
- [Qemu-ppc] [PATCH 07/31] powerpc: linux header sync script includes epapr_hcalls.h, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 03/31] openpic: support large vectors on FSL mpic, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 08/31] openpic: fix coding style issues, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 18/31] openpic: always call IRQ_check from IRQ_get_next, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 19/31] Revert "openpic: Accelerate pending irq search", Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 23/31] openpic: IRQ_check: search the queue a word at a time, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 21/31] openpic: add some bounds checking for IRQ numbers, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 29/31] target-ppc: Slim conversion of model definitions to QOM subclasses, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 31/31] PPC: linux-user: Calculate context pointer explicitly, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 26/31] kvm: Update kernel headers, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 09/31] PPC: Reset qemu timers when guest reset,
Alexander Graf <=
- [Qemu-ppc] [PATCH 01/31] openpic: symbolicize some magic numbers, Alexander Graf, 2013/01/07
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/31] ppc patch queue 2013-01-07, Andreas Färber, 2013/01/07
- [Qemu-ppc] [PATCH 27/31] PPC: KVM: set has-idle in guest device tree, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 22/31] openpic: fix sense and priority bits, Alexander Graf, 2013/01/07
- [Qemu-ppc] [PATCH 30/31] target-ppc: Error out for -cpu host on unknown PVR, Alexander Graf, 2013/01/07