Question
CLOCK_MONOTONIC(_RAW) and STGEN have ~8s difference -- how are they related?
Hi again,
that's how i understood it so far, correct me if i'm wrong:
- openstlinux on STM32MP1 uses arch_sys_counter as clocksource
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
arch_sys_counter- which also serves as clock source for CLOCK_MONOTONIC
- arch_sys_counter uses STGEN as time base.
- this would imply that reading CLOCK_MONOTONIC(_RAW) (sec + nsec) should result in STGEN time values (/ STGEN_FREQ).
When i read STGENR (using the mmap on A7) and CLOCK_MONOTONIC(_RAW) I get the following:
STGEN: 179706903683 = 7487.787653
MON 7479.443003674
MONR 7479.474111358
STGEN: 179706906840 = 7487.787785Do you have any explanation where the ~8 secs difference come from?
Also, what is the most efficient way of reading STGENR from the A7 side in userland? (is it the mmap or is there some more direct way?)
Thanks in advance,
Thomas
