-
Notifications
You must be signed in to change notification settings - Fork 0
VMD PCH rootbus #4
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
base: master
Are you sure you want to change the base?
Conversation
mtkaczyk
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.
LGTM, one small suggestion
drivers/pci/controller/vmd.c
Outdated
| enum vmd_resource { | ||
| VMD_RES_CFGBAR = 0, | ||
| VMD_RES_MBAR_1, | ||
| VMD_RES_MBAR_2, |
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.
| VMD_RES_MBAR_2, | |
| /*VMD Resource MemoryBar 1 */ | |
| VMD_RES_MBAR_1, |
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.
And same for MBAR_2 - just to explain full meaning.
mtkaczyk
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.
PATCH v2 LGTM, one small suggestion
| .flags = IORESOURCE_BUS | IORESOURCE_PCI_FIXED, | ||
| }; | ||
|
|
||
| if (vmd_has_pch_rootbus(vmd)) { |
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.
please put declarations inside if:
| if (vmd_has_pch_rootbus(vmd)) { | |
| u16 ioc_range = 0; | |
| u16 pch_range = 0; | |
| pci_read_config_word(vmd->dev, VMD_BUSRANGE0, &ioc_range); | |
| pci_read_config_word(vmd->dev, VMD_BUSRANGE1, &pch_range); |
mtkaczyk
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.
one formatting issue
drivers/pci/controller/vmd.c
Outdated
| */ | ||
| bus_number = (vmd_has_pch_rootbus(vmd) && | ||
| bus->number == VMD_PRIMARY_PCH_BUS) ? | ||
| vmd->busn_start[VMD_BUS_1] : bus->number; |
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.
formatting here
| vmd->busn_start[VMD_BUS_1] : bus->number; | |
| vmd->busn_start[VMD_BUS_1] : bus->number; |
21f8866 to
e79e17e
Compare
This function is too long and needs to be shortened to make it more readable. This clean up is a prework for enablement additional VMD bus range. It doesn't change functional behavior of vmd_enable_domain(). Suggested-by: Nirmal Patel <[email protected]> Reviewed-by: Mariusz Tkaczyk <[email protected]> Signed-off-by: Szymon Durawa <[email protected]>
e79e17e to
6d128be
Compare
Starting from Intel Arrow Lake VMD enhacement introduces separate rotbus for PCH. It means that all 3 MMIO BARs exposed by VMD are shared now between CPU IOC and PCH. This patch adds PCH bus enumeration and MMIO management for devices with VMD enhancement support. Suggested-by: Nirmal Patel <[email protected]> Reviewed-by: Mariusz Tkaczyk <[email protected]> Signed-off-by: Szymon Durawa <[email protected]>
VMD PCH rootbus primary number is 0x80 and pci_scan_bridge_extend() cannot assign it as "hard-wired to 0" and marks setup as broken. To avoid this, PCH bus number has to be the same as PCH primary number. Suggested-by: Nirmal Patel <[email protected]> Reviewed-by: Mariusz Tkaczyk <[email protected]> Signed-off-by: Szymon Durawa <[email protected]>
Add PCH rootbus support