Add initial PCI support#238
Merged
Merged
Conversation
Signed-off-by: Connor Davis <connojd@amazon.com>
572bfe7 to
2c52337
Compare
wipawel
reviewed
Jan 12, 2022
de68ca8 to
f42d113
Compare
Contributor
Author
|
FYI I was going to add support for mapping BARs as a follow on commit, but wanted to get early feedback before starting that. In case you wanted to keep the issue open until the BAR mapping stuff is in |
269c2f8 to
94acba2
Compare
wipawel
previously approved these changes
Jan 18, 2022
Contributor
Nah no need to delay, let's get this PR in. |
Add probe_pci, probe_pci_bus, probe_pci_dev and init_pci functions. init_pci is called from kernel_start to setup the PCI subsystem. In turn, init_pci calls probe_pci, which initializes the host bridge and then recursively enumerates the rest of the PCI devices on the system by calling probe_pci_bus/probe_pci_dev. Each device's basic config space is stored in the pcidev_t structure, along with a pointer to the device's parent bridge and a list_head_t node. When a device is found, it is added to the global pci_list structure for later reference. Signed-off-by: Connor Davis <connojd@amazon.com>
Contributor
Author
|
should be good to go now |
wipawel
approved these changes
Jan 18, 2022
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.
The first patch of this series fixes a small typo. The second adds code for enumerating PCI devices