]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: extract x86 CMOS I/O from drivers/rtc.c to HAL layer
authorTulio A M Mendes <[email protected]>
Thu, 12 Feb 2026 06:37:06 +0000 (03:37 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:44:55 +0000 (23:44 -0300)
commit5c92d86010c8d572c9bd183e9647ede175d0faf3
treed298a7a7e13f5197048fcda59be82c327a02a000
parent197419ed4305607dae3a3f041246ca30c9f9b83c
refactor: extract x86 CMOS I/O from drivers/rtc.c to HAL layer

Created include/hal/rtc.h with generic HAL RTC interface and
src/hal/x86/rtc.c with x86 CMOS port I/O implementation.

src/drivers/rtc.c is now fully architecture-agnostic: it calls
hal_rtc_read_raw() for hardware access and keeps only the generic
BCD-to-binary conversion and UNIX timestamp calculation logic.

This follows the same HAL pattern used by timer, keyboard, uart,
and video drivers.
include/hal/rtc.h [new file with mode: 0644]
src/drivers/rtc.c
src/hal/x86/rtc.c [new file with mode: 0644]