Hi,
I stumbled across a problem while trying RTAI on a 2.4 Ghz machine, a
divide error occured in rt_request_apic_timers. Even though the CPU
frequency is stored as an unsigned int, it seems it is used in some
places as a signed int, which is a problem for frequencies greater than
2.1 GHz. There is a temporary fix; avoid conversions between signed and
unsigned integers, but the next barrier would be at 4 GHz.
I tried to look at the places where the CPU frequency was used, and
found many places where it was used with the routine imuldiv, whose
arguments type is int. Wondering how this could work on my 2.4 GHz
machine, I had a look at the assembly routines imuldiv, ulldiv, llimd.
I am not an assembly expert, but it looks like these routines use the
unsigned division and multiplication instructions, even when their
arguments are signed integers.
Could anyone with knowledge of assembly language tell me if I am right
about the assembly routines ?
What do you think about storing the CPU frequency in kHz ?
Regards.
--
Gilles Chanteperdrix.