On the RV1106 the boot firmware does not enter the kernel in HYP mode and
leaves CNTVOFF non-zero. The DT timer node lists no virtual-timer PPI, so
the kernel keeps time on the physical counter, while the arm32 vDSO always
reads the virtual one: on bench a clock_gettime() ran 738.9 s ahead of the
kernel clock (pure offset, -0.1 ppm over 30 s) and every absolute deadline
taken from it expired minutes late (flare-edge#2319, the #2311 reset loop).
New patch 82-arch-timer-vdso-phys-counter.patch:
- rv1106.dtsi and rv1106-warden-m2.dts: the timer node carries
arm,cpu-registers-not-fw-configured. The kernel keeps the physical
timer it uses today, and arch/arm/kernel/vdso.c drops the vDSO clock
symbols, so libc goes straight to the syscall.
- arm_arch_timer.c: on arm32, a kernel on the physical counter without
HYP mode sets the counter's vdso_clock_mode to VDSO_CLOCKMODE_NONE, the
safety net for a device tree without the property. QEMU -M virt (virtual
PPI present) is unchanged.
tests/arch-timer/check-vdso-counter.py checks both guards in the patched
tree; CI's patches-apply job runs it and its 12 regression cases.
Fixes#35
Refs flare-edge#2319
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG