[feature/patina-boot] patina_boot: Add ConnectController service trait#1459
[feature/patina-boot] patina_boot: Add ConnectController service trait#1459kat-perez wants to merge 1 commit intoOpenDevicePartnership:feature/patina-bootfrom
Conversation
✅ QEMU Validation PassedAll QEMU validation jobs completed successfully.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/24726937050 Boot Time to EFI Shell
Dependencies
This comment was automatically generated by the Patina QEMU PR Validation Post workflow. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
0e70816 to
65814d8
Compare
dcc1cd2 to
d3930d8
Compare
d9458cb to
f808a3e
Compare
9a08a54 to
6f41110
Compare
os-d
left a comment
There was a problem hiding this comment.
I'm not as clear on what defines the Simple Boot Manager any more if the connect strategy is configurable. Besides connectall, what is the Simple Boot Manager doing that an "Advanced" Boot Manager wouldn't do or conversely, what isn't it doing?
i.e. it seems you are making Simple Boot Manager a more generic component than originally designed, which is fine, but perhaps the design point should be revisited on whether this is really just Simple or whether it is something that may extend to more platforms.
| } | ||
| } | ||
|
|
||
| fn connect_by_protocol<B: BootServices>(boot_services: &B, protocol_guids: &[&'static efi::Guid]) -> Result<()> { |
There was a problem hiding this comment.
This seems a reasonable approach, for some platform it knows it only wants to connect NVMe devices, for example, but would appreciate others more familiar with BDS than me to weigh. @makubacki @apop5 @kuqin12 ?
b6d3270 to
4f3c7ec
Compare
I can describe a bit better the expectations for
|
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, generic over B: BootServices for mockable unit testing - ConnectAllStrategy default implementation preserves existing behavior - SimpleBootManager::with_connect_strategy() constructor for custom strategies; SimpleBootManager::new() is unchanged - interleave_connect_and_dispatch() made generic over the connection function Enables platforms to implement selective device enumeration (e.g., PCI-only, skip USB for headless) without writing a full custom BootOrchestrator. Ref: OpenDevicePartnership/modern-payload#205
4f3c7ec to
33fb729
Compare
Thanks. As it evolves, particularly with this notion of the pluggable strategies, I'm wondering whether the SimpleBootManager is becoming just a BootManager and one set of strategies is the "Simple" set and another set may include variable driven boot order, boot menu, etc. |
Yeah, that's true that it's not really "Simple" anymore. The "simple" term feels overloaded / unclear for what this implementation is achieving. How about something like |
I think we can revisit the naming later if needed, I'm mostly thinking on the architectural side of this. Perhaps in the next Patina meeting we can discuss this with the group, to help with my understanding. Like I said, as more of the SimpleBootManager becomes pluggable, I'm not as sure the decisions being made in the SimpleBootManager that aren't relevant for other platforms. |
Description
Add a pluggable
ConnectControllertrait for controller connection strategies during device enumeration, replacing the hardcodedconnect_all()call inSimpleBootManager.ConnectControllertrait with singleconnect()methodConnectAllStrategydefault implementation (preserves existing behavior)SimpleBootManager::with_connect_strategy()constructor for custom strategiesinterleave_connect_and_dispatch()made generic over the connection functionThis 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
How This Was Tested
cargo fmt,cargo clippycleanIntegration Instructions
No changes required for existing platforms.
SimpleBootManager::new()defaults toConnectAllStrategy.Platforms wanting selective enumeration use the new constructor: