seriald is the serial console mediation service in EriX userspace.
- 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 | ||
seriald
seriald is the serial console mediation service in EriX userspace.
It provides a stable client-facing IPC API for serial writes and readback while delegating hardware-facing work to a resolved serial provider.
What it does
- Validates root startup envelope and role contract (
SERVICE_ROLE_SERIALD). - Registers itself in
named. - Resolves
deviced, registers HAL readiness (REGISTER_HAL), and resolves an active provider endpoint (RESOLVE_PROVIDER) for interface classSERIAL. - Accepts client calls:
IPC_PHASE3_SERIALD_OP_WRITEIPC_PHASE3_SERIALD_OP_READ
- Forwards writes to the resolved provider and stores successful bytes in an internal bounded stream ring.
- Provides deterministic cursor-based reads over the stored stream.
Runtime model
- Single-threaded service loop.
- Fixed message buffers (
IPC_MSG_BUFFER_BYTES = 1024). - Fixed stream ring (
STREAM_RING_CAPACITY = 4096). - No dynamic allocation and no external crates.
IPC contract summary
- Write path:
- Input:
Phase3SerialdWriteRequestV1 - Behavior: forwards to serial-provider write contract (
0x5A0) - Output:
Phase3SerialdWriteResponseV1
- Input:
- Read path:
- Input:
Phase3SerialdReadRequestV1 - Output:
Phase3SerialdReadResponseV1 cursor = 0starts from oldest available byte.- Returns
NOT_FOUNDwhen no bytes are available for the requested cursor.
- Input:
All wire layouts and constants are defined in lib-ipc.
Feature flags
seriald-integration-smokeseriald-integration-force-failseriald-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-serviceipc-syscall-x86_64
No third-party crates are used.