Bug found
Leon Pollak
leonp at plris.com
Tue Jun 9 10:36:01 UTC 2009
Hello.
In 4.8.0 version the file ../c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c
function clockOn (lines 94-95) has the following text:
decrementer_value = rtems_configuration_get_microseconds_per_tick() *
rtems_cpu_configuration_get_clicks_per_usec() - 1;
while should be:
decrementer_value = rtems_configuration_get_microseconds_per_tick() *
(rtems_cpu_configuration_get_clicks_per_usec() / 4 ) - 1;
(division by 4 is missing).
See G2 Core Reference Manual. It is said (Section 1.1.8.2):
"The decrementer is a 32-bit register that generates a decrementer interrupt
exception after a programmable delay. The contents of the decrementer register
are decremented once every four bus clock cycles, and the decrementer
exception is generated as the count passes through zero."
Thanks.
--
Leon
More information about the users
mailing list