Private, read-only CMOS real-time-clock provider supplying authenticated wall-clock samples to EriX timed.
  • Rust 90.6%
  • Python 8.6%
  • Linker Script 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 8f1eb5eebb
All checks were successful
CI / markdown (push) Successful in 11s
CI / rust (push) Successful in 1m28s
chore: Merge native CLI development into main
Merge the selected feature/native-cli history with an explicit two-parent commit so main retains the development lineage and the validated source snapshot. The resulting tree is identical to the selected feature commit; no dependency pins or runtime behavior are changed by this merge.

Previous main: df5fd5fb34
Selected feature: a482e6fb28

Publish this integration point following the requested cross-repository merge. Preserve the feature branch and immutable dependency objects for reproducibility; do not squash, rebase or rewrite existing commits.
2026-09-12 08:28:41 +03:00
.github fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
scripts fix: Isolate the RTC process stack 2026-08-28 19:34:37 +03:00
src fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
.editorconfig Initial commit 2026-08-22 06:57:47 +02:00
.gitignore Initial commit 2026-08-22 06:57:47 +02:00
.markdownlint-cli2.yaml Initial commit 2026-08-22 06:57:47 +02:00
ARCHITECTURE.md fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
Cargo.toml fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:09 +03:00
CONTRIBUTING.md fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
LICENSE Initial commit 2026-08-22 06:57:47 +02:00
linker.ld fix: Isolate the RTC process stack 2026-08-28 19:34:37 +03:00
README.md fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
ROADMAP.md fix: Align RTC startup fixtures with delegated provider slots 2026-09-12 07:36:14 +03:00
rustfmt.toml Initial commit 2026-08-22 06:57:47 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:09 +03:00

drv-rtc-cmos

drv-rtc-cmos is the private CMOS real-time-clock provider for EriX. It reads one stable UTC wall-clock sample and submits that sample to timed over a dedicated authenticated route.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust. Project design documents live in the docs repository.

Purpose of This Repository

The maintained responsibilities are:

  • validate the exact RTC1 startup tail and live capability inventory
  • access only the kernel-mediated read-only CMOS RTC selector/data operations
  • require update-in-progress to be clear around two identical snapshots
  • decode BCD or binary and 12-hour or 24-hour RTC representations
  • convert validated UTC civil fields in years 1970 through 9999 to Unix seconds
  • submit one whole-second sample through the private send-only timed route
  • report ready only after timed accepts that sample; when one bounded hardware attempt yields no valid sample, report optional-provider readiness without submission so timed remains explicitly unavailable
  • terminate after acknowledgement so all temporary hardware/provider authority is torn down with the process

The driver cannot write CMOS data, set the clock, mask NMI, select unrelated CMOS storage, discover timed through named, or receive public time queries. Its fixed selectors are seconds (00), minutes (02), hours (04), day (07), month (08), year (09), status A/B (0A/0B), and the QEMU-default century register (32).

Runtime Packaging

drv-rtc-cmos is a post-mount executable. It belongs on the ext4 runtime partition and must be materialized and started through loaderd/dynlinkd/procd; it is not a boot.img executable. The local linker contract produces an ELF64 x86_64 position-independent executable with drv_rtc_cmos_entry as its entry. A distinct terminal 32-KiB writable reserve backs the downward-growing entry stack without overlapping the driver's ordinary IPC state.

Development

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features
RUSTFLAGS='-D warnings' cargo build --all-targets --all-features
RUSTFLAGS='-D warnings -C link-arg=-Tlinker.ld' \
  cargo build --target x86_64-unknown-none --features drv-rtc-cmos-runtime
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features

Integration may additionally compile the runtime with drv-rtc-cmos-integration-malformed-sample. That adversarial build changes only the serialized descriptive nanosecond field to its first invalid value. It constructs the otherwise canonical body before the deliberate wire mutation, then reports ready only after timed returns the exact correlated rejection with no accepted sequence. Production profiles never select the feature, and it adds no route, selector, or capability.

Internal dependencies use full 40-character commit rev pins: lib-bootstrap, lib-capabi, lib-ipc, lib-time, and ipc-syscall-x86_64. Integration and CI caches preserve the selected Git objects. No external crates are used.

Clean-Room and Authority Policy

No external source code or crate may be copied into this repository. All runtime authority must arrive through the documented startup capability transfer, must be validated before use, and must not survive beyond the one-shot provider lifetime. Clean provider exit after readiness is the expected lifecycle, not a restart-triggering service failure.

License and Contact

The repository uses the ISC License. Development occurs in the EriX organization; maintainers can be reached at admin@erikinkinen.fi.