patina_internal_depex: Report protocol present status#1552
Conversation
❌ QEMU Readiness Check Failedpatina-dxe-core-qemu needs to be updated before QEMU validation can run.
Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/27128469252 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! |
|
|
||
| match &mut driver.depex { | ||
| Some(depex) => { | ||
| depex.eval_with_report(&PROTOCOL_DB.registered_protocols()); |
There was a problem hiding this comment.
Rather than this approach, which will print out the hard to parse depex report, e.g.:
I would suggest we print out something nicer here. I know this can get a little hairy because depex statements are allowed to get complex, but in practice we typically don't see very complex ones.
i.e. instead of the stack of true and false, I would hope to see a report like:
Driver X failed to dispatch because GUID Y was not found.
Driver Z failed to dispatch because GUID alpha was found and GUID beta was not found.
etc. I think that is feasible and a lot easier to parse from the logs.
@Javagedes @makubacki thoughts?
There was a problem hiding this comment.
I agree that should be explored here while the feature is being added. We should be able to map back image names from PDB paths and/or UI sections to the module GUID.
There was a problem hiding this comment.
@os-d
I’ll figure out a way to make this nicer, based on my understanding.
@makubacki
I’ll keep this in mind. I also have a more aggressive idea.
There was a problem hiding this comment.
If we prefer "nicer", to balance verbosity and correctness, my understanding is this:
Trying to construct an expression tree from the DEPEX op list, then report the false node in the evaluation.
I feel this might be a bit too aggressive for debug code.
This problem shifts from the computer engineering domain to the computer science domain.
We are trying to touch the SAT (Boolean Satisfiability) problem.
After reviewing the cost-benefit tradeoffs against our purpose, we decided to use a "simpler" format. This format reports the present status of dependent protocols. Engineers can then open the corresponding INF file (or build report) and perform a one-to-one mapping check.
One ref for SAT: https://people.eecs.berkeley.edu/~sseshia/219c/spr16/lectures/SATSolving.pdf
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a detailed “DEPEX evaluation report” logging path to help diagnose why drivers remain pending/not dispatched.
Changes:
- Added optional detailed pending-driver reporting in the PI dispatcher guarded by a log-enabled check.
- Introduced a
Depex::eval_with_reportAPI that logs DEPEX evaluation under a dedicated log target. - Switched DEPEX debug logs to use explicit log targets (default vs report).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| patina_dxe_core/src/pi_dispatcher.rs | Adds a “detail report” loop that logs pending drivers and evaluates DEPEX with reporting enabled. |
| core/patina_internal_depex/src/lib.rs | Adds report log target constants and routes DEPEX debug output through an overridable target via eval_with_report. |
aa8fa25 to
2726141
Compare
2726141 to
f02fd80
Compare

Description
Add log filter
patina_depex_reportWhen this filter is set to Debug or left unset,
pi_dispatcher.rsreports a detailed dependency list for each "found but not dispatched" driver in Debug builds.How This Was Tested
Tested on real hardware.
Integration Instructions
Examples for logger