-
Notifications
You must be signed in to change notification settings - Fork 134
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
PCI probing takes 4 time units in qemu #198
Comments
That log says that PCI probing is pretty much instant:
The time consuming part is resetting each PHB and training the links. IIRC there's a bunch of mandatory waits in there so if you're booting with a single CPU it'll be slow. |
Yeah, it'll be slow because of those compulsory waits. |
So I was looking at this today and we might be able to make it a bit faster. Currently the PHB3 model always reports that there is in-band presence since the value of the training control register is hard-coded. You can hack that with this:
Unfortunately, this doesn't make things any faster right now since there's a 1s timeout when we're waiting for the in-band presence bit to go high. That said, the PCIe spec says that: a) Devices must enter the link Detect state within 20ms of PERST being lifted, and So we should be able to make it faster. There might be a good reason for the longer timeout though, @mikey or @ozbenh might know why. |
Do you want me to merge the patch above in the PHB3 model ? |
@legoater Sure, it won't fix the problem here, but it makes the model a little better and shouldn't break anything. The PHB4 model has the same issue too. |
Running @legoater 's qemu tree (3.1 based) with the powernv model:
We should see if the model, or skiboot, can be modified to reduce this time.
The text was updated successfully, but these errors were encountered: