seriald is the serial console mediation service in EriX userspace.
Find a file
2026-03-23 10:19:57 +02:00
.github Add initial implementation of the seriald service with CI configuration 2026-03-11 02:30:20 +02:00
src seriald: keep the fallback serial provider slot always available 2026-03-23 10:16:34 +02:00
.editorconfig Initial commit 2026-03-10 23:09:14 +01:00
.gitignore Initial commit 2026-03-10 23:09:14 +01:00
ARCHITECTURE.md seriald: register HAL readiness and resolve generic serial providers 2026-03-17 13:52:30 +02:00
Cargo.toml runtime-mode: migrate feature gates and document mode model 2026-03-11 08:05:01 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-10 23:09:14 +01:00
CONTRIBUTING.md Initial commit 2026-03-10 23:09:14 +01:00
LICENSE Initial commit 2026-03-10 23:09:14 +01:00
linker.ld Add initial implementation of the seriald service with CI configuration 2026-03-11 02:30:20 +02:00
README.md seriald: register HAL readiness and resolve generic serial providers 2026-03-17 13:52:30 +02:00
ROADMAP.md seriald: register HAL readiness and resolve generic serial providers 2026-03-17 13:52:30 +02:00
rustfmt.toml seriald: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:57 +02:00
SECURITY.md docs: align security policy phase numbering 2026-03-11 05:28:15 +02:00

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 class SERIAL.
  • Accepts client calls:
    • IPC_PHASE3_SERIALD_OP_WRITE
    • IPC_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
  • Read path:
    • Input: Phase3SerialdReadRequestV1
    • Output: Phase3SerialdReadResponseV1
    • cursor = 0 starts from oldest available byte.
    • Returns NOT_FOUND when no bytes are available for the requested cursor.

All wire layouts and constants are defined in lib-ipc.

Feature flags

  • seriald-integration-smoke
  • seriald-integration-force-fail
  • seriald-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-bootstrap
  • lib-capabi
  • lib-ipc
  • lib-service
  • ipc-syscall-x86_64

No third-party crates are used.