drv-i8042 is the userspace i8042 controller owner for EriX input bring-up.
Find a file
Erik Inkinen 77cac3b4cf
All checks were successful
CI / test (push) Successful in 5s
drv-i8042: drop unstable rustfmt options for stable toolchains
2026-03-23 10:19:51 +02:00
.github phase3-input: add i8042 driver daemon 2026-03-11 12:18:33 +02:00
src drv-i8042: rely on startup endpoint handoff 2026-03-21 03:31:23 +02:00
.editorconfig Initial commit 2026-03-11 10:15:37 +01:00
.gitignore Initial commit 2026-03-11 10:15:37 +01:00
ARCHITECTURE.md phase3-input: align i8042 base and document driver contracts 2026-03-11 14:14:07 +02:00
Cargo.toml phase3-input: add i8042 driver daemon 2026-03-11 12:18:33 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-11 10:15:37 +01:00
CONTRIBUTING.md Initial commit 2026-03-11 10:15:37 +01:00
LICENSE Initial commit 2026-03-11 10:15:37 +01:00
linker.ld phase3-input: align i8042 base and document driver contracts 2026-03-11 14:14:07 +02:00
README.md phase3-input: align i8042 base and document driver contracts 2026-03-11 14:14:07 +02:00
ROADMAP.md phase3-input: align i8042 base and document driver contracts 2026-03-11 14:14:07 +02:00
rustfmt.toml drv-i8042: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:51 +02:00
SECURITY.md Initial commit 2026-03-11 10:15:37 +01:00

drv-i8042

drv-i8042 is the userspace i8042 controller owner for EriX input bring-up.

It reads controller bytes via kernel port-I/O control operations and exposes separate keyboard and mouse byte streams to PS/2 protocol translators.

What it does

  • Validates startup envelope and role (SERVICE_ROLE_DRV_I8042).
  • Registers itself with named in input mode.
  • Polls i8042 status/data ports through kernel-control ops:
    • IPC_KERNEL_CONTROL_OP_IOPORT_READ8 (22)
    • IPC_KERNEL_CONTROL_OP_IOPORT_WRITE8 (23)
  • Maintains separate bounded rings for keyboard and mouse bytes.
  • Exposes driver RPC API:
    • READ_KEYBOARD_BYTE (0x5E0)
    • READ_MOUSE_BYTE (0x5E1)
    • READ_STATS (0x5E2)
    • INJECT_TEST_PATTERN (0x5E3)

Test-pattern behavior

INJECT_TEST_PATTERN exists for deterministic smoke/integration input validation. In runtime mode it returns DENIED; in smoke mode it can inject a fixed keyboard+mouse sample pattern.

Runtime model

  • Single-threaded loop.
  • Fixed message buffer (1024 bytes).
  • Fixed keyboard and mouse rings (256 entries each).
  • No dynamic allocation.

Feature flags

  • drv-i8042-runtime
  • drv-i8042-runtime-phase3-input
  • compatibility aliases:
    • drv-i8042-integration-smoke
    • drv-i8042-integration-phase3-input
    • drv-i8042-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-service
  • ipc-syscall-x86_64

No third-party crates are used.