qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Bug 1480562] [NEW] register values in sp804 timer


From: Peter Maydell
Subject: Re: [Qemu-devel] [Bug 1480562] [NEW] register values in sp804 timer
Date: Mon, 3 Aug 2015 15:02:28 +0100

On 1 August 2015 at 15:46, T-T Yu <address@hidden> wrote:
> Public bug reported:
>
> In the arm_timer.c, when first reading the load register,  I got 0.
>
> ...
> case 0: /* TimerLoad */
> ...
>
> According to the specification at 
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0271d/index.html,
> "The minimum valid value for TimerXLoad is 1".  Is the initial value
> supposed to be 0xffffffff?

No. See the "summary of registers" table 3.1 in section 3.1,
which lists this register's reset value as zero (and also
section 2.2.6 which agrees that on reset the load register
value is zero).

The text you quote is attempting to describe the minimum
value which it is sensible to write to the register -- it
makes no sense for an OS to write 0 to this register because
it would always just interrupt immediately with no actual
timer function, so the shortest possible timeout is
obtained by writing a 1.

> When the 5th and 7th bit in Control Register are set, RIS and MIS
> remain 0. But should they be enabled (i.e., 0x1 and 0x1) as both
> interrupt and timer module are set.

RIS and MIS will only become 1 when the timer generates an
interrupt. They don't get set merely because the OS has
enabled interrupts.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]