Page MenuHomeFreeBSD

Convert the x86 RTC driver to use new validated BCD<->timespec conversions
AbandonedPublic

Authored by ian on Jan 1 2018, 11:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 15, 5:51 PM
Unknown Object (File)
Sat, Apr 12, 9:25 PM
Unknown Object (File)
Mar 26 2025, 4:43 AM
Unknown Object (File)
Mar 13 2025, 11:19 AM
Unknown Object (File)
Mar 2 2025, 10:22 PM
Unknown Object (File)
Feb 20 2025, 5:39 PM
Unknown Object (File)
Jan 10 2025, 1:28 AM
Unknown Object (File)
Dec 23 2024, 5:18 AM
Subscribers

Details

Reviewers
None
Summary

New common routines were added to kern/subr_clock.c for converting between calendrical time expressed in BCD and struct timespec. The new functions return EINVAL on error, as expected when the clock hardware does not provide valid time.

Test Plan

This code compiles, but has not been tested yet on any x86 hardware (or emulation).

Code has now been run-tested (see PR 224813).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 14249

Event Timeline

Follow changes in D13730... the conversion routines now take a bool flag to indicate whether AM/PM mode conversions need to be done. atrtc always operates in 24-hour mode.