drv-ps2-mouse is the PS/2 pointer protocol translator daemon.
  • Rust 98.8%
  • Linker Script 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen 37a88374e5
All checks were successful
CI / markdown (push) Successful in 10s
CI / test (push) Successful in 1m1s
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: 4b07e74d61
Selected feature: 169400b827

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 build: Pin dependency and CI helper source commits 2026-09-12 07:45:36 +03:00
src perf: Back off empty mouse backend reads 2026-09-05 18:57:00 +03:00
.editorconfig Initial commit 2026-03-11 10:16:01 +01:00
.gitignore Ignore local .ci workspace 2026-04-15 21:52:39 +03:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:09:58 +03:00
ARCHITECTURE.md build: Pin dependency and CI helper source commits 2026-09-12 07:45:36 +03:00
Cargo.toml build: Pin dependency and CI helper source commits 2026-09-12 07:45:36 +03:00
CODE_OF_CONDUCT.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:09 +03:00
CONTRIBUTING.md build: Pin dependency and CI helper source commits 2026-09-12 07:45:36 +03:00
LICENSE Initial commit 2026-03-11 10:16:01 +01:00
linker.ld Keep stack reserve pages in runtime images 2026-04-24 08:29:59 +03:00
README.md build: Pin dependency and CI helper source commits 2026-09-12 07:45:36 +03:00
ROADMAP.md perf: Back off empty mouse backend reads 2026-09-05 18:57:00 +03:00
rustfmt.toml drv-ps2-mouse: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:51 +02:00
SECURITY.md docs: Synchronize shared contribution and review policies 2026-09-12 06:38:09 +03:00

drv-ps2-mouse

drv-ps2-mouse is the EriX PS/2 mouse protocol translator daemon.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust.

Technical requirements are tracked in the EriX requirements, conventions, and project documentation.

See:

  • docs for design documents, specifications, and development plans.
  • Related architecture repositories for kernel, service, library, driver, and integration contracts.

Purpose of This Repository

This repository owns translation between the byte stream supplied by drv-i8042 and normalized pointer events accepted by inputd.

The maintained responsibilities are:

  • validate the exact startup role and delegated capability inventory;
  • consume the mouse-only i8042 stream through its fixed send client;
  • assemble synchronized standard three-byte PS/2 packets;
  • decode their button state and complete nine-bit signed motion counters;
  • detect stream discontinuities before completing a partial packet;
  • append normalized events through the fixed mouse-producer endpoint; and
  • reject unwanted authority and terminate on state whose cleanup or delivery cannot be proven.

Low-level controller access and mouse mode selection belong to drv-i8042. Event retention and routing belong to inputd.

Clean-Room Policy

EriX follows a strict clean-room philosophy:

  • No external source code may be copied.
  • No external Rust crates are allowed.
  • No code generation tools that embed third-party code.
  • All code must be authored within the project.

Violations will result in rejection of the contribution.

License

All EriX repositories are licensed under the ISC License.

Development Model

EriX development is modular, deterministic, reproducible, authority-explicit, security-first, and self-hosting oriented.

Runtime model

  • The daemon is single-threaded and performs at most one mouse read plus one nonblocking service-endpoint receive per scheduling turn.
  • A validated empty controller reply skips exactly seven subsequent backend read turns. Every turn still scans the private receiver; any consumed byte, including a partial decode, permits another read on the next turn. This is a turn bound, not a wall-clock deadline, and introduces no timing authority.
  • Only a correlated NOT_FOUND with zero sequence and byte value arms this backoff. Errors retain the existing fail-stop path, without retry.
  • Idle turns yield cooperatively; no service-local tick or attempt budget limits accepted work.
  • The startup receive buffer is derived from the exact three-transfer role envelope. The reusable peer-call buffer is derived from the larger of the fixed i8042 and inputd message bodies.
  • Required calls retain their request storage from kernel acceptance through the authoritative reply. Accepted replies remain retained through delivery.
  • Complete unwanted capability receipts are dropped before a message is rejected. Uncertain cleanup and terminal peer failures tear down the process so no residual authority remains.
  • Stream sequence gaps, restarts, and rollover discard any partial packet.
  • The decoder preserves the standard packet's full signed displacement range and converts upward-positive PS/2 Y motion to downward-positive screen motion.
  • No heap allocation or runtime service discovery is used.

Feature flags

  • drv-ps2-mouse-runtime
  • drv-ps2-mouse-runtime-input
  • drv-ps2-mouse-integration-smoke
  • drv-ps2-mouse-integration-input
  • drv-ps2-mouse-integration-force-fail

Build and test

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features

Dependencies

  • lib-bootstrap
  • lib-capabi
  • lib-ipc
  • lib-input
  • ipc-syscall-x86_64

All Cargo Git dependencies use full 40-character commit rev pins. Integration source revisions and CI caches preserve those Git objects without branch-head or synthetic-commit substitution. No third-party crates are used.

Dynamic boot artifact evidence

The runtime image packages drv-ps2-mouse as an ELF64 x86_64 ET_DYN executable with authenticated dynamic-link metadata. Catalog and filesystem mirror records establish artifact identity but grant no filesystem, loader, object-store, service-discovery, provider-bypass, block-device, or dynlinkd authority.

Governance Principles

drv-ps2-mouse governance is scoped to its private translation role.

  • deviced and procd own lifecycle; the daemon does not self-register or discover peers.
  • The only steady-state authority is the startup-delegated mouse-read client, mouse-append client, and private receive endpoint.
  • The primary control slot may be zero because this role performs no direct kernel-control operation.
  • Peer replies and unexpected inbound calls must not delegate authority. Complete unwanted receipts are retired before rejection.
  • New hardware modes or peer access require an explicit startup contract and integration coverage.

Contact

Development occurs in the EriX organization and discussions happen in issues and design documents.

No decisions are considered valid without documented rationale.

Maintainers can be reached via email: admin@erikinkinen.fi.