Skip to content

Implement common comms channel abstraction for pluggable transports #66

Description

@dymk

Task

Refactor services to use a common communications channel abstraction instead of reading/writing arbitrary byte arrays directly. This prepares the codebase for pluggable comms backends (eSPI, UART, etc.) as the underlying transport between the EC secure partition and the embedded controller.

Motivation

Currently each service manually packs/unpacks raw byte arrays for request and response data. This tightly couples service logic to the wire format and makes it difficult to swap the underlying transport. A common comms channel trait/abstraction would:

  • Decouple service logic from transport details
  • Enable pluggable backends (eSPI OOB, UART, shared memory, etc.)
  • Provide a consistent interface for framing, serialization, and error handling
  • Make it easier to test services with mock transports

Scope

  • Define a comms channel trait (send/receive with typed messages or structured buffers)
  • Refactor existing services to use the new abstraction instead of raw byte slices
  • Ensure unit tests still pass with an in-memory/mock backend
  • Document the abstraction and how to implement new backends

Related

Parent

Part of #60

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions