x86/time: CMOS RTC may run in binary mode

Indicating it would always use BCD mode is just wrong (and then the
comment there said the opposite). All halfway recent (and really all 64-
bit capable) systems having a CMOS RTC should properly indicate the mode
in control register B.

Make use of the flag, but provide a fallback mechanism in case people run
into systems not matching the above assumption. Additionally, when binary
mode is indicated and when "cmos-rtc-probe" is in use (but "cmos-rtc-bcd"
isn't), probe whether the clock really runs in binary mode. (This probing,
sadly, can take up to 10 seconds.)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger@xenproject.org>
This commit is contained in:
Jan Beulich committed 2026-09-02 15:11:50 +02:00
1 parent 5504b16eea
commit 9d2bbfb797
3 files changed
+58 -2

No files matched your search

+8
View File
@@ -339,6 +339,14 @@ parameter to "stable:socket".
Specify the event count threshold for raising Corrected Machine Check
Interrupts. Specifying zero disables CMCI handling.
### cmos-rtc-bcd (x86)
> `= <boolean>`
> Default: `false`
Flag to indicate the CMOS Real Time Clock uses BCD mode irrespective of
control register B indicating binary mode.
### cmos-rtc-probe (x86)
> `= <boolean>`
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.