Am 29. Januar 2025 17:54:46 UTC schrieb BALATON Zoltan <bala...@eik.bme.hu>:
>On Tue, 28 Jan 2025, Bernhard Beschow wrote:
>> Am 28. Januar 2025 14:33:14 UTC schrieb Peter Maydell 
>> <peter.mayd...@linaro.org>:
>>> On Mon, 20 Jan 2025 at 20:38, Bernhard Beschow <shen...@gmail.com> wrote:
>>>> 
>>>> Linux checks for the PLLs in the PHY to be locked, so implement a model
>>>> emulating that.
>>>> 
>>>> Signed-off-by: Bernhard Beschow <shen...@gmail.com>
>>> 
>>>> diff --git a/docs/system/arm/imx8mp-evk.rst 
>>>> b/docs/system/arm/imx8mp-evk.rst
>>>> index 1514bc5864..8d48580cb4 100644
>>>> --- a/docs/system/arm/imx8mp-evk.rst
>>>> +++ b/docs/system/arm/imx8mp-evk.rst
>>>> @@ -14,6 +14,7 @@ The ``imx8mp-evk`` machine implements the following 
>>>> devices:
>>>>   * Generic Interrupt Controller (GICv3)
>>>>   * 4 UARTs
>>>>   * 3 USDHC Storage Controllers
>>>> + * 1 Designware PCI Express Controller
>>>>   * Secure Non-Volatile Storage (SNVS) including an RTC
>>>>   * Clock Tree
>>>> 
>>>> @@ -62,3 +63,15 @@ Now that everything is prepared the newly built image 
>>>> can be run in the QEMU
>>>>        -dtb imx8mp-evk-patched.dtb \
>>>>        -append "root=/dev/mmcblk2p2" \
>>>>        -drive file=sdcard.img,if=sd,bus=2,format=raw,id=mmcblk2
>>>> +
>>>> +Using PCI Devices
>>>> +-----------------
>>>> +
>>>> +The PCI Express controller spawns two PCI buses, of which only one can be 
>>>> used.
>>>> +By default QEMU assigns the wrong bus, so the correct one has to be 
>>>> specified
>>>> +manually by adding ``bus=dw-pcie``. For example, when adding an Intel 
>>>> e1000
>>>> +network card, the command line looks like:
>>>> +
>>>> +.. code-block:: bash
>>>> +
>>>> +  $ qemu-system-aarch64 -M imximp-evk ... -device 
>>>> virtio-net-pci,bus=dw-pcie
>>> 
>>> Why does this happen? Isn't there some way to make QEMU default to
>>> using the right bus? Otherwise there's likely to be a lot of
>>> user confusion because PCI "doesn't work"...
>> 
>> Yeah, this is really confusing and I forget about it myself. I'd appreciate 
>> any hints here.
>
>I'm not sure but I think the PCI bus created last will be used by default so 
>maybe swapping the order these are created may help.

Turns out there is BusClass::max_dev which is respected when a parent bus for a 
user-created device is sought. I'll draw inspiration from pnv_phb4.

Best regards,
Bernhard

>
>Regards,
>BALATON Zoltan
>
>> Best regards,
>> Bernhard
>> 
>>> 
>>> thanks
>>> -- PMM
>> 
>> 

Reply via email to