Marco Gerards wrote:
Hi Colin,
Colin D Bennett <[EMAIL PROTECTED]> writes:
What would be the best way to do this? Possibilities that I am aware of
are:
* RDTSC instruction (must calibrate with RTC at startup?)
* HPET (complex to use?)
* RTC (can we set the timer interrupt rate to >18 Hz?)
Does anyone have any thoughts on these options?
I think that using the TSC (w/ RDTSC instruction) and calibrating it
with a quick 2-3 RTC tick loop at startup might be the easiest option.
Only something that really returns a time seems like a good choise to
me. AFAIK RDTSC returns clock cycles that passed since the system was
switched on. This means that code will run faster on a processor with
a higher clock speed. Am I mistaken?
That's way you calibrate it :) Then you can get pretty good accuracy :)
So I prefer something that can be used to wait a microsecond and not a
certain amount of clock cycles. Using the RTC seems a good choice,
but we have to keep in mind the BIOS uses it as well.
Default rate for RTC is bad for any accuracy. At least in this case.
Isn't HPET only available on newer processors?
Yes.
But the idea is to use best possible resolution available. So if choice
A is not there then fallback for choice B. Of course in some cases
animation will not be so smooth. But at least it will work.
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel