Xen will only store the CompareValue as it can be derived from the
TimerValue (ARM DDI 0487E.a section D11.2.4):
CompareValue = (Counter[63:0] + SignExtend(TimerValue))[63:0]
While the TimerValue is a 32-bit signed value, our implementation
assumed it is a 32-bit unsigned value.
Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
Acked-by: Julien Grall <julien@xen.org>
(cherry picked from commit
3c601c5f056fba055b7a1438b84b69fc649275c3)
}
else
{
- v->arch.phys_timer.cval = cntpct + *r;
+ v->arch.phys_timer.cval = cntpct + (uint64_t)(int32_t)*r;
if ( v->arch.phys_timer.ctl & CNTx_CTL_ENABLE )
{
v->arch.phys_timer.ctl &= ~CNTx_CTL_PENDING;