Skip to content

[feature/patina-boot] patina_boot: Add ConnectController service trait#1459

Draft
kat-perez wants to merge 1 commit intoOpenDevicePartnership:feature/patina-bootfrom
kat-perez:connect-controller-service
Draft

[feature/patina-boot] patina_boot: Add ConnectController service trait#1459
kat-perez wants to merge 1 commit intoOpenDevicePartnership:feature/patina-bootfrom
kat-perez:connect-controller-service

Conversation

@kat-perez
Copy link
Copy Markdown
Contributor

Description

Add a pluggable ConnectController trait for controller connection strategies during device enumeration, replacing the hardcoded connect_all() call in SimpleBootManager.

  • ConnectController trait with single connect() method
  • ConnectAllStrategy default implementation (preserves existing behavior)
  • SimpleBootManager::with_connect_strategy() constructor for custom strategies
  • interleave_connect_and_dispatch() made generic over the connection function

This enables platforms to implement selective device enumeration (e.g., PCI-only, skip USB for headless) without writing a full custom BootOrchestrator.

SimpleBootManager::new() behavior is unchanged — zero breakage for existing platforms.

Ref: OpenDevicePartnership/modern-payload#205

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • 55 unit tests passing (7 new: custom connect function success/failure, connect strategy constructors, interleave with custom closures)
  • cargo fmt, cargo clippy clean
  • Integration tested with patina-dxe-core-qemu on QEMU Q35 — full boot to UEFI Shell 2.0

Integration Instructions

No changes required for existing platforms. SimpleBootManager::new() defaults to ConnectAllStrategy.

Platforms wanting selective enumeration use the new constructor:

add.component(BootDispatcher::new(SimpleBootManager::with_connect_strategy(
    config,
    MyCustomStrategy,
)));

@github-actions github-actions bot added the impact:testing Affects testing label Apr 3, 2026
@patina-automation
Copy link
Copy Markdown
Contributor

patina-automation bot commented Apr 3, 2026

⌛ QEMU Validation Pending

QEMU validation is pending on successful CI completion.

Note: Any previous results are available in this comment's edit history.

This comment was automatically generated by the Patina QEMU PR Validation workflow.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 71.15385% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../patina_boot/src/strategies/connect_by_protocol.rs 0.00% 15 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kat-perez kat-perez force-pushed the connect-controller-service branch from 0e70816 to 65814d8 Compare April 4, 2026 00:19
@kat-perez kat-perez changed the title patina_boot: Add ConnectController service trait [feature/patina-boot] patina_boot: Add ConnectController service trait Apr 6, 2026
@kat-perez kat-perez force-pushed the connect-controller-service branch from 65814d8 to 759af3b Compare April 6, 2026 17:37
Add a pluggable ConnectController trait for controller connection
strategies during device enumeration. This replaces the hardcoded
connect_all() call in SimpleBootManager with a configurable strategy.

- Add ConnectController trait with single connect() method
- Add ConnectAllStrategy as the default (preserves existing behavior)
- Add SimpleBootManager::with_connect_strategy() constructor
- Make interleave_connect_and_dispatch() public and generic over
  the connection strategy so custom BootOrchestrators can reuse it

SimpleBootManager::new() continues to use ConnectAllStrategy, so
existing platforms are unaffected. Platforms needing selective
enumeration (e.g., PCI-only, skip USB) implement ConnectController
and pass it via with_connect_strategy().
@kat-perez kat-perez force-pushed the connect-controller-service branch from 759af3b to 9bdd441 Compare April 6, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:testing Affects testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant