bsps/x86_64/amd64: Widen the timecounter frequency

The clock driver cast the frequency of the time stamp counter to 32
bits before it gave the value to the timecounter.  A processor above
4.295 GHz got a frequency which was far too low, so every time
reading of the system was wrong.  The member of the timecounter takes
64 bits.

Give the timecounter the frequency as it is.

Update #5729.

Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber
2026-08-31 18:20:25 -05:00
committed by Joel Sherrill
parent dbcfe13b5c
commit a1c612c330
+1 -1
View File
@@ -112,7 +112,7 @@ void amd64_clock_driver_initialize(void)
*/
amd64_clock_tc.tc_get_timecount = amd64_clock_get_timecount;
amd64_clock_tc.tc_counter_mask = 0xffffffff;
amd64_clock_tc.tc_frequency = (uint32_t) amd64_tsc_frequency();
amd64_clock_tc.tc_frequency = amd64_tsc_frequency();
amd64_clock_tc.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER;
rtems_timecounter_install(&amd64_clock_tc);
}