Port-amiga archive

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

Re: Timer issues?



On Fri, 14 Aug 2009, Frank Wille wrote:

Unfortunately the "negative runtime" warning appears, after reverting clock.c.
And when I allow it to print more than once, it will appear exactly every
second. :|

I don't understand where the negative runtime comes from. We have a
monotonic 32-bit timer, don't we?

Since I was seeing a similar problem on my VaxStation 4000/90, I reverted the mask change I made there, and added some checks in vax_mfpr_get_counter. What I see is that the hardclock_ticks remained the same as the previous call to vax_mfpr_get_counter, but the counter value read from the PR_ICR register was smaller, resulting in backwards count returned.

I suspect the same type of thing may be found in the amiga clk_getcounter().

My guess at this time is that the interval counter on both machines has wrapped (and generated an interrupt), but the hardclock() routine hasn't been called yet. On the vax, the cpu is running at IPL_VM each time my check triggers. I don't know off the top of my head what the IPL level of the interval time is on the vax.


--
Michael L. Hitch                        mhitch%montana.edu@localhost
Computer Consultant
Information Technology Center
Montana State University        Bozeman, MT     USA


Home | Main Index | Thread Index | Old Index