-
-
Notifications
You must be signed in to change notification settings - Fork 182
uefi: Implement PciRootBridgeIo bus device enumeration logic #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
50999b8 to
3920b72
Compare
phip1611
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! And yes, I can imagine that using this nicely without alloc is a pain.
|
|
||
| #[cfg(feature = "alloc")] | ||
| pub mod configuration; | ||
| #[cfg(feature = "alloc")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is plenty of functionality in that module not needing alloc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the rest only consists of private helper functions that aren't that useful outside. Do you want to expose them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now, we should not export private helpers.
I know we are not consistent at all in uefi what has to be alloc-only and what should only provide additional alloc-value add.
ah nvm, You do not have to fix this in this issue. I might create a follow-up issue for that.
d4d9839 to
16b9553
Compare
This sorting now actually makes sense from a logical point of view. This is now also the ordering you get by using typical tools like lspci.
85ea4b1 to
08ce762
Compare
08ce762 to
a82e24e
Compare
I finally gave up on trying to achieve the PCI bus device enumeration without allocation - that's not gonna happen.
I therefore accepted my fate and transformed my version with allocations into an upstreamable state.
This implementation uses the RootBridge's configuration() method to query ACPI information about the bridge. This contains ranges of valid bus addresses (setup & configured by the UEFI firmware), which are then used as starting points for the recursive bus/device/function scan.
The result of this recursive scan is written into a BTreeSet - which now has the ordering you'd expect and are used to from tools like
lspci.Best consumed commit-by-commit :P
Checklist