Re: [Q] Is 64bit LVTT screwed

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Maciej W. Rozycki
Date: Monday, July 7, 2008 - 3:08 pm

On Wed, 2 Jul 2008, Cyrill Gorcunov wrote:


 The APIC clock varies across systems so the timer setup includes
calibration.  Which means both variations end up with the correct
interrupt rate probably, except using different divisors.  We used to
print the APIC clock rate and that would be off with one of the above, but
I don't we do this anymore.  We had a similar problem with the 82489DX
where the prescaler was bypassed altogether resulting in an incorrect 
clock rate printed, but the rate of timer interrupt was correctly 
calibrated regardless.

 This is of course merely an explanation why the code you quoted does not
explode spectacularly.  It does not make it correct.  If the prescaler is
indeed set to 16 for 64-bit systems, then APIC_DIVISOR should obviously be
used in the calculation above too.  And if not, then I think the prescaler 
should be set consistently across systems and then the setting reflected 
in the calculations accordingly.  Please note that only values between 2 
and 16 are supported in a uniform way across all the APIC models and using 
low values risks an overflow as clock rates are in the GHz range these 
days already.  The value of 16 seems a reasonable one.

  Maciej
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Q] Is 64bit LVTT screwed, Cyrill Gorcunov, (Wed Jul 2, 11:40 am)
Re: [Q] Is 64bit LVTT screwed, Maciej W. Rozycki, (Mon Jul 7, 3:08 pm)
Re: [Q] Is 64bit LVTT screwed, Cyrill Gorcunov, (Tue Jul 8, 4:38 am)
Re: [Q] Is 64bit LVTT screwed, Cyrill Gorcunov, (Tue Jul 8, 12:09 pm)