drv-i8042 is the userspace i8042 controller owner for EriX input bring-up.
- Rust 100%
|
|
||
|---|---|---|
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| linker.ld | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
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
namedin 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 (
1024bytes). - Fixed keyboard and mouse rings (
256entries each). - No dynamic allocation.
Feature flags
drv-i8042-runtimedrv-i8042-runtime-phase3-input- compatibility aliases:
drv-i8042-integration-smokedrv-i8042-integration-phase3-inputdrv-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-bootstraplib-capabilib-ipclib-serviceipc-syscall-x86_64
No third-party crates are used.