[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/31] PPC: Reset qemu timers when guest reset
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [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-devel] [PULL 00/31] ppc patch queue 2013-01-07, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 02/31] openpic: remove pcsr (CPU sensitivity register), Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 04/31] openpic: BRR1 is not a CPU-specific register., Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 05/31] openpic: s/opp->nb_irqs -1/opp->nb_cpus - 1/, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 10/31] PPC: fix segfault in signal handling code, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 06/31] openpic: don't crash on a register access without a CPU context, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 03/31] openpic: support large vectors on FSL mpic, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 01/31] openpic: symbolicize some magic numbers, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 07/31] powerpc: linux header sync script includes epapr_hcalls.h, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 08/31] openpic: fix coding style issues, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 09/31] PPC: Reset qemu timers when guest reset,
Alexander Graf <=
- [Qemu-devel] [PATCH 16/31] openpic: make ctpr signed, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 17/31] openpic/fsl: critical interrupts ignore mask before v4.1, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 15/31] openpic: rework critical interrupt support, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 11/31] openpic: fix debug prints, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 20/31] openpic: use standard bitmap operations, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 13/31] ppc/booke: fix crit/mcheck/debug exceptions, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 18/31] openpic: always call IRQ_check from IRQ_get_next, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 12/31] openpic: lower interrupt when reading the MSI register, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 14/31] openpic: make register names correspond better with hw docs, Alexander Graf, 2013/01/07
- [Qemu-devel] [PATCH 31/31] PPC: linux-user: Calculate context pointer explicitly, Alexander Graf, 2013/01/07