diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-08-20 14:54:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-08-20 14:54:31 +0100 |
commit | 55d284af8e31bbdf4d545cb2d6481cd0367680fb (patch) | |
tree | 954a9624cca40d7c9bbbd7604f45201472b6a50a /target-arm/machine.c | |
parent | 2452731c883cb0acd4e47b23039c46cd880cf2c6 (diff) | |
download | qemu-55d284af8e31bbdf4d545cb2d6481cd0367680fb.zip qemu-55d284af8e31bbdf4d545cb2d6481cd0367680fb.tar.gz qemu-55d284af8e31bbdf4d545cb2d6481cd0367680fb.tar.bz2 |
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 <peter.maydell@linaro.org>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 1376065080-26661-4-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target-arm/machine.c')
-rw-r--r-- | target-arm/machine.c | 8 |
1 files changed, 5 insertions, 3 deletions
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[]) { |