From 55d284af8e31bbdf4d545cb2d6481cd0367680fb Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 20 Aug 2013 14:54:31 +0100 Subject: target-arm: Implement the generic timer The ARMv7 architecture specifies a 'generic timer' which is implemented via cp15 registers. Newer kernels will prefer to use this rather than a devboard-level timer. Implement the generic timer for TCG; for KVM we will already use the hardware's virtualized timer for this. Signed-off-by: Peter Maydell Tested-by: Laurent Desnogues Message-id: 1376065080-26661-4-git-send-email-peter.maydell@linaro.org --- target-arm/machine.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'target-arm/machine.c') diff --git a/target-arm/machine.c b/target-arm/machine.c index 6d4c2d4..5b6f375 100644 --- a/target-arm/machine.c +++ b/target-arm/machine.c @@ -222,9 +222,9 @@ static int cpu_post_load(void *opaque, int version_id) const VMStateDescription vmstate_arm_cpu = { .name = "cpu", - .version_id = 12, - .minimum_version_id = 12, - .minimum_version_id_old = 12, + .version_id = 13, + .minimum_version_id = 13, + .minimum_version_id_old = 13, .pre_save = cpu_pre_save, .post_load = cpu_post_load, .fields = (VMStateField[]) { @@ -257,6 +257,8 @@ const VMStateDescription vmstate_arm_cpu = { VMSTATE_UINT32(env.exclusive_val, ARMCPU), VMSTATE_UINT32(env.exclusive_high, ARMCPU), VMSTATE_UINT64(env.features, ARMCPU), + VMSTATE_TIMER(gt_timer[GTIMER_PHYS], ARMCPU), + VMSTATE_TIMER(gt_timer[GTIMER_VIRT], ARMCPU), VMSTATE_END_OF_LIST() }, .subsections = (VMStateSubsection[]) { -- cgit v1.1