Hi Hung-Chun, On 2026-10-28T03:07:09, Hung-Chun Tseng <[email protected]> wrote:
> one, so that "date" and anything else using dm_rtc_get() work on any > virtio-capable QEMU target. Just to check, is this right in practice? The 'date' command uses RTC sequence 0. The ARM and RISC-V 'virt' machines always provide a PL031 or Goldfish RTC, and those boards imply DM_RTC with RTC_PL031 or RTC_GOLDFISH. So with the default configs the virtio RTC is the second RTC and 'date' never reads it, which I suspect is why you disabled RTC_GOLDFISH when testing. On qemu-x86, DM_RTC is not enabled in U-Boot proper, so the driver is not built at all. It might be worth a follow-up adding a sentence to the virtio documentation on how to reach the virtio RTC when a platform RTC is present, e.g. with 'rtc dev', or with an alias if that suits your use case. Regards, Simon
