generated from erix/meta
drv-serial is the userspace serial hardware driver daemon for EriX.
- 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-serial
drv-serial is the userspace serial hardware driver daemon for EriX.
It owns the COM1 serial hardware interaction path exposed through kernel control
operations and the interrupt-routing path exposed through irqd.
What it does
- Validates startup envelope and role contract (
SERVICE_ROLE_DRV_SERIAL). - Registers itself with
namedand resolvesirqdin serial integration mode. - Resolves
devicedand registers itself as a serial provider (REGISTER_PROVIDER, interface classSERIAL). - Registers a UART COM1 interrupt handler with
irqd, then unmasks the line. - Handles RPC operations:
IPC_PHASE3_DRV_SERIAL_OP_WRITEIPC_PHASE3_DRV_SERIAL_OP_READIPC_PHASE3_DRV_SERIAL_OP_READ_STATS
- Writes bytes to COM1 data port (
0x3F8) viaIPC_KERNEL_CONTROL_OP_IOPORT_WRITE8. - Maintains bounded RX ring and deterministic counters (
rx_bytes,tx_bytes,irq_count,dropped_irq_count).
Runtime model
- Single-threaded event loop with mixed RPC and interrupt-notify handling.
- Fixed message buffers (
IPC_MSG_BUFFER_BYTES = 1024). - Fixed RX ring (
RX_RING_CAPACITY = 4096). - No dynamic allocation and no external crates.
Interrupt path
- Interrupt source:
IPC_INTERRUPT_LINE_UART_COM1. - Delivery path: kernel ->
irqd->drv-serialnotify payload (Phase2IrqdEventNotifyV1). - ACK is explicit via
lib-interrupt::ack. - The implementation masks the UART line after the first acknowledged interrupt in the current runtime model to avoid notify flooding.
Feature flags
drv-serial-integration-smokedrv-serial-integration-force-faildrv-serial-integration-phase3-serial
Default build has no integration feature enabled.
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-servicelib-interruptipc-syscall-x86_64
No third-party crates are used.