mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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
This commit is contained in:
parent
2452731c88
commit
55d284af8e
5 changed files with 290 additions and 8 deletions
|
@ -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[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue