uefi: Refactor PciRootBridgeIo::enumerate() with tree-topology information#1830
Merged
nicholasbishop merged 1 commit intorust-osdev:mainfrom Dec 12, 2025
Merged
Conversation
2a46de0 to
fbed494
Compare
3 tasks
phip1611
requested changes
Nov 22, 2025
Member
phip1611
left a comment
There was a problem hiding this comment.
Thanks for working on this! My main concern is my lack of domain knowledge of PCIe. Please elaborate a little more to help me understand what's going on :)
phip1611
reviewed
Nov 22, 2025
602c776 to
a82b06c
Compare
phip1611
requested changes
Nov 23, 2025
Member
phip1611
left a comment
There was a problem hiding this comment.
We're almost there! Just a few nits
e6d359c to
de89b6d
Compare
de89b6d to
32357f1
Compare
Contributor
Author
|
Okay, I think I got everything. I now went with |
phip1611
approved these changes
Nov 23, 2025
Member
phip1611
left a comment
There was a problem hiding this comment.
LGTM! @nicholasbishop would you mind to also look over this? I think you might have more PCI(e) knowledge than I do
ea051cc to
358aa0c
Compare
…ation - Refactored return type from standard BTreeSet to custom PciTree struct - Removed special FullPciIoAddress type, since segment number is PciRoot dependent - During enumeration, skip branches we have already seen - During enumeration, collect tree topology information (which child bus linked from where) - Add complicated pci structure in integration test vm - Print child busses for every device entry in integration test
358aa0c to
3d29dda
Compare
nicholasbishop
approved these changes
Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BTreeSet<PciIoAddress>to customPciTreestruct with tree topology informationPreviously, we iterated over the bus range from the ACPI descriptor. I changed this in my last MR to only visit the first in the range. I changed this back to iterate over all of the entries, but skip the ones we have seen previously - now that that's easily possible. I decided that better safe than sorry is the best way. The iteration over all child busses already saved our ass once - let's not willingly take this safety net away. Sorry for the back and forth here.
The plan for device paths is now to add something like:
PciTree::device_path(&self, addr: PciIoAddress) -> PoolDevicePath.Checklist