mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-10-06 10:59:48 +08:00
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:
committed by
Joel Sherrill
parent
dbcfe13b5c
commit
a1c612c330
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user